> The index of all pages is at https://docs.afffast.com/llms.txt.

# import_invalid

The file has errors. The API imported no row. Fix the rows in `details`.

HTTP status: **422**. Error type: `invalid_request_error`.

The file has errors. The API imported no row. Fix the rows in `details`.

## Example

```json
{
  "error": {
    "type": "invalid_request_error",
    "code": "import_invalid",
    "message": "The file has errors. The API imported no row. Fix the rows in `details`.",
    "param": "file",
    "doc_url": "https://docs.afffast.com/errors/import-invalid",
    "request_id": "req_3kQ9x7WmZpL2vNd8TfYb4A",
    "details": [
      {
        "row": 3,
        "column": "amount",
        "message": "The amount is not a number."
      }
    ]
  }
}
```

## Causes

- A row of the file has an error. The API is all-or-nothing: it imports no row.
- The file has a column that the mapping cannot read.

## How to fix

- Read `error.details`. Each item has the row number, the column and what is wrong. The list has 100 items at most.
- Fix the rows in the file, and upload the file again. The API keeps no file from a failed import.
- Read the mappings with `GET /v1/import_mappings`.
