Skip to content
ShopAssist Docs
APIAPI referenceCatalog Push API

Push Inventory

Per-location stock levels (the first accepted batch sets inventory.location_source = feed).

POST/v1/stores/{store_id}/catalog/inventory:batchScope catalog:write

Per-location stock levels (the first accepted batch sets `inventory.location_source = feed`).

Parameters

Parameters of Push Inventory
NameInTypeDescription
store_idrequiredpathstring
Idempotency-KeyrequiredheaderstringReplays return the original

Request body (InventoryBatch)

Request body of Push Inventory
FieldTypeDescription
as_ofstringformat date-time
levelsrequiredCatalogInventoryLevelInput[]CatalogInventoryLevelInput items (validated individually; invalid items are reported in rejected[])≥ 1 items · ≤ 500 items
levels[].availablerequiredinteger | null
levels[].location_external_idrequiredstring1–128 characters
levels[].skustring1–255 characters
levels[].status"in_stock" | "low_stock" | "out_of_stock" | "backorder" | "unknown"
levels[].variant_external_idstring1–128 characters

Example request

curl -X POST "https://api.shopassist.coec.dk/v1/stores/sto_01j8000000e008000000000000/catalog/inventory:batch" \
  -H "Authorization: Bearer $SHOPASSIST_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"as_of":"2026-09-28T10:15:30.123Z","levels":[{"available":1,"location_external_id":"string","sku":"string","status":"in_stock","variant_external_id":"string"}]}'

Response 202 (BatchAccepted)

Response of Push Inventory
FieldTypeDescription
acceptedrequiredinteger≥ 0
rejectedrequiredItemRejection[]
rejected[].errorrequiredItemError`{ code; message }` of a rejected item.
rejected[].error.coderequired"validation_error" | "currency_mismatch" | "duplicate_external_id" | "too_many_variants" | "url_not_allowed"
rejected[].error.messagerequiredstring
rejected[].indexrequiredinteger≥ 0
sync_run_idrequiredstringpattern `^sync_[0-9a-hjkmnp-tv-z]{26}$`
{
  "accepted": 0,
  "rejected": [
    {
      "error": {
        "code": "validation_error",
        "message": "string"
      },
      "index": 0
    }
  ],
  "sync_run_id": "sync_01j8000000e008000000000000"
}

Errors

Every error uses the error envelope; the code field is stable.

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
  • 409 Conflict
  • 413 Content Too Large
  • 422 Unprocessable Content
  • 429 Too Many Requests

Last updated on