SellOrchard

API reference

Inventory

Locations and stock per location. Every change is recorded as an inventory movement and fires inventory.updated.
On this page

List locations

get/locations

Required scopes:read_inventory

Query parameters

NameTypeDescription
limitintegerPage size, 1–250 (default 50).

default 50 · min 1 · max 250

cursorstringnext_cursor from the previous page.
updated_sincestring<date-time>Only objects changed at or after this ISO-8601 time.
created_sincestring<date-time>Only objects created at or after this ISO-8601 time.

Example request

curl
curl "https://api.sellorchard.com/v1/locations?limit=50" \
  -H "Authorization: Bearer $SELLORCHARD_API_KEY"

Response200Locations.

Show response schema
  • dataarray of Locationrequired
    Show item attributes
    • objectstringrequired
    • idintegerrequired

      Id.

    • namestringrequired

      Name.

    • typestringrequired

      Kind of place.

      One of:warehouseshopother

    • addressAddress | any | nullrequired
      Show child attributes

      One of the following:

      1. Address

        • first_namestring | null

          First name.

        • last_namestring | null

          Last name.

        • companystring | null

          Company.

        • line1string | null

          Line1.

        • line2string | null

          Line2.

        • citystring | null

          City.

        • regionstring | null

          Region.

        • postcodestring | null

          Postcode.

        • countrystring | null

          ISO 3166-1 alpha-2 country code.

        • phonestring | null

          Phone.

      2. any | null

    • phonestring | nullrequired

      Phone.

    • fulfils_onlinebooleanrequired

      Its stock counts for online orders.

    • pickupbooleanrequired

      Offers local pickup.

    • priorityintegerrequired

      Fulfilment priority (lower first).

    • is_activebooleanrequired

      Active.

    • is_defaultbooleanrequired

      The main location.

    • timezonestring | nullrequired

      IANA time zone.

    • created_atstring<date-time> | nullrequired

      Created.

    • updated_atstring<date-time> | nullrequired

      Last changed.

  • has_morebooleanrequired

    More pages after this one.

  • next_cursorstring | nullrequired

    Pass as cursor for the next page; null on the last page.

200 response
{
  "data": [
    {
      "object": "location",
      "id": 1,
      "name": "Main warehouse",
      "type": "warehouse",
      "address": {
        "first_name": null,
        "last_name": null,
        "company": null,
        "line1": "1 Main St",
        "line2": "Apt 2",
        "city": "Austin",
        "region": "TX",
        "postcode": "73301",
        "country": "US",
        "phone": "+15125550199"
      },
      "phone": null,
      "fulfils_online": true,
      "pickup": false,
      "priority": 0,
      "is_active": true,
      "is_default": true,
      "timezone": "America/Chicago",
      "created_at": "2026-11-02T15:00:00Z",
      "updated_at": "2026-11-03T09:30:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Error responses

  • 400invalid_requestMalformed request (e.g. a bad cursor).
  • 401authenticationMissing, invalid, expired or revoked API key.
  • 403permissionThe key lacks the scope, or the store's plan doesn't include the API.
  • 422invalid_requestInvalid parameters; errors lists each field.
  • 429rate_limitedToo many requests.
  • 500serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.

List inventory levels

get/inventory-levels

Levels of tracked variants, one row per variant and location; pages (limit, cursor) count variants. updated_since: variants with a level changed since then.

Required scopes:read_inventory

Query parameters

NameTypeDescription
limitintegerPage size, 1–250 (default 50).

default 50 · min 1 · max 250

cursorstringnext_cursor from the previous page.
updated_sincestring<date-time>Only objects changed at or after this ISO-8601 time.
created_sincestring<date-time>Only objects created at or after this ISO-8601 time.
variant_idsstringComma-separated variant ids (up to 250).
location_idintegerOnly this location.

Example request

curl
curl "https://api.sellorchard.com/v1/inventory-levels?limit=50" \
  -H "Authorization: Bearer $SELLORCHARD_API_KEY"

Response200Levels (one per variant and location), paged by variant.

Show response schema
  • dataarray of InventoryLevelrequired
    Show item attributes
    • objectstringrequired
    • variant_idintegerrequired

      Variant.

    • location_idintegerrequired

      Location.

    • on_handintegerrequired

      Units on hand at the location.

    • updated_atstring<date-time> | nullrequired

      Last change at this location (null when never recorded).

  • has_morebooleanrequired

    More pages after this one.

  • next_cursorstring | nullrequired

    Pass as cursor for the next page; null on the last page.

200 response
{
  "data": [
    {
      "object": "inventory_level",
      "variant_id": 311,
      "location_id": 1,
      "on_hand": 42,
      "updated_at": "2026-11-03T09:30:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Error responses

  • 400invalid_requestMalformed request (e.g. a bad cursor).
  • 401authenticationMissing, invalid, expired or revoked API key.
  • 403permissionThe key lacks the scope, or the store's plan doesn't include the API.
  • 422invalid_requestInvalid parameters; errors lists each field.
  • 429rate_limitedToo many requests.
  • 500serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.

Adjust stock at a location

post/inventory-levels/adjust

Adds (or takes away) units. Fires inventory.updated.

Required scopes:write_inventory

Headers

NameTypeDescription
Idempotency-KeystringAny unique string (e.g. a UUID, up to 255 characters). A retry with the same key and body within 24 hours gets the first response again (Idempotent-Replayed: true); the same key with a different body is a 409 conflict.

Request body

  • location_idintegerrequired

    Location.

  • variant_idintegerrequired

    Tracked variant.

  • deltaintegerrequired

    Units to add (negative: take away). Stock never goes below 0.

  • reasonstring | null

    Note on the inventory movement.

Example request

curl
curl -X POST "https://api.sellorchard.com/v1/inventory-levels/adjust" \
  -H "Authorization: Bearer $SELLORCHARD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 1,
  "variant_id": 311,
  "delta": -3
}'

Response200The level after the change.

Show response schema
  • dataInventoryLevelrequired
    Show child attributes
    • objectstringrequired
    • variant_idintegerrequired

      Variant.

    • location_idintegerrequired

      Location.

    • on_handintegerrequired

      Units on hand at the location.

    • updated_atstring<date-time> | nullrequired

      Last change at this location (null when never recorded).

200 response
{
  "data": {
    "object": "inventory_level",
    "variant_id": 311,
    "location_id": 1,
    "on_hand": 42,
    "updated_at": "2026-11-03T09:30:00Z"
  }
}

Error responses

  • 401authenticationMissing, invalid, expired or revoked API key.
  • 403permissionThe key lacks the scope, or the store's plan doesn't include the API.
  • 409conflictThe Idempotency-Key was used with a different request, or that request is still running.
  • 422invalid_requestInvalid parameters; errors lists each field.
  • 429rate_limitedToo many requests.
  • 500serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.

Set stock at a location

post/inventory-levels/set

Sets the units on hand (recorded as a count). Fires inventory.updated.

Required scopes:write_inventory

Headers

NameTypeDescription
Idempotency-KeystringAny unique string (e.g. a UUID, up to 255 characters). A retry with the same key and body within 24 hours gets the first response again (Idempotent-Replayed: true); the same key with a different body is a 409 conflict.

Request body

  • location_idintegerrequired

    Location.

  • variant_idintegerrequired

    Tracked variant.

  • on_handintegerrequired

    Units on hand (a count).

  • reasonstring | null

    Note on the inventory movement.

Example request

curl
curl -X POST "https://api.sellorchard.com/v1/inventory-levels/set" \
  -H "Authorization: Bearer $SELLORCHARD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "location_id": 1,
  "variant_id": 311,
  "on_hand": 40
}'

Response200The level after the change.

Show response schema
  • dataInventoryLevelrequired
    Show child attributes
    • objectstringrequired
    • variant_idintegerrequired

      Variant.

    • location_idintegerrequired

      Location.

    • on_handintegerrequired

      Units on hand at the location.

    • updated_atstring<date-time> | nullrequired

      Last change at this location (null when never recorded).

200 response
{
  "data": {
    "object": "inventory_level",
    "variant_id": 311,
    "location_id": 1,
    "on_hand": 42,
    "updated_at": "2026-11-03T09:30:00Z"
  }
}

Error responses

  • 401authenticationMissing, invalid, expired or revoked API key.
  • 403permissionThe key lacks the scope, or the store's plan doesn't include the API.
  • 409conflictThe Idempotency-Key was used with a different request, or that request is still running.
  • 422invalid_requestInvalid parameters; errors lists each field.
  • 429rate_limitedToo many requests.
  • 500serverSomething went wrong on our side; safe to retry with the same Idempotency-Key.