stockMovement
Requires permission inventory:stock_movement:read.
Returns one stock movement: the quantity moved in or out, its warehouse and the document behind it, or null when there is none. Needs the stock movement read permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query StockMovement($id: ID!) {
stockMovement(id: $id) {
id
batchNumber
movementNumber
serialNumber
status
type
fromWarehouse {
id
code
taxRegistrationNumber
name
status
type
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query StockMovement($id: ID!) {\n stockMovement(id: $id) {\n id\n batchNumber\n movementNumber\n serialNumber\n status\n type\n fromWarehouse {\n id\n code\n taxRegistrationNumber\n name\n status\n type\n }\n }\n}",
"variables": {
"id": "id"
}
}
EOF
Variables:
{
"id": "id"
}
Response:
{
"data": {
"stockMovement": {
"id": "id",
"batchNumber": "string",
"movementNumber": "string",
"serialNumber": "string",
"status": "CANCELLED",
"type": "ADJUSTMENT",
"fromWarehouse": {
"id": "id",
"code": "string",
"taxRegistrationNumber": "string",
"name": "string",
"status": "ACTIVE",
"type": "string"
}
}
}
}
stockMovement(
id: ID!
): StockMovement
Arguments
stockMovement.id ● ID! non-null scalar
The ID of the stock movement.
Type
StockMovement object
A movement of stock: a receipt, issue, transfer or adjustment.