Skip to content

Get a customer's timeline

GET
/stores/{storeRef}/customers/{customerId}/timeline
curl --request GET \
--url 'https://apibase.ecomweb.app/api/v1/stores/example/customers/1/timeline?limit=50&offset=0' \
--header 'x-api-key: <x-api-key>'

Returns the customer’s history as one list, newest first: changes made to the customer, activity read from their orders, payments, reviews and sign-ins, and internal staff comments. Each entry has a kind of event or comment. Page with limit and before, passing the previous response’s next_before as before. Each source is read up to its most recent 500 entries, so very long histories can end early.

Required scopes: read:customers

customerId
required
integer

The customer ID.

storeRef
required
string

The store’s ref, as returned by GET /stores.

limit
number
default: 50 >= 1 <= 100

Maximum number of items to return, 1 to 100.

offset
number
0

Number of items to skip.

status
string

Filter orders by order_status

before
string

Opaque cursor from a previous response’s next_before

Media typeapplication/json
object
entries
required

Events and comments merged, newest first. Tell them apart with kind.

Array
One of: discriminator: kind
object
kind
required

Always event.

string
Allowed values: event
source
required

recorded for a change made through the API or dashboard, derived for activity read from orders, payments, reviews and sign-ins.

string
Allowed values: recorded derived
event_type
required

What happened.

string
Allowed values: created name_changed phone_changed status_changed notes_updated deleted identity_linked duplicates_merged address_created address_updated address_deleted address_default_changed merged_into customer_created order_placed payment_recorded address_added account_created login review_submitted invitation_sent invitation_opened invitation_submitted
arguments
required

Details of the event. Its keys depend on event_type.

object
key
additional properties
any
id
required

Entry ID.

string
reason
required

The reason given for the change, or null.

string
nullable
actor
required

Who caused the event.

object
type
required

Kind of actor.

string
Allowed values: staff customer api_key system
id
required

Actor ID: a staff user ID or an API key ID. Null when there is none.

string
nullable
name
required

Display name, or null when it cannot be resolved.

string
nullable
email
required

Staff members only: their email. Null for every other actor.

string
nullable
avatar_url
required

Avatar URL, or null.

string
nullable
created_at
required

When it happened, as an ISO 8601 timestamp.

string
next_before
required

Pass this as before to fetch the next, older page. Null when there are no older entries.

string
nullable

Example

{
"entries": [
{
"kind": "event",
"source": "recorded",
"event_type": "created",
"actor": {
"type": "staff"
}
}
]
}

The request is malformed or failed validation.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key is missing, invalid, revoked or expired.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The key may not do this: a missing scope, a readonly key, a publishable key on a Store API route, or a disallowed origin.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}

The resource does not exist in this store.

Media typeapplication/json
One of:
object
statusCode
required

The HTTP status code.

number
message
required

What went wrong; validation failures list one message per problem.

One of:
string
error

The HTTP status text, such as Bad Request.

string

Example generated

{
"statusCode": 1,
"message": [
"example"
],
"error": "example"
}