For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

post
/tenants/{tenantUid}/imports/files
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
Body
templateUidstringRequiredPattern: ^[A-Za-z0-9-_]+
base64DatastringRequired

base64 encoded data to be processed

operationstring · enum · min: 1Required
ENUMDescription
INSERTOnly insert non-existing records, existing records will be ignored
UPDATEOnly update existing records, non-existing records will be ignored
UPSERTnon-existing records will be inserted, existing records will be updated
Possible values:
actionstring · enum · min: 1Required
ENUMDescription
SIMULATEDo a simulate on import. Return content without saving
PROCESSProcess file with given template. Save file if no errors
Possible values:
importFileUidstringOptionalPattern: ^[A-Za-z0-9-_]+
Responses
200

Example response

application/json
templateUidstringRequiredPattern: ^[A-Za-z0-9-_]+
base64DatastringRequired
contentTypestringRequired
actionstring · enum · min: 1Required
ENUMDescription
SIMULATEDo a simulate on import. Return content without saving
PROCESSProcess file with given template. Save file if no errors
Possible values:
importFileUidstringRequiredPattern: ^[A-Za-z0-9-_]*
operationstring · enum · min: 1Required
ENUMDescription
INSERTOnly insert non-existing records, existing records will be ignored
UPDATEOnly update existing records, non-existing records will be ignored
UPSERTnon-existing records will be inserted, existing records will be updated
Possible values:
statestring · enum · min: 1Required
ENUMDescription
NOT_STARTEDImport not started
IMPORT_IN_PROGRESSImport is running
IMPORT_ABORTImport is aborting
IMPORT_ABORTEDImport has been aborted
VALIDATE_IN_PROGRESSValidate is running
COMPLETE_NOTHING_TO_IMPORTImport is done, but there where nothing to import
COMPLETEImport complete
VALIDATE_FAILEDValidate failed
IMPORT_FAILEDImport failed
IMPORT_ABORTImport is aborting
IMPORT_ABORTEDImport has been aborted
READY_TO_IMPORTValidation OK, import is ready
Possible values:
post/tenants/{tenantUid}/imports/files
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"
}
200

Example response

{
  "templateUid": "text",
  "base64Data": "text",
  "contentType": "text",
  "action": "SIMULATE",
  "importFileUid": "text",
  "operation": "INSERT",
  "state": "NOT_STARTED"
}

Last updated

Was this helpful?