Query Privacy Requests

๐Ÿ“˜

Buy with Prime API is now available for early access

Sign up for early access to the Buy with Prime API using the 'Sign Up' button below. The API may change as Amazon receives feedback and iterates on it.

This topic shows how to get the status of privacy requests that you created with Buy with Prime.

For details about privacy requests, see [Retrieve and Delete Shopper Data. For steps to process privacy requests, see Steps to Process Privacy Requests.

Get the status of a data retrieval request

To get the status of a data retrieval request, you use the personalDataRetrievalTask query. This query returns information about the data retrieval request that you created by using the startPersonalDataRetrievalTask mutation. In this query, you provide the taskId that you received in the response to the data retrieval request.

If the data is ready to be downloaded, the response to the personalDataRetrievalTask query includes a pre-signed URL. The URL provides access to the retrieved data. The URL expires in 60 seconds. After the download has started, the expiry time doesnโ€™t affect the download. If the link has expired, you must call the personalDataRetrievalTask query again to get a new URL.

If the data retrieval request can't be completed, the status is FAILED and the errors are listed under the errors property.

The following example shows how to call the personalDataRetrievalTask query to get the status of a data retrieval request.

Request
// GraphQL query query { personalDataRetrievalTask(taskId: "example-task-id") { taskId status submissionDate dataRetrievalLink dataSubject { type email } errors { code message } } }
Response with a link to download data
{ "data": { "personalDataRetrievalTask": { "taskId": "example-task-id", "status": "COMPLETED", "submissionDate": "2023-10-31T18:21:15.851865Z", "dataRetrievalLink": "example-data-retrieval-link", "dataSubject": { "type": "SHOPPER", "email": "janedoe@email.com" }, "errors": [] } } }
Response with errors
{ "data": { "personalDataRetrievalTask": { "taskId": "example-task-id", "status": "FAILED", "submissionDate": "2024-01-12T20:19:34.638498Z", "dataSubject": { "type": "SHOPPER", "email": "janedoe@example.com" }, "errors": [ { "code": "DATA_SUBJECT_NOT_FOUND", "message": "The shopper email for request example-task-id does not exist" } ] } } }

Get the status of a data deletion request

To get the status of a data deletion request, you use the personalDataDeletionTask query. This query returns information about the data deletion request that you created by using the startPersonalDataDeletionTask mutation. In this query, you provide the taskId that you received in the response to the data deletion request.

If the data deletion request can't be completed, the status is FAILED and the errors are listed under the errors property.

The following example shows how to call the personalDataDeletionTask query to get the status of a data deletion request.

Request
// GraphQL query query { personalDataDeletionTask(taskId: "example-task-id") { taskId status submissionDate dataSubject { type email } errors { code message } } }
Response for a completed data deletion request
{ "data": { "personalDataDeletionTask": { "taskId": "example-task-id", "status": "COMPLETED", "submissionDate": "2023-10-31T18:21:15.851865Z", "dataSubject": { "type": "SHOPPER", "email": "janedoe@example.com" }, "errors": [] } } }
Response with errors
{ "data": { "personalDataDeletionTask": { "taskId": "example-task-id", "status": "FAILED", "submissionDate": "2024-01-12T20:19:34.638498Z", "dataSubject": { "type": "SHOPPER", "email": "janedoe@example.com" }, "errors": [ { "code": "DATA_SUBJECT_NOT_FOUND", "message": "The shopper email for request example-task-id does not exist" } ] } } }

Related topics


Did this page help you?