Skip to main content

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

OK