MobiariDocs
Admin APIInventory

List a variant's stock movements

GET
/stores/{store_id}/variants/{variant_id}/stock/movements

Why a variant's quantity is what it is: its ledger entries, newest first, keyset-paged. Same rows as listStockMovements filtered to the variant.

Authorization

bearer_auth
AuthorizationBearer <token>

Authorization: Bearer <token>. Either a session access token from POST /auth/login (refresh it with POST /auth/refresh) or a store API token (mobi_st_…). A store API token works only for the store it was issued in, and can do at most what its issuing user can there, narrowed to the scopes it was issued with.

In: header

Path Parameters

store_id*string

Store id

Formatuuid
variant_id*string

Variant id

Formatuuid

Query Parameters

kind?string

What kind of stock movement a ledger entry records:

  • stock_in / stock_out: goods received (a purchase receipt, an opening balance) or removed outside an order.
  • reserve / release / consume: an order or build job holding units, letting them go, or shipping them.
  • adjustment: a manual correction (with a reason), or the undo of an earlier movement.
  • transfer: units moving between two locations (one entry per side).
  • count: the difference a posted stock count wrote.
  • build_consume / build_produce: parts used and kits made by a build.

Mirrors inventory_events_type_check. The set may grow; tolerate unknown values.

Value in"stock_in" | "stock_out" | "reserve" | "release" | "consume" | "adjustment" | "transfer" | "count" | "build_consume" | "build_produce"
location_id?string
Formatuuid
limit?integer

Page size, 1 to 200. Defaults to 50.

Formatint64
Range1 <= value <= 200
cursor?string

next_cursor from the previous page. Omit for the first page.

offset?integer

Rows to skip, for UIs that jump to a page number. Ignored when cursor is set. Prefer cursor for walking a whole list.

Formatint64
Range0 <= value
include_total?boolean

Also return total, the count of all matching rows. Costs an extra query; leave off when you only walk pages.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/stores/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants/497f6eca-6276-4993-bfeb-53cbbbba6f08/stock/movements?limit=50"
{
  "data": [
    {
      "actor_name": "string",
      "actor_user_id": "d6ed4497-4325-4995-9f49-e288b7192e46",
      "balance_after": 0,
      "created_at": "2019-08-24T14:15:22Z",
      "event_type": "stock_in",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "location_id": "46910cc3-ab41-4b80-b4a7-94dab9f1b795",
      "location_name": "string",
      "name": "string",
      "note": "string",
      "order_id": "93101167-9065-4b9c-b98b-5d789a3ed9fe",
      "order_number": "string",
      "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
      "quantity_delta": 0,
      "reason": null,
      "reference_id": "97c1ff22-6e4f-4821-b1d3-5236781d37b8",
      "reference_type": null,
      "reversal_of": "3e9f0fd4-28fd-41f7-b13d-55109bf19beb",
      "reversed_by": "69b6d93a-63e5-4842-b5ef-0ace8f62b2a4",
      "sku": "string",
      "unit_cost_cents": 0,
      "variant_id": "8a2d415d-59aa-4132-bef3-011f97c4a0f6"
    }
  ],
  "has_more": true,
  "next_cursor": "string",
  "total": 0
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}
{
  "code": "not_found",
  "details": {},
  "error": "Order not found"
}