Ordexs API v1 Get an API key

Inventory

List stock movements

GEThttps://api.ordexs.com/v1/inventory_movements

The stock history: every change to every variant's stock, with why (a sale, a restock, a cancelled or returned order, a correction…) and who made it. Newest first. With created_since, oldest first, so a sync can keep its place.

Query parameters

  • limitinteger

    How many objects to return, 1–100. Default 25.

    1–100

  • cursorstring

    The next_cursor from the previous page. Repeat the same filters with it.

    up to 512 characters

  • created_sincestring

    Only objects created at or after this moment (ISO-8601).

    ISO 8601 date-time, UTC

  • variant_idstring

    Only this variant's movements.

    starts with var_

  • reasonInventoryReason

    Why stock moved. Set by you: restock, manual_adjust, correction. Set by Ordexs: initial (first stock), sale (an order took units), order_cancelled, order_returned, exchange_returned, order_reopened, order_deleted, order_edited. New values may be added.

    One of initial, sale, restock, manual_adjust, correction, order_cancelled, order_returned, exchange_returned, order_reopened, order_deleted, order_edited

Returns

200 OK · A page of movements. InventoryMovementList

  • objectstringRequired

    always "list"

  • has_morebooleanRequired
  • next_cursorstring or nullRequired

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

  • dataarray of InventoryMovementsRequired
    12 child fields
    • idstring

      starts with mov_

    • objectstring

      always "inventory_movement"

    • variant_idstring
    • product_idstring
    • deltainteger
    • balance_afterinteger

      Available stock right after this movement.

    • reasonInventoryReason

      Why stock moved. Set by you: restock, manual_adjust, correction. Set by Ordexs: initial (first stock), sale (an order took units), order_cancelled, order_returned, exchange_returned, order_reopened, order_deleted, order_edited. New values may be added.

      One of initial, sale, restock, manual_adjust, correction, order_cancelled, order_returned, exchange_returned, order_reopened, order_deleted, order_edited

    • notestring or null
    • order_idstring or null

      The order that caused it

    • actorobject

      Who moved the stock.

      3 child fields
      • typestring

        One of user, api_key, system

      • idstring or null

        The API key

      • namestring or null
    • created_atstring

      ISO 8601 date-time, UTC

    • livemodeboolean

Errors

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