Export Location Quantities
GET/api/v2/inventory/location-quantities/export
Export the filtered per-location balances as a CSV or XLSX file download (columns: SKU, Product Name, Warehouse, Location Code, Location Name, Location Type, Quantity). Applies the same filter pipeline as the index endpoint. Returns a binary file, NOT JSON.
The export must be scoped to a warehouse or a product: supply filter[warehouse_id] or filter[product_id] (either one satisfies the requirement). A request with neither returns 422 Unprocessable Entity.
Authentication: Requires Bearer token.
Scope: inventory (read/write).
Additional permission required: inventory.export.
Query params:
- filter[warehouse_id] (required unless filter[product_id] given)
- filter[product_id] (required unless filter[warehouse_id] given)
- format (optional: csv | xlsx, default csv)
- plus any other filter[...] accepted by the index endpoint
Requires permission: inventory.export
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Entity
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.