验证查询处理是否已完成
如何验证查询是否已完成处理。
API 版本: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.
定期调用 getQuery
操作,传递上一步的 queryId
值,直到响应中的 processingStatus
值显示处理已结束。当 processingStatus
为 CANCELLED
、DONE
或 FATAL
时,则处理结束。
The response includes one of:
- 如果查询结果中有可用数据,则为
dataDocumentId
值。 - 如果处理查询时出现错误,则为
errorDocumentId
值。 - Neither of these when there is no data returned as a result of processing the query.
processingStatus
为 IN_PROGRESS
或 IN_QUEUE
表示处理尚未结束,您应继续轮询 getQuery
操作,直到收到 CANCELLED
、DONE
或 FATAL
的 processingStatus
。
路径参数
名称 | 描述 | Type | 必填项 |
---|---|---|---|
queryId | 查询的标识符。 | string | 有帮助 |
请求示例
GET https://sellingpartnerapi-na.amazon.com/dataKiosk/2023-11-15/queries/ID323
响应
成功的响应包括以下内容:
名称 | 描述 | Schema |
---|---|---|
response | getQuery 操作的有效负载。 | getQuery |
响应示例
{
"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 6 months ago
此页面对您有帮助吗?