startPersonalDataRetrievalTask
Version 2024-01-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
Starts a personal data retrieval task.
Required scope(s)
Manage Shopper Privacy Requests
Response
Return type StartPersonalDataRetrievalTaskResponse
Arguments
Argument | Description |
---|---|
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
}
}
Updated 3 days ago