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

> Every row an import could not accept, with the reason.

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

Returns the rows the import rejected, each with the reason and the values you sent,
keyed by column name — enough to fix the record in your own system and re-send it.

The same rows are also downloadable as a spreadsheet from `errorReportUrl` on the
[import](/api-reference/get-import), and are queued in the Dyspach portal where your
customer can correct and submit them by hand.

## Authorization

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

## Path parameters

<ParamField path="importId" type="string" required>
  The `importId` of the import.
</ParamField>

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

Keep requesting with the returned `nextCursor` until it comes back `null`.

## Why rows get rejected

| Reason                                 | What to fix                                                                                   |
| -------------------------------------- | --------------------------------------------------------------------------------------------- |
| `No Shipment ID found`                 | The row had no `shipmentId`. In a file, blank ids are **not** carried down from the row above |
| `Origin Zone(s) not found`             | The origin postcode / suburb / state / country did not resolve to a serviceable location      |
| `Destination Zone(s) not found`        | Same, for the destination                                                                     |
| `Missing mandatory custom field(s): …` | A field your customer's carrier marks mandatory had no value. The message names them          |

A rejected row is rejected whole — the shipment is not partly written.

## Errors

| Status | When                                        |
| ------ | ------------------------------------------- |
| `400`  | Malformed `cursor`                          |
| `401`  | Missing or invalid API key                  |
| `404`  | No import with that id in your organisation |

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.dyspach.com/v1/org/shipments/imports/9f2b1c44-0d3e-4a71-9b52-0f4c1e77a8d1/errors?limit=100" \
    -H "x-api-key: $DYSPACH_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "items": [
      {
        "shipmentId": "CONN-88251",
        "error": "Destination Zone(s) not found",
        "data": {
          "shipmentId": "CONN-88251",
          "customerId": "ACME",
          "destinationPostCode": "9999",
          "destinationSuburb": "Nowhere",
          "destinationState": "VIC",
          "itemType": "Carton"
        }
      },
      {
        "shipmentId": "CONN-88252",
        "error": "Missing mandatory custom field(s): Purchase Order",
        "data": {
          "shipmentId": "CONN-88252",
          "customerId": "GLOBEX",
          "itemType": "Pallet"
        }
      }
    ],
    "nextCursor": "MjAyNi0wOC0xNFQwMjoyMjoxMS4wMDBafGVyci0xMDA"
  }
  ```
</ResponseExample>
