Serialis

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

ParameterInRequiredDescription
variantquerynoVariant GID
productquerynoProduct GID
cursorquerynoOpaque cursor returned as nextCursor by the previous page.
limitquerynoPage 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
variantquerynoVariant GID
locationquerynoLocation GID
statequerynoOne or more states, repeated or comma separated
qquerynoIdentifier search (normalized)
cursorquerynoOpaque cursor returned as nextCursor by the previous page.
limitquerynoPage 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
idpathyes

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

ParameterInRequiredDescription
idpathyes
Idempotency-Keyheaderyes1 to 255 characters; the response is replayed for 24 h.
If-MatchheadernoETag 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
idpathyes
cursorquerynoOpaque cursor returned as nextCursor by the previous page.
limitquerynoPage 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

ParameterInRequiredDescription
identifierqueryyesIdentifier 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

ParameterInRequiredDescription
orderIdpathyes

Response 200: OrderAllocationsResponse. Errors (Problem): 400, 401, 403, 404, 422, 429.

allocations

POST /allocations

Allocate a unit to an order line.

Scope: allocations:write

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
idpathyes
If-MatchheadernoETag 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

ParameterInRequiredDescription
idpathyes
Idempotency-Keyheaderyes1 to 255 characters; the response is replayed for 24 h.
If-MatchheadernoETag 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

ParameterInRequiredDescription
idpathyes
Idempotency-Keyheaderyes1 to 255 characters; the response is replayed for 24 h.
If-MatchheadernoETag 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

ParameterInRequiredDescription
returnIdpathyes
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
statusquerynoopen, acknowledged or resolved
severityquerynocritical, warning or info
typequerynoAnomaly type (12.7)
cursorquerynoOpaque cursor returned as nextCursor by the previous page.
limitquerynoPage 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

ParameterInRequiredDescription
idpathyes
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
idpathyes
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
scopequerynoshop, location:<id> or tracked_item:<id>

Response 200: SettingsResponse. Errors (Problem): 400, 401, 403, 404, 422, 429.

PATCH /settings

Change settings.

Scope: admin

ParameterInRequiredDescription
If-MatchheadernoETag 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
idpathyes

Response 200: ImportReport. Errors (Problem): 400, 401, 403, 404, 422, 429.

POST /imports/{id}/confirm

Confirm a simulated import.

Scope: units:write

ParameterInRequiredDescription
idpathyes
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 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

ParameterInRequiredDescription
Idempotency-Keyheaderyes1 to 255 characters; the response is replayed for 24 h.

Response 200: AutomationStateResponse. Errors (Problem): 400, 401, 403, 404, 409, 422, 429.

Schemas

Problem

FieldTypeRequired
typestringyes
titlestringyes
statusintegeryes
codeunauthenticated | 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_settingsyes
detailstringno
errorsarray of objectno
errors[].indexintegerno
errors[].fieldstringno
errors[].codeunauthenticated | 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_settingsyes
errors[].detailstringno

Identifier

FieldTypeRequired
idstringyes
typestringyes
valuestringyes
primarybooleanyes

Unit

FieldTypeRequired
idstringyes
variantGidstringyes
locationIdstring | nullyes
stateINCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKEDyes
identifiersarray of Identifieryes
refstringyes
receivedAtstring (date-time) | nullyes
orderGidstring | nullyes
orderNamestring | nullyes
versionintegeryes
createdAtstring (date-time)yes
updatedAtstring (date-time)yes

UnitPage

FieldTypeRequired
itemsarray of Unityes
nextCursorstring | nullyes

CreateUnitRequest

FieldTypeRequired
variantGidstringyes
locationIdstringyes
refstringyes
alreadyCountedbooleanno

CreateUnitsBatchRequest

FieldTypeRequired
variantGidstringyes
locationIdstringyes
refsarray of stringyes
alreadyCountedbooleanyes
modeatomic | per_itemno

CreateUnitsBatchResponse

FieldTypeRequired
createdarray of Unityes
rejectedarray of objectyes
rejected[].indexintegeryes
rejected[].refstringyes
rejected[].codeunauthenticated | 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_settingsyes
rejected[].detailstringno

CheckUnitsBatchResponse

FieldTypeRequired
rowsarray of objectyes
rows[].indexintegeryes
rows[].refstringyes
rows[].statusready | duplicate_in_list | already_known | invalid_format | beyond_gapyes
rows[].detailstringno
readyintegeryes
stockWriteintegeryes
gapBeforeinteger | nullyes

LookupResponse

FieldTypeRequired
unitUnit | nullyes

UnitEvent

FieldTypeRequired
idstringyes
atstring (date-time)yes
actorstringyes
typestringyes
fromStateINCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKED | nullyes
toStateINCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKED | nullyes
reasonstring | nullyes
stockEffectstring | nullyes
stockDeltainteger | nullno
stockQuantitystring | nullno

UnitEventPage

FieldTypeRequired
itemsarray of UnitEventyes
nextCursorstring | nullyes

TrackedItem

FieldTypeRequired
variantGidstringyes
productGidstringyes
titlestringyes
variantTitlestring | nullyes
skustring | nullyes
modeinterchangeableyes
initializingbooleanyes
activatedAtstring (date-time)yes
stockarray of objectyes
stock[].locationIdstringyes
stock[].shopifyOnHandintegeryes
stock[].registeredUnitsintegeryes
stock[].availableUnitsintegeryes
stock[].toRegisterintegerno

TrackedItemPage

FieldTypeRequired
itemsarray of TrackedItemyes
nextCursorstring | nullyes

TrackItemsRequest

FieldTypeRequired
actiontrack | untrackno
variantGidsarray of stringyes
applyToOpenOrdersbooleanno

Allocation

FieldTypeRequired
idstringyes
unitIdstringyes
refstringyes
orderGidstringyes
lineItemGidstringyes
variantGidstringyes
locationIdstringyes
statusactive | fulfilled | released | returnedyes
sourceauto | pick | pos | draft | api | late | migrationyes
toConfirmbooleanyes
allocatedAtstring (date-time)yes
unitStateINCOMING | AVAILABLE | HELD | ALLOCATED | QUALITY_CONTROL | DAMAGED | IN_TRANSIT | SHIPPED | RETURN_PENDING | TO_VERIFY | LOST | SCRAPPED | UNTRACKEDyes

OrderAllocationsResponse

FieldTypeRequired
orderGidstringyes
linesarray of objectyes
lines[].lineItemGidstringyes
lines[].variantGidstringyes
lines[].titlestringyes
lines[].trackedbooleanyes
lines[].quantityintegeryes
lines[].orderedQuantityintegeryes
lines[].allocationsarray of Allocationyes
lines[].missingintegeryes
syncStatepending | synced | erroryes
syncedAtstring (date-time) | nullyes
automationPausedbooleanno
toVerifyarray of objectno
toVerify[].anomalyIdstringyes
toVerify[].unitIdstringyes
toVerify[].refstringyes
toVerify[].lineItemGidstring | nullyes
toVerify[].canRestockbooleanyes
questionsarray of OrderQuestionno

OrderQuestion

FieldTypeRequired
kindremoved | shipped | returnedyes
anomalyIdstringyes
actiondesignate_removed | confirm_shipped | identifyyes
lineItemGidstring | nullyes
quantityintegeryes
restockedbooleanno
candidatesarray of objectyes
candidates[].unitIdstringyes
candidates[].refstringyes

CreateAllocationRequest

FieldTypeRequired
orderGidstringyes
lineItemGidstringyes
unitIdstringno
refstringno

ReplaceAllocationRequest

FieldTypeRequired
unitIdstringno
refstringno

ConfirmShippedRequest

FieldTypeRequired
refstringyes

RemoveUnitRequest

FieldTypeRequired
adjustStockbooleanno

IdentifyReturnRequest

FieldTypeRequired
returnLineItemGidstringyes
refstringyes

Anomaly

FieldTypeRequired
idstringyes
typestringyes
severitycritical | warning | infoyes
statusopen | acknowledged | resolvedyes
orderGidstring | nullyes
orderNamestring | nullyes
variantGidstring | nullyes
unitIdstring | nullyes
locationIdstring | nullyes
summarystringyes
actionsarray of objectyes
actions[].actionstringyes
actions[].labelstringyes
actions[].writesStockbooleanyes
actions[].needsRefbooleanyes
openedAtstring (date-time)yes
resolvedAtstring (date-time) | nullyes
remainingintegeryes

AnomalyPage

FieldTypeRequired
itemsarray of Anomalyyes
nextCursorstring | nullyes

ResolveAnomalyRequest

FieldTypeRequired
actionstringyes
paramsobjectno

Location

FieldTypeRequired
idstringyes
namestringyes
activebooleanyes

LocationPage

FieldTypeRequired
itemsarray of Locationyes
nextCursorstring | nullyes

SettingValue

FieldTypeRequired
keystringyes
valuestring | number | booleanyes
origindefault | shop | location | tracked_item | fixedyes
changeRuleimmediate | simulationyes

SettingsResponse

FieldTypeRequired
scopestringyes
valuesarray of SettingValueyes

SimulateSettingsRequest

FieldTypeRequired
scopestringyes
valuesmap of string | number | boolean | nullyes

PatchSettingsRequest

FieldTypeRequired
scopestringyes
valuesmap of string | number | boolean | nullyes
simulationIdstringno

SettingsSimulation

FieldTypeRequired
simulationIdstringyes
expiresAtstring (date-time)yes
effectsarray of objectyes
effects[].keystringyes
effects[].countintegeryes
effects[].summarystringyes
warningsarray of stringyes

CreateImportRequest

FieldTypeRequired
filenamestringno
csvstringyes

ImportReport

FieldTypeRequired
idstringyes
statussimulated | confirmed | failedyes
rowsintegeryes
validintegeryes
errorsarray of objectyes
errors[].rowintegeryes
errors[].codeunauthenticated | 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_settingsyes
errors[].detailstringyes
beyondGapintegerno
stockWritesintegerno

AutomationStateResponse

FieldTypeRequired
emergencyStopbooleanyes