generateProductImportErrorFile
Requires permission products:import:read.
S2.1 — materializes ALL failed rows (original columns + an errors column) as a re-uploadable CSV in object storage and returns a short-lived presigned download URL. Cached on errorFileRef.
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:
- GraphQL
- cURL
mutation GenerateProductImportErrorFile($importId: String!) {
generateProductImportErrorFile(importId: $importId) {
filename
rowCount
url
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation GenerateProductImportErrorFile($importId: String!) {\n generateProductImportErrorFile(importId: $importId) {\n filename\n rowCount\n url\n }\n}",
"variables": {
"importId": "string"
}
}
EOF
Variables:
{
"importId": "string"
}
Response:
{
"data": {
"generateProductImportErrorFile": {
"filename": "string",
"rowCount": 0,
"url": "string"
}
}
}
generateProductImportErrorFile(
importId: String!
): ProductImportErrorFile!
Arguments
generateProductImportErrorFile.importId ● String! non-null scalar
The ID of the import.
Type
ProductImportErrorFile object
The file of rows that had errors.