mutation · Module: Inventory · Requires inventory:write
Arguments
| Argument | Type | Description |
|---|---|---|
input | InventoryCountInput | The fields for this operation. |
InventoryCountInput fields
| Field | Type |
|---|---|
facility | String |
type | InventoryCountInputType |
blind | Boolean |
status | InventoryCountInputStatus |
scope | InventoryCountInputScopeInput |
lines | [InventoryCountInputLinesItemInput!] |
user_metadata | UserMetadataInput |
Returns
InventoryCount!
| Field | Type |
|---|---|
id | String! |
object | InventoryCountObject! |
livemode | Boolean! |
created | Int! |
updated | Int |
facility | String! |
type | InventoryCountType! |
blind | Boolean |
status | InventoryCountStatus! |
scope | InventoryCountScope |
lines | [InventoryCountLinesItem!] |
user_metadata | UserMetadata |
carrier_metadata | CarrierMetadata |
system_metadata | SystemMetadata |
Errors
Errors are returned inerrors[], with the REST error object in extensions (type, code, param, request_id), using the codes in Conventions §9.
mutation CreateInventoryCount($input: InventoryCountInput!) {
createInventoryCount(input: $input) {
id
object
type
status
livemode
created
updated
facility
blind
scope {
locations
products
zone
}
lines {
location
product
lot
expected
counted
variance
}
}
}
{
"input": {
"facility": "fac_lon_hub",
"type": "cycle",
"blind": true,
"status": "open",
"scope": {
"locations": [
"example"
],
"products": [
"example"
],
"zone": "zone_gb_mainland"
},
"lines": [
{
"location": "loc_lon_a12_03_b",
"product": "prod_ts_red_m",
"lot": "example",
"expected": 2
}
]
}
}
{
"data": {
"createInventoryCount": {
"id": "cnt_1a2B3c",
"object": "inventory_count",
"type": "cycle",
"status": "open",
"livemode": true,
"created": 1791302400,
"updated": 1791302400,
"facility": "fac_lon_hub",
"blind": true,
"scope": {
"locations": [
"example"
],
"products": [
"example"
],
"zone": "zone_gb_mainland"
},
"lines": [
{
"location": "loc_lon_a12_03_b",
"product": "prod_ts_red_m",
"lot": "example",
"expected": 2,
"counted": 2,
"variance": 2
}
]
}
}
}