Events
Everything that happens to an order is emitted as an event: pushed to your notify_url or queue as a webhook, replayable per order on demand, and resumable across your whole stream with the event feed. One tagged union of envelopes, both directions.
The order event envelope
Event shapes are a tagged union on event_type, with two fields common to every type: event_type and occurred_at. This table covers the order event envelope, carried by order.status_changed alone; see also the order event reference. The standalone types carry their own envelopes, defined with the type table below: an event about a catalog window or an ingest rejection has no order to identify.
| Field | Type | Description |
|---|---|---|
event_type required | string | What happened. See event types. |
order_id required | string | Platform order id. |
external_order_id required | string | The buyer's idempotency key, echoed on every event for the order. |
buyer_entity | string | The acting buyer, so a seller carrying several buyer organizations over one connection can attribute an event without a second lookup. Absent on an order booked before the field existed. See acting-buyer identity. |
seq required | integer | Per-order sequence number, strictly increasing. Retries reuse the same value. |
status required | enum | Order status after the transition. See order status. |
prior_status | enum | The status the transition left. Platform-computed, so it cannot disagree with the stream; optional only because events recorded before the field existed replay without one. A consumer holding one delivery can route on the transition (a cancellation with prior_status before placed landed before the seller approved) without replaying the history. |
substatus | string | Finer-grained progress marker; null unless the status carries one. |
units[] | array of object | Per-unit results when the transition carries them, and the transition's complete record of them: each entry carries unit_id, status (see unit status), num_accepted, reason, plus allocation (the {date, units} air dates, present when the transition decided them), and on a countered entry in_response_to (the unit_id the counter answers), counter ({week, unit_cost, num_offered}, the offer itself), and locked_rate_id (the quote commit the counter minted, per negotiation). The snapshot's line results are the fold of these entries, last write per unit. |
artifact | object | Attached payload when the transition produced one: parsed_io, validation_result, plan_proposal, placement_receipt, or delivery_post. A placement_receipt records only its own facts, seller_order_id and placed_at; its daylocks rows are a projection, flattened from the same event's units[].allocation (ordered by unit_id, then date), not a second record of the air dates. |
approval | object | The decision record, present on the transition a gate decision produced and absent otherwise: {gate, actor, decision, reason?}, where gate is seller_review on a seller's decide and needs_confirmation on a buyer's confirm, and decision is the derived outcome. See approval; the seller view's approvals[] is a projection of these records. |
creatives | array of object | {unit_id, creative_id, creative_code?, name?} per line, present whenever any line references a creative; absent when none does. The code and the name are snapshotted, not read live. See the order event. |
attachments | array of string | The upload_id list, present only on the transition into seller_review of an order carrying attachments. |
cancellation | object | Required on every status: "canceled" event, absent otherwise: the identical cancellation block {reason, actor, late_notice, notice?} the response returns and the snapshot folds. |
superseded_by | string | Only on the cancellation event a revision produces, naming the revision. |
error | object | Structured error on failed and rejected events; null otherwise. See Errors. |
occurred_at required | ISO datetime | When the transition happened. UTC, like every timestamp on the platform. |
{
"event_type": "order.status_changed",
"order_id": "ord_9f3a12c4b7e1",
"external_order_id": "q4-campaign-042",
"buyer_entity": "yourco",
"seq": 5,
"status": "placed",
"prior_status": "seller_review",
"substatus": null,
"units": [
{
"unit_id": "u-0001",
"status": "accepted",
"num_accepted": 10,
"reason": null,
"allocation": [
{ "date": "2026-10-05", "units": 4 },
{ "date": "2026-10-07", "units": 3 },
{ "date": "2026-10-09", "units": 3 }
]
},
{
"unit_id": "u-0002",
"status": "accepted",
"num_accepted": 10,
"reason": null,
"allocation": [
{ "date": "2026-10-06", "units": 10 }
]
}
],
"artifact": {
"name": "placement_receipt",
"seller_order_id": "ACME-77120",
"daylocks": [
{
"unit_id": "u-0001",
"date": "2026-10-05",
"units": 4
},
{
"unit_id": "u-0001",
"date": "2026-10-07",
"units": 3
},
{
"unit_id": "u-0001",
"date": "2026-10-09",
"units": 3
},
{
"unit_id": "u-0002",
"date": "2026-10-06",
"units": 10
}
],
"placed_at": "2026-10-02T14:41:09Z"
},
"approval": {
"gate": "seller_review",
"actor": "sales@acmebroadcasting.example",
"decision": "approve"
},
"error": null,
"occurred_at": "2026-10-02T14:41:09Z"
}
seq is per-order and strictly increasing, and retries reuse the same seq: dedup on (order_id, seq). Any single delivery can be dropped, delayed, or replayed. The stored event log is the record of the order, and the snapshot is authoritative because it is the platform's fold of that complete log. If deliveries are missed, recover from the order snapshot plus replay, or from the event feed across every order at once.Webhook deliveries are signed (X-Signature) and numbered (X-Delivery-Attempt); see verifying the signature.
Event types
Six types: one lifecycle type, one order-linked notice, and four standalone types, each with its own envelope.
One transition, one name. Every order lifecycle transition is order.status_changed, to both sides: an order entering seller_review is a single event with a single seq, and the buyer and the seller read the same type. Route on status and prior_status, and subscribe with a status filter. The retired per-audience names (order.needs_review, negotiation.offer, order.canceled) map onto status values; see the migration note below.
| Event type | Sent to | When |
|---|---|---|
order.status_changed | Buyer + Seller, per the eligibility matrix below | A status transition on an order, carrying status and prior_status. A queue arrival is status: "seller_review" (with the upload_id list when the order arrived with attachments); a buyer's negotiation response is status: "negotiating"; a cancellation is status: "canceled" with the cancellation block, and prior_status says whether it landed before your approval |
catalog.stale_rate_card | Buyer | A rate card update changed lines on your in-flight orders |
catalog.window_opened | Buyer (subscribed) | A discounted near-air window opened (remnant or opportunistic) with a signal payload |
avails.answered | Buyer | An on-request avails answer landed; carries the avails_request_id to correlate with the poll resource. Body also reports declined or expired |
catalog.integrity_failed | Seller | A catalog or rate-card update was rejected; conflict report attached |
settlement.invoice_issued | Buyer + Seller | An invoice was generated on a cleared trade |
The five non-lifecycle types are not order transitions, so there is no status for a filter to name. Each carries its own envelope beside the two common fields. None carries seq or status.
catalog.stale_rate_card is an order-linked notice, not an order-stream event. Its field set is {event_type, order_id, external_order_id, buyer_entity?, rate_version, superseded_by, drift[], occurred_at}, dedup on (order_id, superseded_by). It is absent from per-order replay; the drift is recomputable any time from the snapshot's locked prices against the live card.
catalog.window_opened carries {seller, product_id, week, window, signal?}, dedup on (product_id, window.opens). catalog.integrity_failed carries {seller, commit or drop id, conflict report}, dedup on the rejected commit or drop id. settlement.invoice_issued carries {invoice_id, order_id, external_order_id}, dedup on invoice_id. avails.answered carries {avails_request_id, seller_id, state, occurred_at}, dedup on avails_request_id, and is absent from order replay.
Who receives which transitions
Delivery and replay are audience-projected from one stored log. The matrix below states who is eligible for which transitions.
| Role | Receives (and replays) order.status_changed for |
|---|---|
| Buyer | Every transition on its own orders. |
| Seller | Transitions into seller_review (the queue arrival); transitions into negotiating made by the buyer (the seller's own counters are not delivered back to the seller); and transitions into canceled. Buyer-side intake traffic (submitted, validating, needs_confirmation, confirmed) is not seller-eligible, with the one exception in the row below. |
| Seller, briefs | Transitions into validating carrying substatus: "awaiting_plan": the brief-first queue arrival, where a brief waits for the seller's own plan. Admitted on the substatus alone: a catalog order's validating carries substatus: null and stays invisible to the seller. |
| Seller, cancellations | All cancellations, including those on a placed order, so a seller hears about a late cancellation. prior_status tells a pre-approval cancellation from a post-approval one. |
Replay under each credential returns that credential's eligible subset, so a replay shows a side no more than its deliveries did. Stored webhook registrations carrying retired type names keep working, migrated at read time: order.needs_review reads as events: ["order.status_changed"], statuses: ["seller_review"], negotiation.offer as statuses: ["negotiating"], order.canceled as statuses: ["canceled"]. Role does not travel in the filter: a registration belongs to a tenant whose role the platform knows, and eligibility applies before any filter does.
GET /v1/events: replay
GET/v1/eventsorders:write or orders:approve
Replay an order's event history: the recovery path when webhook deliveries are missed. The order snapshot carries last_seq; replay everything after your high-water mark and the loop is closed. Replay is per order; to resume your whole stream across every order at once, use the feed below. The order's seller may replay it too. Both sides read the same envelope: event_type, seq, status, and prior_status are identical for both.
Query parameters
| Field | Type | Description |
|---|---|---|
order required | string | The order_id to replay events for. |
after_seq | integer | Return events with seq greater than this value; 0 replays the full history. Default: 0. |
Response
Events in seq order, plus the order's current last_seq so you know when you are caught up. Replay re-shapes nothing. Each replayed item is the stored envelope with two fields removed: order_id and external_order_id, hoisted once to the top of the response. No other field is projected away: the conditional payloads (units, artifact, approval, creatives, attachments, cancellation, superseded_by, error) replay as they were delivered. Compare the second event below against the webhook example above: it is the same event, differing only by the two hoisted identifiers. Audience eligibility decides which events a credential replays, not what a replayed event contains.
Timestamps in these examples are illustrative. The sandbox stamps every event, receipt, and as_of at the moment of the call, so a response you get back carries today's instant rather than the one printed here. What the examples fix is the shape and the ordering: stamps on one order are strictly increasing, and two calls a minute apart are a minute apart in the log.
200 Response
{
"order_id": "ord_9f3a12c4b7e1",
"external_order_id": "q4-campaign-042",
"events": [
{
"event_type": "order.status_changed",
"buyer_entity": "yourco",
"seq": 1,
"status": "submitted",
"prior_status": "draft",
"substatus": null,
"artifact": null,
"error": null,
"occurred_at": "2026-10-01T14:02:11Z"
},
{
"event_type": "order.status_changed",
"buyer_entity": "yourco",
"seq": 5,
"status": "placed",
"prior_status": "seller_review",
"substatus": null,
"units": [
{
"unit_id": "u-0001",
"status": "accepted",
"num_accepted": 10,
"reason": null,
"allocation": [
{ "date": "2026-10-05", "units": 4 },
{ "date": "2026-10-07", "units": 3 },
{ "date": "2026-10-09", "units": 3 }
]
},
{
"unit_id": "u-0002",
"status": "accepted",
"num_accepted": 10,
"reason": null,
"allocation": [
{ "date": "2026-10-06", "units": 10 }
]
}
],
"artifact": {
"name": "placement_receipt",
"seller_order_id": "ACME-77120",
"daylocks": [
{
"unit_id": "u-0001",
"date": "2026-10-05",
"units": 4
},
{
"unit_id": "u-0001",
"date": "2026-10-07",
"units": 3
},
{
"unit_id": "u-0001",
"date": "2026-10-09",
"units": 3
},
{
"unit_id": "u-0002",
"date": "2026-10-06",
"units": 10
}
],
"placed_at": "2026-10-02T14:41:09Z"
},
"approval": {
"gate": "seller_review",
"actor": "sales@acmebroadcasting.example",
"decision": "approve"
},
"error": null,
"occurred_at": "2026-10-02T14:41:09Z"
}
],
"last_seq": 5
}
Errors
| Status | Code | When |
|---|---|---|
| 404 | NOT_FOUND | order does not exist within your scope. |
| 422 | INVALID_INPUT | order is missing, or after_seq is not a non-negative integer. |
GET /v1/events/feed: the resumable stream
GET/v1/events/feedorders:write or orders:approve
Your whole event stream, resumable. Webhooks are push-only, and per-order replay closes one order's gap at a time. The feed is the third read on the same stored log: every event a webhook would deliver to your credential, in the order they were recorded for you, from wherever you left off. Keep the returned cursor beside your high-water marks; recovery after an outage is one loop.
The feed carries what push delivery carries: all six event types, each in the same envelope a webhook delivers, with both order identifiers on lifecycle events (nothing is hoisted, because the feed spans orders). The standalone types that per-order replay excludes, catalog.stale_rate_card and avails.answered among them, do appear on the feed, when a webhook would have delivered them. Audience eligibility applies before anything else: each stream is its own eligible view of the platform's log.
The stream and its cursor belong to your organization and role, not to your token. There is one stream per organization per role, and the request names which one it reads. The role parameter selects the buyer or the seller stream, and the token must hold that role's order scope (orders:write for the buyer stream, orders:approve for the seller stream, per the scope table). A token whose scopes admit only one role may omit role and gets that stream. A token holding both scopes must say which stream it is reading. An organization on both sides of the marketplace has two streams that do not mix.
A cursor names a position in one stream, so it survives token refresh and signing-key rotation: any credential resolving to the same organization and role with the right scope resumes where the last one stopped. A cursor presented against a different organization's stream, the other role's stream, or one that was never issued answers the same 422 INVALID_INPUT as a malformed cursor, so a cursor cannot be borrowed across a tenant or role boundary or probed for validity (the same fail-closed posture as the credit lookup). If your eligibility changes while a cursor is held, the cursor stays valid, and reads from it apply current eligibility from that position forward. Per-order replay follows the same scope rule: the order's buyer replays under orders:write, its seller under orders:approve.
Least privilege holds inside the stream. The role's order scope admits you to the stream and its order.status_changed items. The non-lifecycle types also require the scope that governs their domain, and a token lacking it does not receive them: settlement.invoice_issued requires settlement:read; catalog.integrity_failed requires catalog:write; catalog.stale_rate_card, catalog.window_opened, and avails.answered require catalog:read. An orders-only token reads an orders-only feed; under a full-scope token the feed is what push delivery carries. Scope-skipped items behave like filter-skipped items: the returned cursor advances past them, and a later, broader token resuming from that cursor does not get them back.
orders:read is enough. An organization API key reads its own organization's stream and replays its own orders with orders:read; orders:write and orders:approve still work, because they include it. A key without an order scope cannot read the feed at all. Inside the stream, catalog.integrity_failed needs catalog:write or rates:write: the event does not say whether a catalog or a rate card was rejected, so either seller write scope receives the whole same-seller event. It grants no write. The other domain rules above are unchanged, and the cursor, its organization and seat boundary, and the envelopes are the same. The sandbox keeps the rules above as written: orders:write or orders:approve for the stream, catalog:write for integrity events.Query parameters
| Field | Type | Description |
|---|---|---|
role | enum | buyer or seller: which of your organization's streams this read addresses. Optional when the token's scopes admit only one role (that stream is the default); required when the token holds both orders:write and orders:approve, refused 422 INVALID_INPUT with details.field: "role" when omitted. Must match the stream a presented after cursor belongs to. |
after | string | The cursor a previous response returned; resumes immediately after it. Omit to start from the beginning of your retained stream. Opaque: store it and send it back; do not parse or construct one. |
events | array of string | Filter to specific event types, the same vocabulary the webhook registration takes. Omit for every type you are eligible for. |
statuses | array of string | Filter order.status_changed items to transitions landing in these statuses, with the webhook filter's semantics: narrows within eligibility, does not widen past it, ignored for the non-lifecycle types. |
limit | integer | Maximum items per page, 1 to 500. Default: 100. |
Response
Items in position order, plus the cursor to resume from and whether more is waiting. The feed re-shapes nothing: each item is the stored envelope as delivery carries it, every conditional payload included.
200 Response
{
"events": [
{
"event_type": "order.status_changed",
"order_id": "ord_9f3a12c4b7e1",
"external_order_id": "q4-campaign-042",
"buyer_entity": "yourco",
"seq": 1,
"status": "submitted",
"prior_status": "draft",
"substatus": null,
"artifact": null,
"error": null,
"occurred_at": "2026-10-01T14:02:11Z"
},
{
"event_type": "avails.answered",
"avails_request_id": "avr_7d21",
"seller_id": "acme",
"state": "answered",
"occurred_at": "2026-10-01T15:40:02Z"
}
],
"cursor": "evc_000000000217",
"has_more": false
}
| Field | Type | Description |
|---|---|---|
events required | array of object | The envelopes, verbatim. Dedup identities are unchanged: (order_id, seq) on order.status_changed, each standalone type's own key. The cursor is a position, not an identity. |
cursor required | string | The position after the last item scanned, filtered items included, so a later call with different filters does not re-deliver what an earlier filter skipped. Present on every response, an empty page included: a new subscriber that wants "from now on" pages once to the end and keeps the final cursor. |
has_more required | boolean | Whether events after cursor already exist. false means caught up as of this response, not that the stream ended: streams do not end, so poll or lean on webhooks and resume on demand. |
Positions are assigned by the commit, and the feed does not read past a gap. A position is minted by the committed write that records the event: the platform appends every event, lifecycle and standalone alike, to your stream transactionally with the event store, and a page serves only the contiguous committed prefix of the stream. Two events committing concurrently cannot cost you the earlier one: the feed will not serve position n+1, and your cursor will not pass it, while position n is still uncommitted. An event's position does not change once served, and new events only append. Events recorded before your stream first materializes are backfilled into it once, ordered by occurred_at, then event_type, then the variant's own dedup identity rendered canonically (order_id:seq for order.status_changed; order_id:superseded_by for the drift notice; product_id:window.opens for windows; avails_request_id; the rejected commit or drop id; invoice_id). That key is total, so ties on occurred_at break deterministically and a repeated backfill mints identical positions. Within one order the feed preserves seq order; across orders it is commit order.
Retention. Until GA the platform retains streams in full, so 410 CURSOR_EXPIRED is reserved and not answered today. The post-GA retention horizon is an open decision and lands on What's new before it takes effect. Expiry loses the push-shaped copy of history, not the state: every event type's durable state has an authoritative pull surface. Order lifecycle recovers by the order-book sweep plus per-order replay. Rate drift recomputes any time from the snapshot's locked prices against the live card. An avails answer stays readable on its request resource. Invoices list on each side's own surface, the buyer's at GET /v1/settlement/invoices and the seller's at GET /v1/me/settlement/invoices. A rejected catalog or card commit is re-checkable by re-publishing it (byte-identical publishes replay, and the same conflict report returns). A discounted window is readable on the catalog and avails it opened. Recover what you need, then resume from a fresh feed read.
Errors
| Status | Code | When |
|---|---|---|
| 410 | CURSOR_EXPIRED | after predates your retained stream. Reserved: preview streams are retained in full, and a horizon lands on the changelog before this is answered. Recovery per type is in the callout above. |
| 422 | INVALID_INPUT | after is not a cursor the addressed stream issued (another organization's cursor, or the other role's, answers this identically), role is omitted on a token holding both order scopes or names a role the token's scopes do not admit, limit is out of range, or a filter names an unknown type or status. |