> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/data-migration/review-import-errors.md).

# Review import errors

Returns the messages for records that were rejected during an import. Use it after (or while) tracking progress to find out why records failed, so they can be corrected in the source file and re-uploaded.

Each message describes one rejected record. Validation failures are prefixed with the field name (`field: message`), but failures raised while the record is being saved (for example a duplicate email on re-import) surface as the raw error text **without** a field prefix, so do not assume every message follows the `field: message` shape.

The field name in a message is the **serializer** field, which for a few columns differs from the file column: the customer link (file column `customer_code`) is reported as `user`, and the order link (file column `order_number`) is reported as `order`.

If no records were rejected — or the identifier is not recognised — an empty list is returned.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"Data Migration","description":"Bulk-import existing customer, address, order and store records into the commerce platform. These endpoints are used when moving a merchant's data from an external or legacy system into Akinon — most commonly during an initial go-live or a platform migration — without re-entering records by hand.\n\n## What you can migrate\n\nEach import handles a single kind of record. Choose the type that matches the data file you are uploading:\n\n- **Customers** — customer accounts, including their login credentials\n- **Addresses** — delivery and billing addresses linked to migrated customers\n- **Orders** — historical orders linked to migrated customers\n- **Order items** — the line items belonging to migrated orders\n- **Retail stores** — physical store records\n\n## Typical workflow\n\nA migration runs in the background, so the three endpoints are used in order:\n\n1. **Start the import** by uploading one or more data files for a given record\n   type. The response returns an identifier for the import.\n2. **Track progress** by polling with that identifier until the import finishes.\n3. **Review errors** with the same identifier to see which records were\n   rejected and why, so they can be corrected and re-uploaded.\n\nBecause addresses, orders and order items reference customers (and order items\nreference orders), migrate the records in a dependency-friendly order: customers\nfirst, then addresses and orders, then order items.\n\n## Data files\n\nUploaded files must be tabular: the **first row is the header**, and each of\nthe following rows is one record. Every column header must exactly match a\nfield name of the record type you are importing (for example `customer_code`,\n`order_number`), and the values must follow the types described for that type.\n\nThe file format is taken from the file extension. CSV is the primary format —\nits separator (`;`, `,` or `|`) is detected automatically — and common\nspreadsheet formats such as Excel are also accepted. More than one file may be\nuploaded in a single request; all rows are imported together."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"parameters":{"MigrationIdParameter":{"name":"migration_id","in":"path","required":true,"description":"Identifier returned when the import was started.","schema":{"type":"string"}}}},"paths":{"/migrations/{migration_id}/errors/":{"get":{"tags":["Data Migration"],"summary":"Review import errors","description":"Returns the messages for records that were rejected during an import. Use it\nafter (or while) tracking progress to find out why records failed, so they\ncan be corrected in the source file and re-uploaded.\n\nEach message describes one rejected record. Validation failures are\nprefixed with the field name (`field: message`), but failures raised while\nthe record is being saved (for example a duplicate email on re-import)\nsurface as the raw error text **without** a field prefix, so do not assume\nevery message follows the `field: message` shape.\n\nThe field name in a message is the **serializer** field, which for a few\ncolumns differs from the file column: the customer link (file column\n`customer_code`) is reported as `user`, and the order link (file column\n`order_number`) is reported as `order`.\n\nIf no records were rejected — or the identifier is not recognised — an\nempty list is returned.","operationId":"getMigrationErrors","parameters":[{"$ref":"#/components/parameters/MigrationIdParameter"}],"responses":{"200":{"description":"The list of error messages collected during the import.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","description":"One message per rejected record. Empty when there are no errors.","items":{"type":"string"}}}}}}},"401":{"description":"Authentication credentials were missing or invalid."},"403":{"description":"The account does not have staff (admin) permission."}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://apidocs.akinon.com/commerce-openapis/admin/data-migration/review-import-errors.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
