Skip to main content

productImportCreate

Requires permission products:import:stage.

Creates a product import from a staged CSV or Excel file (purpose PRODUCT_IMPORT). Then call productImportStage, read productImportPreview, and call productImportApprove. An import writes no stock. Image columns must hold the app's own PRODUCT_IMAGE staged keys; a row with a URL is an error.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation ProductImportCreate($input: ProductImportCreateInput!) {
productImportCreate(input: $input) {
id
status
createdAt
chunkCheckpoint
createCount
errorRows
progress {
done
heartbeatAt
imagesFailed
phase
total
}
}
}

Variables:

{
"input": {
"stagedUploadKey": "string"
}
}

Response:

{
"data": {
"productImportCreate": {
"id": "string",
"status": "COMMITTING",
"createdAt": "2025-01-15T00:00:00Z",
"chunkCheckpoint": 0,
"createCount": 0,
"errorRows": 0,
"progress": {
"done": 0,
"heartbeatAt": "2025-01-15T00:00:00Z",
"imagesFailed": 0,
"phase": "string",
"total": 0
}
}
}
}
productImportCreate(
input: ProductImportCreateInput!
): ProductImportEntity!

Arguments​

productImportCreate.input ● ProductImportCreateInput! non-null input​

The staged file and the import mode.

Type​

ProductImportEntity object​

A product import and how far it has got.