Skip to content

Create Import

EndpointMethod
/api/admin/settings/data-transfer/importsPOST

Uploads a source file and creates a new import. The import is created in the pending state, ready to be validated and processed.

Send the request as multipart/form-data.

FieldRequiredDescription
typeyesThe importer to use, e.g. products, customers, tax_rates.
actionyesappend (add / update rows) or delete (remove rows).
validation_strategyyesstop-on-errors (abort the run on the first invalid row) or skip-errors (skip invalid rows and continue).
allowed_errorsyesInteger ≥ 0. Maximum number of errors tolerated before the run stops.
field_separatoryesThe column delimiter used in the file, e.g. ,.
process_in_queuenoWhen true, large imports are processed asynchronously.
images_directory_pathnoFolder containing referenced product images.
fileyesThe import file (csv, xls, xlsx, or xml).

Returns the created import detail with HTTP 201.

File upload is REST only

Creating an import requires uploading a file, which cannot be done over GraphQL. Use this REST endpoint to create imports.

Permission: settings.data_transfer.imports.create.

Released under the MIT License.