Skip to content

Data Transfer Imports

The Data Transfer Imports menu bulk-imports records into the store from a CSV / XLSX / XML file — products, customers, tax rates, and any other entity your store exposes as an importer. It mirrors the admin Settings → Data Transfer → Imports screen.

Each import is a job: an uploaded file, the entity it targets (code), whether it adds or removes rows (action), and a state that tracks how far it has run.

The import lifecycle

A client drives an import through a fixed sequence of stages. Each stage is a separate call so you can validate, watch progress, and abort between steps.

StepWhat it does
CreateUpload the source file and choose the entity + options. REST only — see below.
ValidateCheck the file's columns and rows without importing anything. Surfaces errors[] and the isValid flag.
StartProcess the next batch of rows. Call repeatedly until no batches remain.
LinkPost-process stage — resolves relationships between the imported records.
IndexFinal stage — makes the imported records searchable and visible on the storefront.
StatsPoll progress at any point without advancing the job — drives a progress bar.
CancelAbort a pending or processing job.

Poll stats between start / link / index to know when each stage has finished (remaining: 0).

Field meanings

  • code — the entity being imported (products, customers, tax_rates, …).
  • actionappend (insert/update rows) or delete (remove rows).
  • state — lifecycle position: pending, validated, processing, processed, linked, indexed, completed, cancelled, …
  • validationStrategy / allowedErrorsstop-on-errors or skip-errors, and the error budget for the latter.
  • processedRowsCount / invalidRowsCount / errorsCount — progress and validation counters.
  • errors — the list of validation messages (null on listing rows; fetch the detail to read it).
  • summary — created/updated/deleted counts after a run (null until the run completes).
  • filePath / errorFilePath / imagesDirectoryPath — storage paths. The source file and error report are downloadable over REST only.

REST-only operations

  • Create requires a multipart file upload, which a JSON GraphQL request cannot carry — the GraphQL create mutation always rejects with a pointer to REST.
  • File downloads (source file, error report, sample template) are binary and have no GraphQL counterpart.

Operations in this menu

ActionOperation
List importsadminSettingsDataTransferImports query
Get a single importadminSettingsDataTransferImport(id:) query
Create importREST only (multipart upload)
Validate importvalidateAdminSettingsDataTransferImportValidate mutation
Start importstartAdminSettingsDataTransferImportStart mutation
Link importlinkAdminSettingsDataTransferImportLink mutation
Index importindexAdminSettingsDataTransferImportIndex mutation
Import statsadminSettingsDataTransferImportStats(id:) query
Delete importdeleteAdminSettingsDataTransferImport mutation
Cancel importcancelAdminSettingsDataTransferImportCancel mutation

Permissions: settings.data_transfer.imports.create / .edit / .delete / .view.

All operations require an admin Bearer token — see Authentication.

Released under the MIT License.