> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.dyspach.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Import activities (file)

> Push warehouse activity as a CSV or Excel file.

<Note>
  **`POST`** `/v1/org/fulfilment/activities/file`
</Note>

The same [published structure](/guides/fulfilment-structure) delivered as a file — one
activity per row. Useful when a file is simply what your warehouse system already
produces.

## Authorization

<ParamField header="x-api-key" type="string" required>
  Your organisation API key (`dzk_live_…`).
</ParamField>

## Form fields

<ParamField body="file" type="file" required>
  `.csv` or `.xlsx`, up to **50 MB**. The first row must be the header row.
</ParamField>

<ParamField body="sourceDetails" type="string">
  Your own reference for this push. Defaults to the filename.
</ParamField>

## The header row is checked before anything is queued

A structure mistake is yours to fix, so you hear about it on the request:

```json theme={null}
{
  "statusCode": 400,
  "message": "Invalid file structure — missing required column(s): chargeCode; unrecognised column(s): Tenant Name",
  "error": "Bad Request"
}
```

Once the header passes, the file is queued and every row is validated during the import —
see [Check an import](/api-reference/get-fulfilment-import).

## Errors

| Status | When                                                                                                    |
| ------ | ------------------------------------------------------------------------------------------------------- |
| `400`  | File missing, empty, unreadable, an unsupported type, or a header row that does not match the structure |
| `401`  | Missing or invalid API key                                                                              |
| `413`  | File larger than 50 MB — split it                                                                       |
| `429`  | Rate limit exceeded                                                                                     |

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.dyspach.com/v1/org/fulfilment/activities/file \
    -H "x-api-key: $DYSPACH_API_KEY" \
    -F "file=@activity-2026-08-17.csv" \
    -F "sourceDetails=nightly-2026-08-17"
  ```
</RequestExample>

<ResponseExample>
  ```json 202 theme={null}
  {
    "importId": "7c1e2f90-2b44-4f0e-9a11-6d1f0c22ab31",
    "status": "queued",
    "source": "file",
    "statusUrl": "/v1/org/fulfilment/imports/7c1e2f90-2b44-4f0e-9a11-6d1f0c22ab31"
  }
  ```
</ResponseExample>
