cancelPersonalDataDeletionTask

Version 2024-11-01

📘

Important

The Buy with Prime API is offered as a preview and might change as we receive feedback and iterate on the interfaces. We are sharing this early documentation to help you learn about the Buy with Prime API as we write and iterate on the content.

Overview

Cancel a personal data deletion task.

ℹ️

Required scope(s)

Manage Shopper Privacy Requests

Response

Return type CancelPersonalDataDeletionTaskResponse

Arguments

ArgumentDescription
taskId (String required)

Specifies the taskId for the personal data deletion task to be cancelled.

Examples


Cancel Personal Data Deletion Task

Request

mutation {
    cancelPersonalDataDeletionTask(taskId: "ff8cc33f-b414-44a0-a07e-fe2cefcf049c") {
        taskId
    }
}

Response

{
  "data": {
    "cancelPersonalDataDeletionTask": {
      "taskId": "ff8cc33f-b414-44a0-a07e-fe2cefcf049c"
    }
  }
}

Resource Not Found Cancel Personal Data Retrieval Task

Request

mutation {
    cancelPersonalDataDeletionTask(taskId: "c65a8cb2-4f9f-4eee-ac8f-d205a8993e59") {
        taskId
    }
}

Response

{
  "errors": [
    {
      "message": "Request references a resource which does not exist.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "cancelPersonalDataDeletionTask"
      ],
      "extensions": {
        "classification": {
          "type": "ResourceNotFoundError",
          "errorType": "ResourceNotFoundException",
          "errorCode": 404
        }
      }
    }
  ],
  "data": {
    "cancelPersonalDataDeletionTask": null
  }
}

Cannot Cancel In Progress Personal Data Deletion Task

Request

mutation {
    cancelPersonalDataDeletionTask(taskId: "c6020a0a-1448-4e3d-ac03-ce52df63096d") {
        taskId
    }
}

Response

{
  "errors": [
    {
      "message": "The personalDataDeletionTask cannot be cancelled with a status of IN_PROGRESS.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "cancelPersonalDataDeletionTask"
      ],
      "extensions": {
        "classification": {
          "type": "ValidationError",
          "code": "UnspecifiedError",
          "details": {
            "message": "The personalDataDeletionTask cannot be cancelled with a status of IN_PROGRESS."
          },
          "errorType": "ValidationException",
          "errorCode": 400
        }
      }
    }
  ],
  "data": {
    "cancelPersonalDataDeletionTask": null
  }
}