location
View as MarkdownQuery `location` on the catalog subgraph (Inventory).
query
Requires commerce.product:read.
Query location on the catalog subgraph (Inventory).
Examples use
00000000-0000-4000-a000-000000000000 as a dummy UUID, not a real location. Unknown UUID ids return HTTP 200 with data.location: null and no errors. Non-UUID strings can return INTERNAL_SERVER_ERROR. Query locations first and copy a real id. Nested inventoryCounts { totalCount } or inventoryAdjustments { totalCount } can return GraphQL errors on those fields while other location fields still resolve. Prefer top-level inventoryCounts or omit nested totalCount.Required headers
| Header | Required | Description |
|---|---|---|
x-store-id | Yes | ID of the store the operation targets. Omitting it returns HTTP 200 with a GraphQL error: extensions.code: "UNAUTHENTICATED". |
Go to Authentication for credential setup.
Arguments
idString!required
Possible returns
LocationLocation— A location represents the physical location of an inventory.
Last updated on
How is this guide?