亚马逊MWS报告API回答_DONE_NO_DATA_而不是_CANCELLED _

时间:2016-12-08 14:22:40

标签: php amazon amazon-mws

我正在使用" Reports API"在MWS中获取订单信息。我需要关于客户在CRM中使用的账单信息(账单地址......)。

我使用报告 _GET_AMAZON_FULFILLED_SHIPMENTS_DATA_ ,因为在FBA上销售此ReportType会返回结算信息。

如果我连续发出2个API请求。第二个请求的状态为 _DONE_NO_DATA _ ,但应为_CANCELLED_

响应示例:

<ReportRequestInfo>
  <ReportType>_GET_AMAZON_FULFILLED_SHIPMENTS_DATA_</ReportType>
  <ReportProcessingStatus>_DONE_NO_DATA_</ReportProcessingStatus>
  <EndDate>2016-12-08T14:06:49+00:00</EndDate>
  <Scheduled>false</Scheduled>
  <ReportRequestId>127509017143</ReportRequestId>
  <StartedProcessingDate>2016-12-08T14:07:16+00:00</StartedProcessingDate>
  <SubmittedDate>2016-12-08T14:06:49+00:00</SubmittedDate>
  <StartDate>2016-11-30T21:00:00+00:00</StartDate>
  <CompletedDate>2016-12-08T14:07:22+00:00</CompletedDate>
</ReportRequestInfo>
<ReportRequestInfo>
  <ReportType>_GET_AMAZON_FULFILLED_SHIPMENTS_DATA_</ReportType>
  <ReportProcessingStatus>_DONE_</ReportProcessingStatus>
  <EndDate>2016-12-08T14:06:48+00:00</EndDate>
  <Scheduled>false</Scheduled>
  <ReportRequestId>127508017143</ReportRequestId>
  <StartedProcessingDate>2016-12-08T14:06:53+00:00</StartedProcessingDate>
  <SubmittedDate>2016-12-08T14:06:48+00:00</SubmittedDate>
  <StartDate>2016-11-30T21:00:00+00:00</StartDate>
  <CompletedDate>2016-12-08T14:07:16+00:00</CompletedDate>
  <GeneratedReportId>4430367616017143</GeneratedReportId>
</ReportRequestInfo>

我不知道是否没有真正的数据或大量的API请求。 我怎么知道?

对于请求,我使用Reports API或暂存器的官方库。回应是平等的。

1 个答案:

答案 0 :(得分:-1)

您需要使用GeneratedReportId调用GetReport。这将返回您正在寻找的数据。