Events
Events are the audit log of significant state changes in a store — the same envelope Mercel POSTs to your subscribed webhook endpoints. Payloads are thin: every event carries {id, type, created, subject} where subject.url points at the resource. Follow the URL to retrieve the resource's current state.
The event object
The event object is the shape returned by endpoints in this collection. Its attributes are listed below.
Attributes
Time the event was emitted (ISO-8601).
Unique identifier for the event.
Event type, e.g. product.created. See the list of supported types in the Webhooks reference.
{ "created": "2026-01-01T00:00:00.000Z", "id": "evt_01HJZQK7XJ8R9YGEWABCDEFGHJK", "subject": { "id": "prd_01HJZQK7XJ8R9YGEWABCDEFGHJK", "type": "product", "url": "/v1/products/prd_01HJZQK7XJ8R9YGEWABCDEFGHJK" }, "type": "product.created"}List all events
Lists events emitted in the store, newest first. Webhook payloads are thin — they carry only an identifier in subject — so listing events is the way to enumerate what has happened. Follow subject.url on each item to retrieve the underlying resource. Uses the standard list envelope — see Pagination.
Path & query parameters
Maximum number of items to return per page. Defaults to 20, capped at 100.
Opaque pagination token. Pass the value returned in nextPageUrl / previousPageUrl rather than constructing one — the encoding is internal and may change.
Filter to a single event type (exact match).
Filter to events whose subject is of this type (e.g. product).
Filter to events about a single resource id. Pair with subjectType to scope safely.
curl -X GET "https://api.mercel.app/v1/events"{
"data": [
{
"created": "2019-08-24T14:15:22Z",
"id": "evt_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"subject": {
"id": "prd_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"type": "product",
"url": "/v1/products/prd_01HJZQK7XJ8R9YGEWABCDEFGHJK"
},
"type": "product.created"
}
],
"nextPageUrl": "http://example.com",
"previousPageUrl": "http://example.com"
}Retrieve an event
Retrieves a single event by id. The response is byte-identical to the body POSTed to subscribed webhook endpoints for the same event — use this to re-fetch, debug, or replay a delivery without setting up a public endpoint.
Path & query parameters
The id of the event.
curl -X GET "https://api.mercel.app/v1/events/evt_01hh9zzzzzzzzzzzzzzzzzzzzz"{
"created": "2019-08-24T14:15:22Z",
"id": "evt_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"subject": {
"id": "prd_01HJZQK7XJ8R9YGEWABCDEFGHJK",
"type": "product",
"url": "/v1/products/prd_01HJZQK7XJ8R9YGEWABCDEFGHJK"
},
"type": "product.created"
}