Check the stock sync and any required restart
All field references · Inventory
GET /v1/inventory/sync
Shows only the state of this connection: synced revision, retention floor, pending changes and an understandable error state. A missing state is not zero stock.
Required scopes: "inventory:read".
#Request body
No request body is defined for this operation.
#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.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.retention_floor | string | Required when parent is present | Not allowed | Oldest retained inventory revision; earlier cursors require a new snapshot. pattern: "^(0|[1-9]\\d{0,18})$". |
| data.last_reconciled_at | alternative (anyOf) | Required when parent is present | Allowed by schema | Time the stock synchronization was last reconciled. |
| data.last_reconciled_at | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Time the stock synchronization was last reconciled. format: "date-time". |
| data.last_reconciled_at | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Time the stock synchronization was last reconciled. |
| data.pending | boolean | Required when parent is present | Not allowed | Whether stock synchronization has pending work. |
| data.pending_since | alternative (anyOf) | Required when parent is present | Allowed by schema | Time the currently pending synchronization work began. |
| data.pending_since | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Time the currently pending synchronization work began. format: "date-time". |
| data.pending_since | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Time the currently pending synchronization work began. |
| data.last_error | alternative (anyOf) | Required when parent is present | Allowed by schema | Most recent synchronization error; null when no error is recorded. |
| data.last_error | string | Conditional: anyOf 1/2 | Not allowed | anyOf 1/2: At least one alternative must match. Most recent synchronization error; null when no error is recorded. enum: ["inventory_projection_too_large","inventory_reconcile_failed"]. |
| data.last_error | null | Conditional: anyOf 2/2 | Allowed by schema | anyOf 2/2: At least one alternative must match. Most recent synchronization error; null when no error is recorded. |
| data.active_snapshots | integer | Required when parent is present | Not allowed | Number of currently active inventory snapshots for this connection. minimum: 0. maximum: 10. |
| data.snapshot_ttl_seconds | number | Required when parent is present | Not allowed | Maximum lifetime of an inventory snapshot, in seconds. const: 3600. |
| data.retention_seconds | number | Required when parent is present | Not allowed | How long incremental changes remain available, in seconds. const: 604800. |
| data.max_items | number | Required when parent is present | Not allowed | Maximum number of entries a snapshot can contain. const: 5000. |
#Response 401, 403, 429, 500, 503
401: The key is missing, unknown, revoked or expired. 403: The key lacks a required scope, or the operation requires a live key. 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". |
Machine-readable version of this page: https://www.meykt.com/developers/fields-read-inventory-sync-status.md