# Prepare a complete stock snapshot for an initial sync

[All field references](/en/developers/field-reference) · [Inventory](/en/developers/fields-group-inventory)

`POST /v1/inventory/snapshots`

Creates a frozen snapshot of the stock you are permitted to see, valid for one hour. The same request_id restores the same receipt after a lost response. Apply all pages, then continue with delta_cursor. Does not book any goods.

Required scopes: `"inventory:read"`.

[How to read these tables](/en/developers/field-reference#reading-the-field-tables)

## Request body

Request body required.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| request_id | string | Required when parent is present | Not allowed | Reuse the same UUID after a lost response. An expired snapshot requires a new request UUID. Request identities are kept for seven days after expiry. format: `"uuid"`. |

## Response 200

200: Success

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | Additional properties are not allowed. |
| data | object | Required when parent is present | Not allowed | Authorized response payload or documented event data. Additional properties are not allowed. |
| data.environment | string | Required when parent is present | Not allowed | Key environment: live for real operations or test for the endpoint's documented test behavior. enum: `["live","test"]`. |
| data.snapshot_id | string | Required when parent is present | Not allowed | Identifier of the frozen stock snapshot; retain it for all subsequent pages. format: `"uuid"`. |
| data.contract_version | string | Required when parent is present | Not allowed | Published contract version used for this representation. const: `"inventory-snapshot-v1"`. |
| data.revision | string | Required when parent is present | Not allowed | Inventory revision as an exact integer string; never round or convert through floating-point numbers. pattern: `"^(0\|[1-9]\\d{0,18})$"`. |
| data.created_at | string | Required when parent is present | Not allowed | Created at, with time-zone offset. format: `"date-time"`. |
| data.expires_at | string | Required when parent is present | Not allowed | Time after which this snapshot or token can no longer be used. format: `"date-time"`. |
| data.item_count | integer | Required when parent is present | Not allowed | Number of inventory entries captured in this snapshot. minimum: `0`. maximum: `5000`. |
| data.cursor | string | Required when parent is present | Not allowed | Cursor for the first page of this frozen snapshot; continue with each returned next_cursor. maxLength: `41`. pattern: `"^(0\|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:(0\|[1-9]\\d{0,3}))$"`. |
| data.delta_cursor | string | Required when parent is present | Not allowed | Cursor from which to continue incremental changes after completing the snapshot. maxLength: `80`. pattern: `"^(0\|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}:(0\|[1-9]\\d{0,18})(:(0\|[1-9]\\d{0,18}))?)$"`. |

## Response 400, 401, 403, 404, 409, 413, 422, 429, 500, 503

400: The request is not valid JSON. 401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 404: Not found. Also applies to IDs that belong to another organization — we deliberately do not distinguish between "does not exist" and "does not belong to you". 409: The same ID already exists with different content. It is never overwritten. 413: The JSON request exceeds 256 KiB. 422: Content validation failed. The response lists all affected locations at once. 429: A rate limit was reached and the request did not run. Wait for Retry-After, then repeat it unchanged. X-RateLimit-Scope names the limit: key (120 requests per minute), organization (300 per minute across all keys), write (1,000 at once, refilling at 60 per minute) or list (300 unfiltered list pages at once, refilling at 10 per minute). 500: Unexpected error on our side. 503: Temporarily unavailable. Repeat the same request with the same business identity.

Content type: `application/json`

| Field | Type | Presence | null | Meaning, limits and examples |
| --- | --- | --- | --- | --- |
| $ (whole value) | object | Whole value | Not allowed | — |
| error | object | Required when parent is present | Not allowed | Machine-readable error code; use it to select the documented recovery path. |
| error.code | string | Required when parent is present | Not allowed | Machine-readable, permanently stable error code. Program against it, not against message. |
| error.message | string | Required when parent is present | Not allowed | Explanation for humans. May change at any time. |
| error.field | string | Optional | Not allowed | Affected location in the request, if it can be determined. |
| error.doc_url | string | Required when parent is present | Not allowed | Documentation link explaining this API error. format: `"uri"`. |
