Customers Timeline

The customers timeline keeps an audit trail of changes and activity for each customer.

Retrieve a list of customer timeline custom event types

Retrieve a list of customer timeline custom event types.

SecuritySecretApiKey or JWT
Request
query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

Responses
200

A list of customer timeline custom event types was retrieved successfully.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
Array
name
required
string [ 1 .. 255 ] characters

Customer Timeline Custom Event type name. It must not be similar to any Rebilly system event.

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

get/customer-timeline-custom-events
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/organizations/unknown/customer-timeline-custom-events?limit=1000&offset=0&filter=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Create Customer Timeline custom event type

Create Customer Timeline custom event type.

SecuritySecretApiKey or JWT
Request
Request Body schema: application/json

Customer Timeline Custom Event Type resource.

name
required
string [ 1 .. 255 ] characters

Customer Timeline Custom Event type name. It must not be similar to any Rebilly system event.

Responses
201

Customer Timeline Custom Event Type was created.

Response Schema: application/json
name
required
string [ 1 .. 255 ] characters

Customer Timeline Custom Event type name. It must not be similar to any Rebilly system event.

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

post/customer-timeline-custom-events
Request samples
application/json
{
  • "name": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve customer timeline custom event type with specified identifier string

Retrieve customer timeline custom event type.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

Responses
200

Customer Timeline custom event type was retrieved successfully.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
name
required
string [ 1 .. 255 ] characters

Customer Timeline Custom Event type name. It must not be similar to any Rebilly system event.

id
string <= 50 characters

The resource ID. Defaults to UUID v4.

createdTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

updatedTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

get/customer-timeline-custom-events/{id}
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/organizations/unknown/customer-timeline-custom-events/{id}' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve a list of customer timeline messages for all customers

Retrieve a list of customer timeline messages for all customers.

SecuritySecretApiKey or JWT
Request
query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

Responses
200

A list of customer timeline messages was retrieved successfully.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
Array
id
string <= 50 characters

The resource ID. Defaults to UUID v4.

type
string

Timeline message type.

Enum: "account-password-reset-requested" "account-verification-requested" "aml-list-was-possibly-matched" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "custom-event" "custom-event-processed" "custom-fields-changed" "customer-bank-account-blocked" … 62 more
customEventType
string or null [ 1 .. 255 ] characters

Timeline custom event type. Used with custom-event type. Must be defined using Customer Timeline custom event API.

triggeredBy
string

Shows who or what triggered the Timeline message.

Enum: "rebilly" "app" "direct-api"
message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

Array of objects (TimelineAction) >= 0 items

Actions available to a Timeline message. Can be empty in case no actions are available for a message.

Array of objects (TimelineTable) >= 0 items
object

Timeline comment author data.

object
Array of objects
occurredTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

get/customer-timeline-events
Request samples
curl -i -X GET \
  'https://api-sandbox.rebilly.com/organizations/unknown/customer-timeline-events?limit=1000&offset=0&filter=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'
Response samples
application/json
[
  • {
    }
]

Retrieve a list of customer timeline messages

Retrieve a list of customer timeline messages.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

query Parameters
limit
integer [ 0 .. 1000 ]

The collection items limit.

offset
integer >= 0

The collection items offset.

filter
string

The collection items filter requires a special format. Use "," for multiple allowed values. Use ";" for multiple fields. See the filter guide for more options and examples about this format.

sort
Array of strings

The collection items sort field and order (prefix with "-" for descending sort).

q
string

The partial search of the text fields.

Responses
200

A list of customer timeline messages was retrieved successfully.

Response Headers
Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

Response Schema: application/json
Array
id
string <= 50 characters

The resource ID. Defaults to UUID v4.

type
string

Timeline message type.

Enum: "account-password-reset-requested" "account-verification-requested" "aml-list-was-possibly-matched" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "custom-event" "custom-event-processed" "custom-fields-changed" "customer-bank-account-blocked" … 62 more
customEventType
string or null [ 1 .. 255 ] characters

Timeline custom event type. Used with custom-event type. Must be defined using Customer Timeline custom event API.

triggeredBy
string

Shows who or what triggered the Timeline message.

Enum: "rebilly" "app" "direct-api"
message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

Array of objects (TimelineAction) >= 0 items

Actions available to a Timeline message. Can be empty in case no actions are available for a message.

Array of objects (TimelineTable) >= 0 items
object

Timeline comment author data.

object
Array of objects
occurredTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

get/customers/{id}/timeline
Request samples
// all parameters are optional except for the `id`
const firstCollection = await api.customers
    .getAllTimelineMessages({id: 'my-customer'});

// alternatively you can specify one or more of them
const params = {id: 'my-customer', limit: 20, offset: 100};
const secondCollection = await api.customers.getAllTimelineMessages(params);

// access the collection items, each item is a Member
secondCollection.items
    .forEach(message => console.log(message.fields.eventType));
Response samples
application/json
[
  • {
    }
]

Create a customer Timeline comment or custom defined event

Create a customer Timeline comment or custom defined event.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

Request Body schema: application/json

Customer Timeline resource.

type
string

Timeline message type.

Enum: "account-password-reset-requested" "account-verification-requested" "aml-list-was-possibly-matched" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "custom-event" "custom-event-processed" "custom-fields-changed" "customer-bank-account-blocked" … 62 more
customEventType
string or null [ 1 .. 255 ] characters

Timeline custom event type. Used with custom-event type. Must be defined using Customer Timeline custom event API.

customData
object

Timeline custom event data. Used with custom-event type. Will be transformed to extraData two-column table in response.

message
string

The message that describes the message details.

Responses
201

Customer Timeline comment or custom defined event was created.

Response Schema: application/json
id
string <= 50 characters

The resource ID. Defaults to UUID v4.

type
string

Timeline message type.

Enum: "account-password-reset-requested" "account-verification-requested" "aml-list-was-possibly-matched" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "custom-event" "custom-event-processed" "custom-fields-changed" "customer-bank-account-blocked" … 62 more
customEventType
string or null [ 1 .. 255 ] characters

Timeline custom event type. Used with custom-event type. Must be defined using Customer Timeline custom event API.

triggeredBy
string

Shows who or what triggered the Timeline message.

Enum: "rebilly" "app" "direct-api"
message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

Array of objects (TimelineAction) >= 0 items

Actions available to a Timeline message. Can be empty in case no actions are available for a message.

Array (>= 0 items)
action
string
redemptionId
string <= 50 characters

The resource ID. Defaults to UUID v4.

Array of objects (TimelineTable) >= 0 items
Array (>= 0 items)
type
string
title
string

Data table title.

footer
string

Data table footer.

Array of objects

Table data. Each array element represents a table row.

object

Timeline comment author data.

userFullName
string
userId
string
object
property name*
additional property
string
Array of objects
Array
resourceType
string
Enum: "kyc-document" "invoice" "subscription" "transaction" "email-message" "dispute" "coupon" "external"
resourceId
string (ResourceId) <= 50 characters

The resource ID. Defaults to UUID v4.

placeholder
string
externalUrl
string
occurredTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

422

Invalid data was sent.

post/customers/{id}/timeline
Request samples
application/json
{
  • "type": "account-password-reset-requested",
  • "customEventType": "string",
  • "customData": {
    },
  • "message": "string"
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "account-password-reset-requested",
  • "customEventType": "string",
  • "triggeredBy": "rebilly",
  • "message": "string",
  • "extraData": {
    },
  • "occurredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Retrieve a customer Timeline message

Retrieve a customer message with specified identifier string.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

messageId
required
string

The Customer Timeline message ID.

Responses
200

Customer message was retrieved successfully.

Response Schema: application/json
id
string <= 50 characters

The resource ID. Defaults to UUID v4.

type
string

Timeline message type.

Enum: "account-password-reset-requested" "account-verification-requested" "aml-list-was-possibly-matched" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "custom-event" "custom-event-processed" "custom-fields-changed" "customer-bank-account-blocked" … 62 more
customEventType
string or null [ 1 .. 255 ] characters

Timeline custom event type. Used with custom-event type. Must be defined using Customer Timeline custom event API.

triggeredBy
string

Shows who or what triggered the Timeline message.

Enum: "rebilly" "app" "direct-api"
message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

Array of objects (TimelineAction) >= 0 items

Actions available to a Timeline message. Can be empty in case no actions are available for a message.

Array (>= 0 items)
action
string
redemptionId
string <= 50 characters

The resource ID. Defaults to UUID v4.

Array of objects (TimelineTable) >= 0 items
Array (>= 0 items)
type
string
title
string

Data table title.

footer
string

Data table footer.

Array of objects

Table data. Each array element represents a table row.

object

Timeline comment author data.

userFullName
string
userId
string
object
property name*
additional property
string
Array of objects
Array
resourceType
string
Enum: "kyc-document" "invoice" "subscription" "transaction" "email-message" "dispute" "coupon" "external"
resourceId
string (ResourceId) <= 50 characters

The resource ID. Defaults to UUID v4.

placeholder
string
externalUrl
string
occurredTime
string <date-time>

Read-only timestamp, automatically assigned on back-end.

Array of objects (SelfLink) non-empty

The links related to resource.

Array (non-empty)
rel
required
string

The link type.

Value: "self"
href
required
string

The link URL.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

get/customers/{id}/timeline/{messageId}
Request samples
const message = await api.customers
    .getTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
console.log(message.fields.eventType);
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "account-password-reset-requested",
  • "customEventType": "string",
  • "triggeredBy": "rebilly",
  • "message": "string",
  • "extraData": {
    },
  • "occurredTime": "2019-08-24T14:15:22Z",
  • "_links": [
    ]
}

Delete a Customer Timeline message

Delete a Customer Timeline message with predefined identifier string.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

messageId
required
string

The Customer Timeline message ID.

Responses
204

Customer Timeline message was deleted.

401

Unauthorized access, invalid credentials were used.

403

Access forbidden.

404

Resource was not found.

409

Conflict.

delete/customers/{id}/timeline/{messageId}
Request samples
const request = await api.customers
    .deleteTimelineMessage({id: 'foobar-001', messageId: 'message-202'});

// the request does not return any fields but
// you can confirm the success using the status code
console.log(request.response.status); // 204
Response samples
application/json
{
  • "status": 401,
  • "title": "string",
  • "detail": "string",
  • "instance": "string"
}