Serialis public API
Serialized inventory for Shopify. Authentication: Authorization: Bearer srl_… API key created in the app (Settings › API keys), with scopes. Idempotency-Key is required on every POST (replayed 24 h, 409 when the body differs); If-Match with the ETag on the routes that change a versioned resource (412 when stale); cursor pagination (limit ≤ 250); errors as problem+json (RFC 9457) with a stable code; 20 requests per second per key with a burst of 100 (RateLimit-* headers, 429 with Retry-After). Additive changes without notice; an incompatible change is a new major version, the previous one kept 12 months.
Base URL: https://api.serialis.dev/v1. Machine-readable description: openapi.json (OpenAPI 3.1).
curl "https://api.serialis.dev/v1/units?limit=10" \
-H "Authorization: Bearer srl_…"tracked-items
GET /tracked-items
List tracked items.
Scope: units:read
| Parameter | In | Required | Description |
|---|---|---|---|
variant | query | no | Variant GID |
product | query | no | Product GID |
cursor | query | no | Opaque cursor returned as nextCursor by the previous page. |
limit | query | no | Page size, 1 to 250 (default 50). |
Response 200: TrackedItemPage. Errors (Problem): 400, 401, 403, 404, 422, 429.
POST /tracked-items
Activate (or deactivate with action: "untrack") the tracking of variants.
Scope: admin
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: TrackItemsRequest
Response 200: TrackedItemPage. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
units
GET /units
List units.
Scope: units:read
| Parameter | In | Required | Description |
|---|---|---|---|
variant | query | no | Variant GID |
location | query | no | Location GID |
state | query | no | One or more states, repeated or comma separated |
q | query | no | Identifier search (normalized) |
cursor | query | no | Opaque cursor returned as nextCursor by the previous page. |
limit | query | no | Page size, 1 to 250 (default 50). |
Response 200: UnitPage. Errors (Problem): 400, 401, 403, 404, 422, 429.
POST /units
Create one unit (same rules as the atomic batch).
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: CreateUnitRequest
Response 201: Unit. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
GET /units/{id}
Read a unit (ETag from its version).
Scope: units:read
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes |
Response 200: Unit. Errors (Problem): 400, 401, 403, 404, 422, 429.
POST /units/{id}/remove
Remove a ref for good (the unit leaves the stock and keeps its history; the ref can be entered again).
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
If-Match | header | no | ETag of the resource read before the change. |
Body: RemoveUnitRequest
Response 200: Unit. Errors (Problem): 400, 401, 403, 404, 409, 412, 422, 429.
POST /units/batch
Create up to 1,000 units of one variant at one location (atomic or per item).
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: CreateUnitsBatchRequest
Response 201: CreateUnitsBatchResponse. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
POST /units/batch/check
Check a batch without writing anything.
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: CreateUnitsBatchRequest
Response 200: CheckUnitsBatchResponse. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
GET /units/{id}/events
History of a unit.
Scope: units:read
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
cursor | query | no | Opaque cursor returned as nextCursor by the previous page. |
limit | query | no | Page size, 1 to 250 (default 50). |
Response 200: UnitEventPage. Errors (Problem): 400, 401, 403, 404, 422, 429.
lookup
GET /lookup
Find a unit by any identifier.
Scope: units:read
| Parameter | In | Required | Description |
|---|---|---|---|
identifier | query | yes | Identifier value |
Response 200: LookupResponse. Errors (Problem): 400, 401, 403, 404, 422, 429.
orders
GET /orders/{orderId}/allocations
Units of an order, line by line.
Scope: allocations:read
| Parameter | In | Required | Description |
|---|---|---|---|
orderId | path | yes |
Response 200: OrderAllocationsResponse. Errors (Problem): 400, 401, 403, 404, 422, 429.
allocations
POST /allocations
Allocate a unit to an order line.
Scope: allocations:write
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: CreateAllocationRequest
Response 201: Allocation. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
DELETE /allocations/{id}
Remove an allocated unit before shipping.
Scope: allocations:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
If-Match | header | no | ETag of the resource read before the change. |
Response 204: no content. Errors (Problem): 400, 401, 403, 404, 412, 422, 429.
POST /allocations/{id}/replace
Replace an allocated unit.
Scope: allocations:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
If-Match | header | no | ETag of the resource read before the change. |
Body: ReplaceAllocationRequest
Response 201: Allocation. Errors (Problem): 400, 401, 403, 404, 409, 412, 422, 429.
POST /allocations/{id}/confirm-shipped
Designate the unit really shipped.
Scope: allocations:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
If-Match | header | no | ETag of the resource read before the change. |
Body: ConfirmShippedRequest
Response 200: Allocation. Errors (Problem): 400, 401, 403, 404, 409, 412, 422, 429.
returns
POST /returns/{returnId}/identify
Identify the unit received in a return.
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
returnId | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: IdentifyReturnRequest
Response 202: no content. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
anomalies
GET /anomalies
List anomalies.
Scope: anomalies:read
| Parameter | In | Required | Description |
|---|---|---|---|
status | query | no | open, acknowledged or resolved |
severity | query | no | critical, warning or info |
type | query | no | Anomaly type (12.7) |
cursor | query | no | Opaque cursor returned as nextCursor by the previous page. |
limit | query | no | Page size, 1 to 250 (default 50). |
Response 200: AnomalyPage. Errors (Problem): 400, 401, 403, 404, 422, 429.
POST /anomalies/{id}/acknowledge
Acknowledge an anomaly.
Scope: anomalies:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Response 200: Anomaly. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
POST /anomalies/{id}/resolve
Resolve an anomaly (a resolution that writes the Shopify stock requires the admin scope).
Scope: anomalies:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: ResolveAnomalyRequest
Response 200: Anomaly. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
locations
GET /locations
Locations known to the app.
Scope: units:read
Response 200: LocationPage. Errors (Problem): 400, 401, 403, 404, 422, 429.
settings
GET /settings
Settings of a scope with their origin.
Scope: admin
| Parameter | In | Required | Description |
|---|---|---|---|
scope | query | no | shop, location:<id> or tracked_item:<id> |
Response 200: SettingsResponse. Errors (Problem): 400, 401, 403, 404, 422, 429.
PATCH /settings
Change settings.
Scope: admin
| Parameter | In | Required | Description |
|---|---|---|---|
If-Match | header | no | ETag of the resource read before the change. |
Body: PatchSettingsRequest
Response 200: SettingsResponse. Errors (Problem): 400, 401, 403, 404, 412, 422, 429.
POST /settings/simulate
Simulate a change of "simulation" settings (id valid 10 minutes).
Scope: admin
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: SimulateSettingsRequest
Response 200: SettingsSimulation. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
imports
POST /imports
Simulate a CSV import.
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Body: CreateImportRequest
Response 201: ImportReport. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
GET /imports/{id}
Import report.
Scope: units:read
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes |
Response 200: ImportReport. Errors (Problem): 400, 401, 403, 404, 422, 429.
POST /imports/{id}/confirm
Confirm a simulated import.
Scope: units:write
| Parameter | In | Required | Description |
|---|---|---|---|
id | path | yes | |
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Response 200: ImportReport. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
automation
POST /automation/pause
Emergency stop: suspend automatic allocation.
Scope: admin
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Response 200: AutomationStateResponse. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
POST /automation/resume
Resume automatic allocation.
Scope: admin
| Parameter | In | Required | Description |
|---|---|---|---|
Idempotency-Key | header | yes | 1 to 255 characters; the response is replayed for 24 h. |
Response 200: AutomationStateResponse. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.
Schemas
Problem
| Field | Type | Required |
|---|---|---|
type | string | yes |
title | string | yes |
status | integer | yes |
code | unauthenticated | forbidden | not_found | validation_failed | idempotency_conflict | precondition_failed | rate_limited | unit_not_available | identifier_conflict | invalid_transition | variant_mismatch | location_mismatch | ambiguous_ref | unknown_ref | not_tracked | emergency_stop | simulation_expired | incompatible_settings | yes |
detail | string | no |
errors | array of object | no |
errors[].index | integer | no |
errors[].field | string | no |
errors[].code | unauthenticated | forbidden | not_found | validation_failed | idempotency_conflict | precondition_failed | rate_limited | unit_not_available | identifier_conflict | invalid_transition | variant_mismatch | location_mismatch | ambiguous_ref | unknown_ref | not_tracked | emergency_stop | simulation_expired | incompatible_settings | yes |
errors[].detail | string | no |
Identifier
| Field | Type | Required |
|---|---|---|
id | string | yes |
type | string | yes |
value | string | yes |
primary | boolean | yes |
Unit
| Field | Type | Required |
|---|---|---|
id | string | yes |
variantGid | string | yes |
locationId | string | null | yes |
state | INCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKED | yes |
identifiers | array of Identifier | yes |
ref | string | yes |
receivedAt | string (date-time) | null | yes |
orderGid | string | null | yes |
orderName | string | null | yes |
version | integer | yes |
createdAt | string (date-time) | yes |
updatedAt | string (date-time) | yes |
UnitPage
| Field | Type | Required |
|---|---|---|
items | array of Unit | yes |
nextCursor | string | null | yes |
CreateUnitRequest
| Field | Type | Required |
|---|---|---|
variantGid | string | yes |
locationId | string | yes |
ref | string | yes |
alreadyCounted | boolean | no |
CreateUnitsBatchRequest
| Field | Type | Required |
|---|---|---|
variantGid | string | yes |
locationId | string | yes |
refs | array of string | yes |
alreadyCounted | boolean | yes |
mode | atomic | per_item | no |
CreateUnitsBatchResponse
| Field | Type | Required |
|---|---|---|
created | array of Unit | yes |
rejected | array of object | yes |
rejected[].index | integer | yes |
rejected[].ref | string | yes |
rejected[].code | unauthenticated | forbidden | not_found | validation_failed | idempotency_conflict | precondition_failed | rate_limited | unit_not_available | identifier_conflict | invalid_transition | variant_mismatch | location_mismatch | ambiguous_ref | unknown_ref | not_tracked | emergency_stop | simulation_expired | incompatible_settings | yes |
rejected[].detail | string | no |
CheckUnitsBatchResponse
| Field | Type | Required |
|---|---|---|
rows | array of object | yes |
rows[].index | integer | yes |
rows[].ref | string | yes |
rows[].status | ready | duplicate_in_list | already_known | invalid_format | beyond_gap | yes |
rows[].detail | string | no |
ready | integer | yes |
stockWrite | integer | yes |
gapBefore | integer | null | yes |
LookupResponse
| Field | Type | Required |
|---|---|---|
unit | Unit | null | yes |
UnitEvent
| Field | Type | Required |
|---|---|---|
id | string | yes |
at | string (date-time) | yes |
actor | string | yes |
type | string | yes |
fromState | INCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKED | null | yes |
toState | INCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKED | null | yes |
reason | string | null | yes |
stockEffect | string | null | yes |
stockDelta | integer | null | no |
stockQuantity | string | null | no |
UnitEventPage
| Field | Type | Required |
|---|---|---|
items | array of UnitEvent | yes |
nextCursor | string | null | yes |
TrackedItem
| Field | Type | Required |
|---|---|---|
variantGid | string | yes |
productGid | string | yes |
title | string | yes |
variantTitle | string | null | yes |
sku | string | null | yes |
mode | interchangeable | yes |
initializing | boolean | yes |
activatedAt | string (date-time) | yes |
stock | array of object | yes |
stock[].locationId | string | yes |
stock[].shopifyOnHand | integer | yes |
stock[].registeredUnits | integer | yes |
stock[].availableUnits | integer | yes |
stock[].toRegister | integer | no |
TrackedItemPage
| Field | Type | Required |
|---|---|---|
items | array of TrackedItem | yes |
nextCursor | string | null | yes |
TrackItemsRequest
| Field | Type | Required |
|---|---|---|
action | track | untrack | no |
variantGids | array of string | yes |
applyToOpenOrders | boolean | no |
Allocation
| Field | Type | Required |
|---|---|---|
id | string | yes |
unitId | string | yes |
ref | string | yes |
orderGid | string | yes |
lineItemGid | string | yes |
variantGid | string | yes |
locationId | string | yes |
status | active | fulfilled | released | returned | yes |
source | auto | pick | pos | draft | api | late | migration | yes |
toConfirm | boolean | yes |
allocatedAt | string (date-time) | yes |
unitState | INCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKED | yes |
OrderAllocationsResponse
| Field | Type | Required |
|---|---|---|
orderGid | string | yes |
lines | array of object | yes |
lines[].lineItemGid | string | yes |
lines[].variantGid | string | yes |
lines[].title | string | yes |
lines[].tracked | boolean | yes |
lines[].quantity | integer | yes |
lines[].orderedQuantity | integer | yes |
lines[].allocations | array of Allocation | yes |
lines[].missing | integer | yes |
syncState | pending | synced | error | yes |
syncedAt | string (date-time) | null | yes |
automationPaused | boolean | no |
toVerify | array of object | no |
toVerify[].anomalyId | string | yes |
toVerify[].unitId | string | yes |
toVerify[].ref | string | yes |
toVerify[].lineItemGid | string | null | yes |
toVerify[].canRestock | boolean | yes |
questions | array of OrderQuestion | no |
OrderQuestion
| Field | Type | Required |
|---|---|---|
kind | removed | shipped | returned | yes |
anomalyId | string | yes |
action | designate_removed | confirm_shipped | identify | yes |
lineItemGid | string | null | yes |
quantity | integer | yes |
restocked | boolean | no |
candidates | array of object | yes |
candidates[].unitId | string | yes |
candidates[].ref | string | yes |
CreateAllocationRequest
| Field | Type | Required |
|---|---|---|
orderGid | string | yes |
lineItemGid | string | yes |
unitId | string | no |
ref | string | no |
ReplaceAllocationRequest
| Field | Type | Required |
|---|---|---|
unitId | string | no |
ref | string | no |
ConfirmShippedRequest
| Field | Type | Required |
|---|---|---|
ref | string | yes |
RemoveUnitRequest
| Field | Type | Required |
|---|---|---|
adjustStock | boolean | no |
IdentifyReturnRequest
| Field | Type | Required |
|---|---|---|
returnLineItemGid | string | yes |
ref | string | yes |
Anomaly
| Field | Type | Required |
|---|---|---|
id | string | yes |
type | string | yes |
severity | critical | warning | info | yes |
status | open | acknowledged | resolved | yes |
orderGid | string | null | yes |
orderName | string | null | yes |
variantGid | string | null | yes |
unitId | string | null | yes |
locationId | string | null | yes |
summary | string | yes |
actions | array of object | yes |
actions[].action | string | yes |
actions[].label | string | yes |
actions[].writesStock | boolean | yes |
actions[].needsRef | boolean | yes |
openedAt | string (date-time) | yes |
resolvedAt | string (date-time) | null | yes |
remaining | integer | yes |
AnomalyPage
| Field | Type | Required |
|---|---|---|
items | array of Anomaly | yes |
nextCursor | string | null | yes |
ResolveAnomalyRequest
| Field | Type | Required |
|---|---|---|
action | string | yes |
params | object | no |
Location
| Field | Type | Required |
|---|---|---|
id | string | yes |
name | string | yes |
active | boolean | yes |
LocationPage
| Field | Type | Required |
|---|---|---|
items | array of Location | yes |
nextCursor | string | null | yes |
SettingValue
| Field | Type | Required |
|---|---|---|
key | string | yes |
value | string | number | boolean | yes |
origin | default | shop | location | tracked_item | fixed | yes |
changeRule | immediate | simulation | yes |
SettingsResponse
| Field | Type | Required |
|---|---|---|
scope | string | yes |
values | array of SettingValue | yes |
SimulateSettingsRequest
| Field | Type | Required |
|---|---|---|
scope | string | yes |
values | map of string | number | boolean | null | yes |
PatchSettingsRequest
| Field | Type | Required |
|---|---|---|
scope | string | yes |
values | map of string | number | boolean | null | yes |
simulationId | string | no |
SettingsSimulation
| Field | Type | Required |
|---|---|---|
simulationId | string | yes |
expiresAt | string (date-time) | yes |
effects | array of object | yes |
effects[].key | string | yes |
effects[].count | integer | yes |
effects[].summary | string | yes |
warnings | array of string | yes |
CreateImportRequest
| Field | Type | Required |
|---|---|---|
filename | string | no |
csv | string | yes |
ImportReport
| Field | Type | Required |
|---|---|---|
id | string | yes |
status | simulated | confirmed | failed | yes |
rows | integer | yes |
valid | integer | yes |
errors | array of object | yes |
errors[].row | integer | yes |
errors[].code | unauthenticated | forbidden | not_found | validation_failed | idempotency_conflict | precondition_failed | rate_limited | unit_not_available | identifier_conflict | invalid_transition | variant_mismatch | location_mismatch | ambiguous_ref | unknown_ref | not_tracked | emergency_stop | simulation_expired | incompatible_settings | yes |
errors[].detail | string | yes |
beyondGap | integer | no |
stockWrites | integer | no |
AutomationStateResponse
| Field | Type | Required |
|---|---|---|
emergencyStop | boolean | yes |