Get a customer's timeline
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/customers/1/timeline?limit=50&offset=0';const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The customer ID.
The store’s ref, as returned by GET /stores.
Query Parameters
Section titled “Query Parameters”Maximum number of items to return, 1 to 100.
Number of items to skip.
Filter orders by order_status
Opaque cursor from a previous response’s next_before
Responses
Section titled “Responses”object
Events and comments merged, newest first. Tell them apart with kind.
object
Always event.
recorded for a change made through the API or dashboard, derived for activity read from orders, payments, reviews and sign-ins.
What happened.
Details of the event. Its keys depend on event_type.
object
Entry ID.
The reason given for the change, or null.
Who caused the event.
object
Kind of actor.
Actor ID: a staff user ID or an API key ID. Null when there is none.
Display name, or null when it cannot be resolved.
Staff members only: their email. Null for every other actor.
Avatar URL, or null.
When it happened, as an ISO 8601 timestamp.
object
Always comment.
Comment ID.
The comment text.
The staff member who wrote it.
object
Staff user ID.
Display name, or null.
Email address, or null.
Avatar URL, or null.
Whether the comment was edited after it was posted.
Whether the caller may still edit it.
Whether the caller may delete it.
When the comment was posted, as an ISO 8601 timestamp.
Pass this as before to fetch the next, older page. Null when there are no older entries.
Example
{ "entries": [ { "kind": "event", "source": "recorded", "event_type": "created", "actor": { "type": "staff" } } ]}The request is malformed or failed validation.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The key is missing, invalid, revoked or expired.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
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.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}The resource does not exist in this store.
object
The HTTP status code.
What went wrong; validation failures list one message per problem.
The HTTP status text, such as Bad Request.
object
A stable, machine-readable error code.
A human-readable explanation.
Extra context about the error, when there is any.
object
When the error happened, as an ISO 8601 timestamp.
Example generated
{ "statusCode": 1, "message": [ "example" ], "error": "example"}