Skip to content

Cancel Import (GraphQL)

Aborts an import that is still running. Sets its state to cancelled.

Operation

OperationTypePurpose
cancelAdminSettingsDataTransferImportCancelMutationCancel a pending/processing import

Cancellable states

Only pending or processing imports can be cancelled. Any other state (e.g. validated, processed, completed, already cancelled) is refused with an errors[] entry naming the current state.

Quirks

  • The input takes the import's importId and an id (the cancel IRI) — API Platform requires the id field on every non-create mutation.
  • Select _id for the numeric import id; the payload id IRI does not resolve on mutation results.

Prerequisites

The example uses an illustrative import. Replace it with a pending/processing import in your store — use the adminSettingsDataTransferImports query to discover valid ids.

Permission: settings.data_transfer.imports.edit. All operations require an admin Bearer token — see Authentication.

Released under the MIT License.