Get the order timeline
const url = 'https://apibase.ecomweb.app/api/v1/stores/example/orders/1/timeline';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/orders/1/timeline \ --header 'x-api-key: <x-api-key>'Returns the order’s history as one list, newest first: status changes, tracking updates and shipment events, interleaved with internal staff comments. Each entry has a kind of event or comment. At most 500 events and 500 comments are read, and truncated is true when older entries were left out.
Required scopes: read:orders
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The order ID.
The store’s ref, as returned by GET /stores.
Responses
Section titled “Responses”object
Events and comments merged, newest first. Tell them apart with kind.
object
Always event.
What happened.
Details of the event, such as the old and new status. Its keys depend on event_type.
object
Event 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 for the system and some gateways.
Display name, or null when it cannot be resolved.
Staff members only: their email. Null for every other actor.
When the event 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.
True when the order has more history than one response carries, so the oldest entries are missing.
Example
{ "entries": [ { "kind": "event", "event_type": "placed", "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"}