Skip to main content

Export Inventory Movements

GET 

/api/v2/inventory-movements/list/export

Exports inventory movements as an XLSX or CSV file download. Reuses the same Spatie QueryBuilder filters and sorts as the List Inventory Movements endpoint when scope=filtered.

Required scope: inventory:read

Grant this scope to your token under Settings → Developer → Personal Access Tokens.

Scopes:

  • all: ignore active filters/sort and export every record
  • filtered (default): apply the current filter/sort/search query params
  • current_page: export the rows on the current page (matches the visible table)
  • selected: export only the IDs supplied via the ids query param

The response depends on the size of the export:

  1. INLINE (up to 1,000 rows, or scope=current_page) — the file is the response body. Content-Type is application/vnd.openxmlformats-officedocument.spreadsheetml.sheet (xlsx) or text/csv (csv).

  2. QUEUED (more than 1,000 rows) — the export runs as a background job and the response is a JSON envelope carrying data.queued=true and data.tracked_job_log_id. Poll the tracked job log endpoints; when the job completes, its results.file names the finished file, which is fetched via Download Inventory Movements Export. The queued file is ordered by movement ID; xlsx exports above 15,000 rows are written as CSV instead. For scope=selected the queued path is used when more than 1,000 ids are supplied.

Authentication: Requires Bearer token.

Requires permission: inventory.export

Reconciliation columns (keys valuation_value, in_valuation; included by default when no columns param is sent, or via the UI's 'Reconciliation' export mode): 'Valuation Value (GL basis)' is the booked value plus the movement's recognized revaluation deltas — the same atom the Inventory Valuation / Inventory Value Change reports book — and 'In Valuation' states whether those reports count the row ('yes', or the scope exclusion that removes it: non-active status, consignment layer, Amazon FBA warehouse, deleted product, or no FIFO layer). Together they let a manual export reconciliation re-derive the report's population and values. 'Valuation Value (GL basis)' is bounded by the export's own inventory_movement_date filter: revaluation deltas recognized after the end of the filter's latest day (converted exactly as the valuation reports convert their cutoffs) are excluded, so a historical month's export carries that month's valuation basis. With no date filter the column carries all recognitions to date. When the valuation columns are exported AND the inventory_movement_date filter pins a full window (between/is), the export also appends one typed row per cost revision recognized inside that window on pre-period stock (Type 'revaluation_recognition', ID 'REV-{revaluation}-M{movement}') — the rows the report's 'Revaluations recognised on pre-period stock' line counts — so the file sums to the report's on-hand change exactly.

Request​

Responses​

OK

Response Headers
    Content-Type
    Content-Disposition