Skip to content
snapcasterDevelopers

InventoryAdjustedEvent

Reusable InventoryAdjustedEvent schema.

Type: object

Fields

FieldTypeConstraintsMeaningExample
event_idrequiredstringNoneGlobally unique, stable across retries; the idempotency/dedup key (STABLE).string (generated)
typerequiredstringallowed values: inventory.adjustedEvent discriminator; future inventory events reuse this envelope (STABLE).inventory.adjusted (generated)
created_atrequiredstringNoneISO-8601 UTC instant the event was generated; unchanged across retries (STABLE).string (generated)
datarequiredobjectNoneThe operation or event payload.{ "seller_id": 0, "lines": [ { "sku_id": 0, "external_ref": "string", "delta": 0 } ] } (generated)
data.seller_idrequiredintegerNoneRouting target: the Seller that owns the inbound API key (STABLE).0 (generated)
data.linesrequiredarray of objectminimum items: 1All of one Order's adjustment lines: one event, one `event_id`, per sale (STABLE).[ { "sku_id": 0, "external_ref": "string", "delta": 0 } ] (generated)
data.lines[].sku_idrequiredintegerNoneCanonical TCGplayer sku id, the same id the listing push uses (STABLE).0 (generated)
data.lines[].external_refrequiredstring or nullNoneEcho of the Seller's opaque listing ref, untouched, so the delta applies against the Platform's own product id; null if the Listing carried none (STABLE).string (generated)
data.lines[].deltarequiredintegerNoneSigned unit adjustment: negative commits units (a sale), positive releases them (a cancellation/refund). Apply idempotently as `on_hand += delta` (STABLE).0 (generated)
data.reasonstringallowed values: sale, cancellation, refund, correctionWhy the stock moved; attribution only, not required to apply the delta. The enum may gain values, so branch leniently (PROVISIONAL).sale (generated)
data.order_refstringNoneOpaque Order attribution for support/debugging; a pure POS can ignore it (PROVISIONAL).string (generated)
api_versionrequiredstringallowed values: 2026-07The dated partner API version this payload was serialized at: the version frozen when the delivery was enqueued (never the live pin), so every retry carries the same value and byte-identical bytes. Added additively per the tolerant-reader rule; see https://developers.snapcaster.ca/guide/api-versioning (STABLE).2026-07 (generated)

Examples

Generated Schema example: Generated InventoryAdjustedEvent
{
"event_id": "string",
"type": "inventory.adjusted",
"created_at": "string",
"data": {
"seller_id": 0,
"lines": [
{
"sku_id": 0,
"external_ref": "string",
"delta": 0
}
]
},
"api_version": "2026-07"
}

Source commit: 64bff06fe339e6ffa0ef24cd7da55cb3efefefb9