---
title: "POST /api/orders/export"
method: POST
path: "/api/orders/export"
tags: ["Orders"]
---

# POST /api/orders/export

`POST /api/orders/export`

Start an async XLSX export of the current company's orders, one row per order line. `scope: 'all'` exports every active order, `'filtered'` applies the same filters and search as `GET /orders`, `'selected'` exports the given `orderIds`. `sort` is honoured in all scopes so the file matches the on-screen order. Returns an `exportId` — poll `GET /exports/:id` for status; an email and in-app notification carry the download link when the file is ready.

## Request body

- object
  - `scope` 'all' | 'filtered' | 'selected', required
  - `orderIds` string[]
  - `sort` string
  - `filters` object
    - `search` string
    - `type` string[]
    - `status` string[]
    - `supplier` string[]
    - `buyer` string[]
    - `tag` string[]
    - `season` string[]
    - `brand` string[]
    - `internalResponsible` string[]
    - `orderNumber` string
    - `isArchived` boolean
    - `updatedAfterUnixMs` integer
    - `updatedBeforeUnixMs` integer
    - `orderDateFrom` string, date
    - `orderDateTo` string, date
    - `deliveryDateVariant` 'agreed' | 'handover' | 'actual'
    - `deliveryDateFrom` string, date
    - `deliveryDateTo` string, date

## Response `202`

Default Response

- object
  - `metadata` object, required
    - `success` boolean, required — True when the request succeeded.
  - `data` object, required
    - `exportId` string, required
    - `message` string, required

## Other responses

- `400` — Default Response
- `401` — Default Response

---

[API](https://skmtc.net/retraced/apis/api-reference.md) · [All operations](https://skmtc.net/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/retraced/api-reference/revisions/60d6c901bc4e/schema)
