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.

Authorizations:
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.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

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

Customer Timeline Custom Event identifier string.

name
required
string [ 1 .. 255 ] characters

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

createdTime
string <date-time>

Customer Timeline Custom event created time.

updatedTime
string <date-time>

Customer Timeline Custom event updated time.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

curl -i -X GET \
  'https://api-sandbox.rebilly.com/customer-timeline-custom-events?limit=0&offset=0&filter=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve customer timeline custom event type with specified identifier string

Retrieve customer timeline custom event type.

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

Pagination-Total
integer

Total items count.

Pagination-Limit
integer

Items per page limit.

Pagination-Offset
integer

Pagination offset.

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

Customer Timeline Custom Event identifier string.

name
required
string [ 1 .. 255 ] characters

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

createdTime
string <date-time>

Customer Timeline Custom event created time.

updatedTime
string <date-time>

Customer Timeline Custom event updated time.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

curl -i -X GET \
  https://api-sandbox.rebilly.com/customer-timeline-custom-events/:id \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Response samples

Content type
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.

Authorizations:
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.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

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 Timeline message identifier string.

type
string
Enum: "customer-comment-created" "customer-created" "primary-address-changed" "default-payment-instrument-changed" "lead-source-changed" "custom-fields-changed" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "kyc-document-created" "kyc-document-accepted" "kyc-document-manually-accepted" "kyc-document-rejected" "kyc-document-manually-rejected" "kyc-document-modified" "payment-card-expired" "payment-instrument-created" "payment-instrument-deactivated" "customer-bank-account-blocked" "customer-blocked" "customer-payment-card-blocked" "invoice-created" "invoice-issued" "invoice-abandoned" "invoice-voided" "invoice-past-due" "invoice-paid" "invoice-partially-paid" "invoice-disputed" "invoice-refunded" "invoice-partially-refunded" "order-created" "order-renewed" "order-activated" "order-completed" "order-reactivated" "order-canceled" "order-upgraded" "order-downgraded" "order-churned" "order-paid-early" "transaction-approved" "transaction-canceled" "transaction-declined" "transaction-abandoned" "transaction-refunded" "transaction-voided" "transaction-discrepancy-found" "transaction-amount-discrepancy-found" "email-message-sent" "custom-event-processed" "custom-event" "transaction-waiting-gateway" "aml-list-was-possibly-matched" "experian-check-performed"

Timeline message type.

customEventType
string [ 1 .. 255 ] characters Nullable

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

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

Shows who or what triggered the Timeline message.

message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

occurredTime
string <date-time>

Timeline message time.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

curl -i -X GET \
  'https://api-sandbox.rebilly.com/customer-timeline-events?limit=0&offset=0&filter=string' \
  -H 'Organization-Id: 4f6cf35x-2c4y-483z-a0a9-158621f77a21' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Response samples

Content type
application/json
[
  • {
    }
]

Retrieve a list of customer timeline messages

Retrieve a list of customer timeline messages.

Authorizations:
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.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

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 Timeline message identifier string.

type
string
Enum: "customer-comment-created" "customer-created" "primary-address-changed" "default-payment-instrument-changed" "lead-source-changed" "custom-fields-changed" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "kyc-document-created" "kyc-document-accepted" "kyc-document-manually-accepted" "kyc-document-rejected" "kyc-document-manually-rejected" "kyc-document-modified" "payment-card-expired" "payment-instrument-created" "payment-instrument-deactivated" "customer-bank-account-blocked" "customer-blocked" "customer-payment-card-blocked" "invoice-created" "invoice-issued" "invoice-abandoned" "invoice-voided" "invoice-past-due" "invoice-paid" "invoice-partially-paid" "invoice-disputed" "invoice-refunded" "invoice-partially-refunded" "order-created" "order-renewed" "order-activated" "order-completed" "order-reactivated" "order-canceled" "order-upgraded" "order-downgraded" "order-churned" "order-paid-early" "transaction-approved" "transaction-canceled" "transaction-declined" "transaction-abandoned" "transaction-refunded" "transaction-voided" "transaction-discrepancy-found" "transaction-amount-discrepancy-found" "email-message-sent" "custom-event-processed" "custom-event" "transaction-waiting-gateway" "aml-list-was-possibly-matched" "experian-check-performed"

Timeline message type.

customEventType
string [ 1 .. 255 ] characters Nullable

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

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

Shows who or what triggered the Timeline message.

message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

occurredTime
string <date-time>

Timeline message time.

Array of objects (SelfLink) non-empty

The links related to resource.

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

Content type
application/json
[
  • {
    }
]

Create a customer Timeline comment or custom defined event

Create a customer Timeline comment or custom defined event.

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Request Body schema: application/json

Customer Timeline resource.

type
string
Enum: "customer-comment-created" "customer-created" "primary-address-changed" "default-payment-instrument-changed" "lead-source-changed" "custom-fields-changed" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "kyc-document-created" "kyc-document-accepted" "kyc-document-manually-accepted" "kyc-document-rejected" "kyc-document-manually-rejected" "kyc-document-modified" "payment-card-expired" "payment-instrument-created" "payment-instrument-deactivated" "customer-bank-account-blocked" "customer-blocked" "customer-payment-card-blocked" "invoice-created" "invoice-issued" "invoice-abandoned" "invoice-voided" "invoice-past-due" "invoice-paid" "invoice-partially-paid" "invoice-disputed" "invoice-refunded" "invoice-partially-refunded" "order-created" "order-renewed" "order-activated" "order-completed" "order-reactivated" "order-canceled" "order-upgraded" "order-downgraded" "order-churned" "order-paid-early" "transaction-approved" "transaction-canceled" "transaction-declined" "transaction-abandoned" "transaction-refunded" "transaction-voided" "transaction-discrepancy-found" "transaction-amount-discrepancy-found" "email-message-sent" "custom-event-processed" "custom-event" "transaction-waiting-gateway" "aml-list-was-possibly-matched" "experian-check-performed"

Timeline message type.

customEventType
string [ 1 .. 255 ] characters Nullable

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

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

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

The Timeline message identifier string.

type
string
Enum: "customer-comment-created" "customer-created" "primary-address-changed" "default-payment-instrument-changed" "lead-source-changed" "custom-fields-changed" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "kyc-document-created" "kyc-document-accepted" "kyc-document-manually-accepted" "kyc-document-rejected" "kyc-document-manually-rejected" "kyc-document-modified" "payment-card-expired" "payment-instrument-created" "payment-instrument-deactivated" "customer-bank-account-blocked" "customer-blocked" "customer-payment-card-blocked" "invoice-created" "invoice-issued" "invoice-abandoned" "invoice-voided" "invoice-past-due" "invoice-paid" "invoice-partially-paid" "invoice-disputed" "invoice-refunded" "invoice-partially-refunded" "order-created" "order-renewed" "order-activated" "order-completed" "order-reactivated" "order-canceled" "order-upgraded" "order-downgraded" "order-churned" "order-paid-early" "transaction-approved" "transaction-canceled" "transaction-declined" "transaction-abandoned" "transaction-refunded" "transaction-voided" "transaction-discrepancy-found" "transaction-amount-discrepancy-found" "email-message-sent" "custom-event-processed" "custom-event" "transaction-waiting-gateway" "aml-list-was-possibly-matched" "experian-check-performed"

Timeline message type.

customEventType
string [ 1 .. 255 ] characters Nullable

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

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

Shows who or what triggered the Timeline message.

message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

occurredTime
string <date-time>

Timeline message time.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

Content type
application/json
{
  • "type": "customer-comment-created",
  • "customEventType": "string",
  • "customData": {
    },
  • "message": "string"
}

Response samples

Content type
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "customer-comment-created",
  • "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.

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

messageId
required
string

The Customer Timeline message ID.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

Response Headers
Rate-Limit-Limit
integer

The number of allowed requests in the current period.

Rate-Limit-Remaining
integer

The number of remaining requests in the current period.

Rate-Limit-Reset
string

The date in format defined by RFC 822 when the current period will reset.

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

The Timeline message identifier string.

type
string
Enum: "customer-comment-created" "customer-created" "primary-address-changed" "default-payment-instrument-changed" "lead-source-changed" "custom-fields-changed" "coupon-applied" "coupon-redeemed" "coupon-redemption-canceled" "kyc-document-created" "kyc-document-accepted" "kyc-document-manually-accepted" "kyc-document-rejected" "kyc-document-manually-rejected" "kyc-document-modified" "payment-card-expired" "payment-instrument-created" "payment-instrument-deactivated" "customer-bank-account-blocked" "customer-blocked" "customer-payment-card-blocked" "invoice-created" "invoice-issued" "invoice-abandoned" "invoice-voided" "invoice-past-due" "invoice-paid" "invoice-partially-paid" "invoice-disputed" "invoice-refunded" "invoice-partially-refunded" "order-created" "order-renewed" "order-activated" "order-completed" "order-reactivated" "order-canceled" "order-upgraded" "order-downgraded" "order-churned" "order-paid-early" "transaction-approved" "transaction-canceled" "transaction-declined" "transaction-abandoned" "transaction-refunded" "transaction-voided" "transaction-discrepancy-found" "transaction-amount-discrepancy-found" "email-message-sent" "custom-event-processed" "custom-event" "transaction-waiting-gateway" "aml-list-was-possibly-matched" "experian-check-performed"

Timeline message type.

customEventType
string [ 1 .. 255 ] characters Nullable

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

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

Shows who or what triggered the Timeline message.

message
string

The message that describes the message details.

object (TimelineExtraData)

Additional data.

occurredTime
string <date-time>

Timeline message time.

Array of objects (SelfLink) non-empty

The links related to resource.

Request samples

const message = await api.customers
    .getTimelineMessage({id: 'foobar-001', messageId: 'message-202'});
console.log(message.fields.eventType);

Response samples

Content type
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "type": "customer-comment-created",
  • "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.

Authorizations:
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

The resource identifier string.

messageId
required
string

The Customer Timeline message ID.

header Parameters
Organization-Id
string (ResourceId) <= 50 characters
Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

Organization identifier in scope of which need to perform request (if not specified, the default organization will be used).

Responses

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

Content type
application/json
{
  • "status": 400,
  • "title": "string",
  • "detail": "string",
  • "error": "string"
}