query · Module: Inventory · Requires inventory:read
Arguments
| Argument | Type | Description |
|---|---|---|
product | String | Filter by product. |
facility | String | Filter by facility. |
type | String | Filter by type. |
occurredAtGte | String | Filter by occurred at gte. |
createdGte | Int | Filter by created gte. |
createdLte | Int | Filter by created lte. |
limit | Int | Page size, 1–100 (default 10). |
startingAfter | ID | Cursor: return objects after this ID. |
endingBefore | ID | Cursor: return objects before this ID. |
Returns
StockMovementList!
| Field | Type |
|---|---|
data | [StockMovement!]! |
has_more | Boolean |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
query StockMovements($limit: Int) {
stockMovements(limit: $limit) {
data {
id
object
type
livemode
created
updated
owner
product
quantity
from {
status
location
}
to {
status
location
}
lot
serials
reason
reference {
fulfillment_order
asn
count
}
source
}
has_more
}
}
{
"limit": 10
}
{
"data": {
"stockMovements": {
"data": [
{
"id": "mov_1a2B3c",
"object": "stock_movement",
"type": "receive",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"owner": "acct_ada",
"product": "prod_ts_red_m",
"quantity": 2,
"from": {
"status": "available",
"location": "loc_lon_a12_03_b"
},
"to": {
"status": "available",
"location": "loc_lon_a12_03_b"
},
"lot": "example",
"serials": [
"example"
],
"reason": "count_variance",
"reference": {
"fulfillment_order": "example",
"asn": "example",
"count": "example"
},
"source": "api"
}
],
"has_more": true
}
}
}