Admin API
Inventory
Stock per variant and location.
The stock ledger of a variant, newest first
GET/admin/2026-11/inventory/adjustments
Query parameters
limitintegerItems per page, 1 to 250.
Default 50 · 1 to 250
afterstringCursor from a previous next_cursor.
Up to 512 characters
variant_idID (var_...)required
Response 200
dataarray of objectrequireddata[].idID (adj_...)requireddata[].variant_idID (var_...)requireddata[].location_idID (loc_...)requireddata[].deltaintegerrequireddata[].on_hand_afterintegerrequireddata[].reasonenumrequiredOne of
receivedcorrectiondamagedsoldreturnedrestockeddata[].notestringrequireddata[].referencestring or nullrequireddata[].created_attimestamprequiredhas_morebooleanrequirednext_cursorstring or nullrequired
Errors
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl https://api.storelyne.com/admin/2026-11/inventory/adjustments \
-H "Authorization: Bearer pat_live_..."const res = await fetch('https://api.storelyne.com/admin/2026-11/inventory/adjustments', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "adj_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"location_id": "loc_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"delta": 1,
"on_hand_after": 1,
"reason": "received",
"note": "Hand block printed cotton.",
"reference": "string",
"created_at": "2026-11-04T10:00:00.000Z"
}
],
"has_more": false,
"next_cursor": "eyJpZCI6Ii4uLiJ9"
}Add or remove stock with a reason
POST/admin/2026-11/inventory/adjustments
Send delta to add (positive) or remove (negative) units, or on_hand to set the count (recorded as a correction).
scope write_inventoryIdempotency-Key required
Headers
Idempotency-KeystringrequiredUnique key for this request. Retries with the same key return the first response.
At least 1 characters · Up to 255 characters
X-CSRF-TokenstringRequired with a seller session cookie: the value of the orb_csrf cookie.
Request body
variant_idID (var_...)requiredlocation_idID (loc_...)Defaults to the store default location.
deltainteger-1000000 to 1000000
on_handinteger0 to 1000000
reasonenumOne of
receivedcorrectiondamagedsoldreturnedrestockedDefault "correction"
notestringUp to 500 characters
Response 201
levelobjectrequiredlevel.variant_idID (var_...)requiredlevel.location_idID (loc_...)requiredlevel.on_handintegerrequiredlevel.low_stockbooleanrequiredlevel.updated_attimestamprequiredadjustmentobject or nullrequiredadjustment.idID (adj_...)requiredadjustment.variant_idID (var_...)requiredadjustment.location_idID (loc_...)requiredadjustment.deltaintegerrequiredadjustment.on_hand_afterintegerrequiredadjustment.reasonenumrequiredOne of
receivedcorrectiondamagedsoldreturnedrestockedadjustment.notestringrequiredadjustment.referencestring or nullrequiredadjustment.created_attimestamprequired
Errors
| 400 | idempotency_key_required | Every POST needs an Idempotency-Key header. |
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 404 | resource_not_found | The object does not exist or belongs to another store. |
| 409 | idempotency_in_progress | A request with this Idempotency-Key is still running. |
| 422 | idempotency_key_reused | This Idempotency-Key was used with a different request. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl -X POST https://api.storelyne.com/admin/2026-11/inventory/adjustments \
-H "Authorization: Bearer pat_live_..." \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R"
}'const res = await fetch('https://api.storelyne.com/admin/2026-11/inventory/adjustments', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
'Idempotency-Key': crypto.randomUUID(),
'Content-Type': 'application/json',
},
body: JSON.stringify({
"variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R"
}),
});
const data = await res.json();{
"level": {
"variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"location_id": "loc_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"on_hand": 1,
"low_stock": false,
"updated_at": "2026-11-04T10:00:00.000Z"
},
"adjustment": {
"id": "adj_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"location_id": "loc_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"delta": 1,
"on_hand_after": 1,
"reason": "received",
"note": "Hand block printed cotton.",
"reference": "string",
"created_at": "2026-11-04T10:00:00.000Z"
}
}Stock on hand for the given variants
GET/admin/2026-11/inventory/levels
Query parameters
variant_idsstringrequiredComma-separated variant IDs, up to 250.
Response 200
dataarray of objectrequireddata[].variant_idID (var_...)requireddata[].location_idID (loc_...)requireddata[].on_handintegerrequireddata[].low_stockbooleanrequireddata[].updated_attimestamprequired
Errors
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl https://api.storelyne.com/admin/2026-11/inventory/levels \
-H "Authorization: Bearer pat_live_..."const res = await fetch('https://api.storelyne.com/admin/2026-11/inventory/levels', {
method: 'GET',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"variant_id": "var_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"location_id": "loc_01JCG8ZQ5S7T0V4X8K2M3N6P9R",
"on_hand": 1,
"low_stock": false,
"updated_at": "2026-11-04T10:00:00.000Z"
}
]
}Set the low stock threshold
PATCH/admin/2026-11/inventory/settings
Headers
X-CSRF-TokenstringRequired with a seller session cookie: the value of the orb_csrf cookie.
Request body
low_stock_thresholdintegerrequired0 to 100000
Response 200
low_stock_thresholdintegerrequired
Errors
| 400 | validation_failed | A field in the request is missing or invalid. See param. |
| 401 | authentication_required | Send a valid access token or session. |
| 403 | missing_scope | The app token does not have the scope this endpoint needs. |
| 429 | rate_limited | Too many requests. Wait for the time in RateLimit-Reset. |
| 500 | internal_error | Something went wrong on our side. Quote the trace_id to support. |
curl -X PATCH https://api.storelyne.com/admin/2026-11/inventory/settings \
-H "Authorization: Bearer pat_live_..." \
-H "Content-Type: application/json" \
-d '{
"low_stock_threshold": 1
}'const res = await fetch('https://api.storelyne.com/admin/2026-11/inventory/settings', {
method: 'PATCH',
headers: {
'Authorization': `Bearer ${process.env.STORELYNE_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"low_stock_threshold": 1
}),
});
const data = await res.json();{
"low_stock_threshold": 1
}