List stock movements
The store's stock ledger, newest first: every quantity that moved, with
its kind, reason, the document behind it (order, receipt, count,
transfer) and who made it. Keyset-paged (next_cursor); offset also
works for page-number tables.
Authorization
bearer_auth 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
uuidQuery Parameters
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 areason), 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.
"stock_in" | "stock_out" | "reserve" | "release" | "consume" | "adjustment" | "transfer" | "count" | "build_consume" | "build_produce"Why stock was adjusted by hand. A closed list so the history can be
grouped and reported on; put anything else in the free-text note.
opening_balance (first load of a real shelf count), damaged, lost,
theft, found (on the shelf but not in the book), correction (the
book was wrong; the default), customer_return, supplier_return,
expired, sample, other.
"opening_balance" | "damaged" | "lost" | "theft" | "found" | "correction" | "customer_return" | "supplier_return" | "expired" | "sample" | "other"uuidMovements made by this user.
uuidThe document a movement came from.
"order" | "cart" | "purchase_receipt" | "stock_count" | "transfer" | "erp_sync" | "reversal"uuidMatches SKU, variant or product title.
date-timedate-timePage size, 1 to 200. Defaults to 50.
int641 <= value <= 200next_cursor from the previous page. Omit for the first page.
Rows to skip, for UIs that jump to a page number. Ignored when
cursor is set. Prefer cursor for walking a whole list.
int640 <= valueAlso 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
curl -X GET "https://example.com/stores/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"
}