StoreLyne API docs 2026-11

The stock ledger of a variant, newest first

GET/admin/2026-11/inventory/adjustments

scope read_inventory

Query parameters

  • limitinteger

    Items per page, 1 to 250.

    Default 50 · 1 to 250

  • afterstring

    Cursor from a previous next_cursor.

    Up to 512 characters

  • variant_idID (var_...)required

Response 200

  • dataarray of objectrequired
  • data[].idID (adj_...)required
  • data[].variant_idID (var_...)required
  • data[].location_idID (loc_...)required
  • data[].deltaintegerrequired
  • data[].on_hand_afterintegerrequired
  • data[].reasonenumrequired

    One of received correction damaged sold returned restocked

  • data[].notestringrequired
  • data[].referencestring or nullrequired
  • data[].created_attimestamprequired
  • has_morebooleanrequired
  • next_cursorstring or nullrequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething 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_..."
Response 200
{
  "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-Keystringrequired

    Unique key for this request. Retries with the same key return the first response.

    At least 1 characters · Up to 255 characters

  • X-CSRF-Tokenstring

    Required with a seller session cookie: the value of the orb_csrf cookie.

Request body

  • variant_idID (var_...)required
  • location_idID (loc_...)

    Defaults to the store default location.

  • deltainteger

    -1000000 to 1000000

  • on_handinteger

    0 to 1000000

  • reasonenum

    One of received correction damaged sold returned restocked

    Default "correction"

  • notestring

    Up to 500 characters

Response 201

  • levelobjectrequired
  • level.variant_idID (var_...)required
  • level.location_idID (loc_...)required
  • level.on_handintegerrequired
  • level.low_stockbooleanrequired
  • level.updated_attimestamprequired
  • adjustmentobject or nullrequired
  • adjustment.idID (adj_...)required
  • adjustment.variant_idID (var_...)required
  • adjustment.location_idID (loc_...)required
  • adjustment.deltaintegerrequired
  • adjustment.on_hand_afterintegerrequired
  • adjustment.reasonenumrequired

    One of received correction damaged sold returned restocked

  • adjustment.notestringrequired
  • adjustment.referencestring or nullrequired
  • adjustment.created_attimestamprequired

Errors

400idempotency_key_requiredEvery POST needs an Idempotency-Key header.
400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
404resource_not_foundThe object does not exist or belongs to another store.
409idempotency_in_progressA request with this Idempotency-Key is still running.
422idempotency_key_reusedThis Idempotency-Key was used with a different request.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething 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"
}'
Response 201
{
  "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

scope read_inventory

Query parameters

  • variant_idsstringrequired

    Comma-separated variant IDs, up to 250.

Response 200

  • dataarray of objectrequired
  • data[].variant_idID (var_...)required
  • data[].location_idID (loc_...)required
  • data[].on_handintegerrequired
  • data[].low_stockbooleanrequired
  • data[].updated_attimestamprequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething 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_..."
Response 200
{
  "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

scope write_inventory

Headers

  • X-CSRF-Tokenstring

    Required with a seller session cookie: the value of the orb_csrf cookie.

Request body

  • low_stock_thresholdintegerrequired

    0 to 100000

Response 200

  • low_stock_thresholdintegerrequired

Errors

400validation_failedA field in the request is missing or invalid. See param.
401authentication_requiredSend a valid access token or session.
403missing_scopeThe app token does not have the scope this endpoint needs.
429rate_limitedToo many requests. Wait for the time in RateLimit-Reset.
500internal_errorSomething 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
}'
Response 200
{
  "low_stock_threshold": 1
}