Verify that query processing is complete
How to verify that a query has finished processing.
API Version: 2023-11-15
After you call the createQuery
operation, Amazon receives the request and begins processing the query. This document describes how to verify that the processing has completed.
Periodically call the getQuery
operation, passing the queryId
value from the previous step, until the processingStatus
value in the response indicates that processing has ended. Processing will have ended when the processingStatus
is CANCELLED
, DONE
or FATAL
.
The response includes one of:
- A
dataDocumentId
value if data is available as a result of the query. - An
errorDocumentId
value if there is an error while processing the query. - Neither of these when there is no data returned as a result of processing the query.
processingStatus
being IN_PROGRESS
or IN_QUEUE
indicates that processing has not ended, and you should continue to poll the getQuery
operation until a processingStatus
of CANCELLED
, DONE
or FATAL
is received.
Path Parameter
Name | Description | Type | Required |
---|---|---|---|
queryId | The identifier for the query. | string | Yes |
Request example
GET https://sellingpartnerapi-na.amazon.com/dataKiosk/2023-11-15/queries/ID323
Response
A successful response includes the following:
Name | Description | Schema |
---|---|---|
response | The payload for the getQuery operation. | getQuery |
Response example
{
"queryId": "ID323",
"query": "query {sampleQuery(startDate:\"2022-03-12\" endDate:\"2022-03-20\" marketplaceIds:[\"ATVPDKIKX0DER\"]){sales{date averageSellingPrice{amount currencyCode}}}}",
"createdTime": "2019-12-10T13:47:20.677Z",
"processingStatus": "DONE",
"processingStartTime": "2019-12-10T13:47:20.677Z",
"processingEndTime": "2019-12-12T13:47:20.677Z",
"dataDocumentId": "DOC-b9b0-4226-b4b9-0ee058ea5760",
}
Updated 4 months ago