> ## 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.

# List rejected activities

> Every activity a fulfilment import could not accept, with the reason.

<Note>
  **`GET`** `/v1/org/fulfilment/imports/{importId}/errors`
</Note>

Returns the activities the import rejected, each with the reason and the values you sent,
keyed by column name — enough to fix the record at source and send it again.

The same rows are queued in the Dyspach portal, where your customer can correct and
submit them by hand.

## Query parameters

<ParamField query="cursor" type="string">
  The `nextCursor` from the previous page. Omit for the first page.
</ParamField>

<ParamField query="limit" type="integer" default="100">
  Rows per page, 1–500.
</ParamField>

## Response

| Field               | Description                                                                                                                                                   |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `items[].reference` | The `reference` you sent for that activity, or `null` if you sent none. An activity has no id of its own, so this is the only handle back to the row you sent |
| `items[].error`     | Why the row was rejected, in plain language                                                                                                                   |
| `items[].data`      | The values you sent for that row, keyed by column name                                                                                                        |
| `nextCursor`        | Pass as `cursor` for the next page. `null` on the last page                                                                                                   |

## Why activities get rejected

| Reason                                 | What to fix                                                              |
| -------------------------------------- | ------------------------------------------------------------------------ |
| `Warehouse code is required`           | The row had no `warehouseCode`                                           |
| `Charge code is required`              | The row had no `chargeCode`                                              |
| `Valid quantity is required`           | `quantity` was missing or not a number. Note `0` is not a valid quantity |
| `Valid activity timestamp is required` | `activityTimestamp` was missing or unparseable                           |

These four reach you only from a **file** upload, where a required column can be present
in the header but blank on a given row. A data push is checked when you send it, so a
missing required field comes back as a `400` naming it, not as a rejected row here.

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.dyspach.com/v1/org/fulfilment/imports/7c1e2f90-2b44-4f0e-9a11-6d1f0c22ab31/errors?limit=100" \
    -H "x-api-key: $DYSPACH_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {
        "reference": "ORD-598782",
        "error": "Warehouse code is required",
        "data": { "chargeCode": "Picking", "reference": "ORD-598782", "quantity": "3" }
      }
    ],
    "nextCursor": null
  }
  ```
</ResponseExample>
