startPersonalDataRetrievalTask

Version 2024-04-01

Overview

Starts a personal data retrieval task.

ℹ️

Required scope(s)

Manage Shopper Privacy Requests

Response

Return type StartPersonalDataRetrievalTaskResponse

Arguments

ArgumentDescription
input (StartPersonalDataRetrievalTaskInput required)

Specifies the input fields to start a personal data retrieval task.

Examples


Start Personal Data Retrieval Task

Request

mutation {
    startPersonalDataRetrievalTask(input: {
        dataSubject: {
            type: SHOPPER
            email: "[email protected]"
        }
    }) {
        taskId
    }
}

Response

{
  "data": {
    "startPersonalDataRetrievalTask": {
      "taskId": "942d40d5-b514-4076-bd6c-c4bc326324bf"
    }
  }
}

Email Validation Error

Request

mutation {
    startPersonalDataRetrievalTask(input: {
        dataSubject: {
            type: SHOPPER
            email: "aemail.com"
        }
    }) {
        taskId
    }
}

Response

{
  "errors": [
    {
      "message": "Input request is not valid, the following issues were encountered: [/startPersonalDataRetrievalTask/input/dataSubject/email must match \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+[.][a-zA-Z]{2,}$\"]",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "startPersonalDataRetrievalTask"
      ],
      "extensions": {
        "classification": {
          "type": "ValidationError",
          "code": "UnspecifiedError",
          "details": {
            "message": "Input request is not valid, the following issues were encountered: [/startPersonalDataRetrievalTask/input/dataSubject/email must match \"^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+[.][a-zA-Z]{2,}$\"]"
          },
          "errorType": "ValidationException",
          "errorCode": 400
        }
      }
    }
  ],
  "data": {
    "startPersonalDataRetrievalTask": null
  }
}

Email Not Provided Error

Request

mutation {
    startPersonalDataRetrievalTask(input: {
        dataSubject: {
            type: SHOPPER
        }
    }) {
        taskId
    }
}

Response

{
  "errors": [
    {
      "message": "The dataSubject must have an email specified to initiate a personalDataRetrievalTask.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "startPersonalDataRetrievalTask"
      ],
      "extensions": {
        "classification": {
          "type": "ValidationError",
          "code": "EmailNotProvidedForPersonalDataRetrievalTask",
          "details": {
            "message": "The dataSubject must have an email specified to initiate a personalDataRetrievalTask."
          },
          "errorType": "ValidationException",
          "errorCode": 400
        }
      }
    }
  ],
  "data": {
    "startPersonalDataRetrievalTask": null
  }
}