rollbackProductImport
Requires permission products:import:rollback.
Reference-guarded rollback of a COMPLETED import — unreferenced variants it created are deleted, referenced or stocked ones deactivated; updates are not reverted (notRevertedCount).
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 RollbackProductImport($importId: String!) {
rollbackProductImport(importId: $importId) {
deactivatedVariants
deletedProducts
deletedVariants
notRevertedCount
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RollbackProductImport($importId: String!) {\n rollbackProductImport(importId: $importId) {\n deactivatedVariants\n deletedProducts\n deletedVariants\n notRevertedCount\n }\n}",
"variables": {
"importId": "string"
}
}
EOF
Variables:
{
"importId": "string"
}
Response:
{
"data": {
"rollbackProductImport": {
"deactivatedVariants": 0,
"deletedProducts": 0,
"deletedVariants": 0,
"notRevertedCount": 0
}
}
}
rollbackProductImport(
importId: String!
): ProductImportRollbackResult!
Arguments
rollbackProductImport.importId ● String! non-null scalar
The ID of the import.
Type
ProductImportRollbackResult object
What a rollback of an import undid.