> 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.md).

# Data Migration

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.

### What you can migrate

Each import handles a single kind of record. Choose the type that matches the data file you are uploading:

* **Customers** — customer accounts, including their login credentials
* **Addresses** — delivery and billing addresses linked to migrated customers
* **Orders** — historical orders linked to migrated customers
* **Order items** — the line items belonging to migrated orders
* **Retail stores** — physical store records

### Typical workflow

A migration runs in the background, so the three endpoints are used in order:

1. **Start the import** by uploading one or more data files for a given record type. The response returns an identifier for the import.
2. **Track progress** by polling with that identifier until the import finishes.
3. **Review errors** with the same identifier to see which records were rejected and why, so they can be corrected and re-uploaded.

Because addresses, orders and order items reference customers (and order items reference orders), migrate the records in a dependency-friendly order: customers first, then addresses and orders, then order items.

### Data files

Uploaded files must be tabular: the **first row is the header**, and each of the following rows is one record. Every column header must exactly match a field name of the record type you are importing (for example `customer_code`, `order_number`), and the values must follow the types described for that type.

The file format is taken from the file extension. CSV is the primary format — its separator (`;`, `,` or `|`) is detected automatically — and common spreadsheet formats such as Excel are also accepted. More than one file may be uploaded in a single request; all rows are imported together.


---

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