Skip to main content

Push inventory

POST 

/api/v1/ingest/inventory

Send price and stock per product and store.

Keys are snake_case. A row without location_ref is the product’s general row: its price and stock wherever a store has none of its own. Rows may name products and stores that have not arrived yet; they attach when those land.

A row replaces its stored price and stock, so send every value you want kept. What a missing row means depends on the source’s coverage; see Stores and inventory.

Payload at a glance​

{
// required · The price and stock rows
"inventory": [
{
// required · The product id from your catalog
"product_external_id": "P30001",
// optional · Your store code
"location_ref": "STORE-012",
// optional · Price at this store
"price": 124.99,
// optional · Currency of both prices
"currency": "AED",
// optional · Units available
"stock": 8,
// optional · Whether the product can be bought here right now
"availability": "in_stock"
},
// … 1 more
]
}

Every field, with types and formats, is listed under Body below.

Limits

  • At most 10,000 records and 10 MiB per request.
  • Up to 5 pushes a second per API key, with bursts of 50. Reading jobs is not limited.
  • Every push is an upsert: a record replaces its row’s content, so send every field you want kept. Nothing is deleted; deactivate with a status.

Errors

StatusMessageWhat it means
400invalid_body: …The body is not JSON, the list is missing, or a field has the wrong JSON type (e.g. "price": "4.5").
400items_requiredThe list is empty.
400max_10000_items_per_requestMore than 10,000 records. Split the push.
401missing token · invalid token · expired tokenNo key, an unknown key, or an expired one.
403missing scope: integrationThe key lacks the integration scope.
409idempotency_key_payload_mismatchThis Idempotency-Key was used before with a different body.
409source_not_activeThis entity’s push source is paused in the console.
413payload_read_errorThe body is over 10 MiB.
429rate_limitedMore than 5 pushes a second on this key. Wait for Retry-After seconds.
503workflow_unavailable · staging_unavailable · …A temporary failure. Retry with the same Idempotency-Key.
jobprojection_row_rejectedA row without a product id, or with a stock that is not a whole number.

Request​

Responses​

Accepted. The push is taken as a job. Poll pollUrl for its progress and counts. Records are validated while the job runs.