Process or simulate import
This will create and return a new import file record with state NOT_STARTED and the importFileUid. The validation and import is processed in a new thread that will update the import progress every 5 seconds. To fetch the current state, use the Get import-file details endpoint.
Use action PROCESS to commit the import upon validation. If no errors occur the import state is COMPLETE.
Use action SIMULATE if you do not want to commit the import data and only validat. If no errors occur the import state will be READY_TO_IMPORT.
Use the Execute import content endpoint to abort the processing or to commit (execute) a successful simulation.
Required permissions: IMPORT
Access token recevied after user login with a deviceToken
Reference to a tenant.
^[A-Za-z0-9-_]+^[A-Za-z0-9-_]+base64 encoded data to be processed
| ENUM | Description |
|---|---|
| INSERT | Only insert non-existing records, existing records will be ignored |
| UPDATE | Only update existing records, non-existing records will be ignored |
| UPSERT | non-existing records will be inserted, existing records will be updated |
| ENUM | Description |
|---|---|
| SIMULATE | Do a simulate on import. Return content without saving |
| PROCESS | Process file with given template. Save file if no errors |
^[A-Za-z0-9-_]+Example response
^[A-Za-z0-9-_]+| ENUM | Description |
|---|---|
| SIMULATE | Do a simulate on import. Return content without saving |
| PROCESS | Process file with given template. Save file if no errors |
^[A-Za-z0-9-_]*| ENUM | Description |
|---|---|
| INSERT | Only insert non-existing records, existing records will be ignored |
| UPDATE | Only update existing records, non-existing records will be ignored |
| UPSERT | non-existing records will be inserted, existing records will be updated |
| ENUM | Description |
|---|---|
| NOT_STARTED | Import not started |
| IMPORT_IN_PROGRESS | Import is running |
| IMPORT_ABORT | Import is aborting |
| IMPORT_ABORTED | Import has been aborted |
| VALIDATE_IN_PROGRESS | Validate is running |
| COMPLETE_NOTHING_TO_IMPORT | Import is done, but there where nothing to import |
| COMPLETE | Import complete |
| VALIDATE_FAILED | Validate failed |
| IMPORT_FAILED | Import failed |
| IMPORT_ABORT | Import is aborting |
| IMPORT_ABORTED | Import has been aborted |
| READY_TO_IMPORT | Validation OK, import is ready |
POST /v2/tenants/{tenantUid}/imports/files HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 106
{
"templateUid": "text",
"base64Data": "text",
"operation": "INSERT",
"action": "SIMULATE",
"importFileUid": "text"
}Example response
{
"templateUid": "text",
"base64Data": "text",
"contentType": "text",
"action": "SIMULATE",
"importFileUid": "text",
"operation": "INSERT",
"state": "NOT_STARTED"
}Last updated
Was this helpful?

