主页文档代码示例API 参考公告模型发行说明常见问题GitHub视频
开发者中心API 状态支持
文档
开发者中心API 状态支持

验证查询处理是否已完成

如何验证查询是否已完成处理。

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 值显示处理已结束。当 processingStatusCANCELLEDDONEFATAL 时,则处理结束。

The response includes one of:

  • 如果查询结果中有可用数据,则为 dataDocumentId 值。
  • 如果处理查询时出现错误,则为 errorDocumentId 值。
  • Neither of these when there is no data returned as a result of processing the query.

processingStatusIN_PROGRESSIN_QUEUE 表示处理尚未结束,您应继续轮询 getQuery 操作,直到收到 CANCELLEDDONEFATALprocessingStatus

路径参数

名称描述Type必填项
queryId查询的标识符。string有帮助

请求示例

GET https://sellingpartnerapi-na.amazon.com/dataKiosk/2023-11-15/queries/ID323

响应

成功的响应包括以下内容:

名称描述Schema
responsegetQuery 操作的有效负载。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", }

此页面对您有帮助吗?