Ordexs API v1 Get an API key

Inventory

Adjust stock

POSThttps://api.ordexs.com/v1/inventory/adjustments

Changes stock for one or more variants (up to 100) with a reason, all or nothing, exactly like an adjustment on the Inventory page. Each line either adds or removes units (delta) or sets the count (set). Every change is written to the stock history with your API key as its author, and inventory.updated webhooks follow.

Body

  • reasonstring

    restock: new units arrived. correction: the count was wrong. manual_adjust: anything else.

    One of restock, manual_adjust, correction
    default "manual_adjust"

  • notestring

    Shown in the stock history.

    up to 500 characters

  • linesarrayRequired

    up to 100 items · at least 1 item

    3 child fields
    • variant_idstringRequired

      starts with var_

    • deltainteger

      Units to add (positive) or remove (negative).

      -1000000–1000000

    • setinteger

      The new count. Send delta or set

      0–1000000

Returns

200 OK · The new levels of the variants you changed. InventoryLevelList

  • objectstringRequired

    always "list"

  • has_morebooleanRequired
  • next_cursorstring or nullRequired

    Pass as cursor to get the next page. null on the last page.

  • dataarray of InventoryLevelsRequired
    21 child fields
    • objectstring

      always "inventory_level"

    • variant_idstring

      starts with var_

    • product_idstring

      starts with prod_

    • product_titlestring
    • variant_titlestring or null
    • skustring or null
    • barcodestring or null
    • trackedboolean

      Whether the store counts this variant's stock. Untracked variants are always orderable.

    • availableinteger

      What can still be ordered. Negative when pre-orders or back-orders took more than the shelf holds.

    • committedinteger

      Units taken by orders not yet with a courier.

    • on_handinteger

      available + committed: what should physically be in the store.

    • incominginteger

      Units of a delivery on its way.

    • incoming_due_atstring or null

      ISO 8601 date-time, UTC

    • at_courierinteger

      Units the merchant keeps at the courier's warehouse.

    • on_shelfinteger

      Available units in the merchant's own place.

    • low_stockboolean

      At or under the store's alert level.

    • allow_backorderboolean
    • allow_preorderboolean
    • sold_30dinteger

      Units sold in the last 30 days.

    • days_of_covernumber or null

      How many days the stock lasts at the 30-day pace. null when nothing sold.

    • livemodeboolean

Errors

Every error has the same shape. This endpoint can answer with: