warehouses
Requires an authenticated session.
Lists the organization's warehouses, optionally filtered by status, type or search text on name and code.
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 Warehouses {
warehouses {
id
code
taxRegistrationNumber
name
status
type
address {
postalCode
city
country
latitude
longitude
state
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query Warehouses {\n warehouses {\n id\n code\n taxRegistrationNumber\n name\n status\n type\n address {\n postalCode\n city\n country\n latitude\n longitude\n state\n }\n }\n}"
}
EOF
Response:
{
"data": {
"warehouses": [
{
"id": "id",
"code": "string",
"taxRegistrationNumber": "string",
"name": "string",
"status": "ACTIVE",
"type": "string",
"address": {
"postalCode": "string",
"city": "string",
"country": "string",
"latitude": 0,
"longitude": 0,
"state": "string"
}
}
]
}
}
warehouses(
filter: WarehouseFilterInput
): [Warehouse!]!
Arguments
warehouses.filter ● WarehouseFilterInput input
Optional filters: status, type and search text.
Type
Warehouse object
A location where stock is held.