亚马逊 MWS API 请求报告错误



我正在尝试通过MWS API检索订单报告。 为此,我必须提交报告请求。 无论我如何准备请求,我都收到相同的错误:

The service cannot handle the request. Request is invalid.

我正在使用亚马逊客户端库。 这是我们用来进行调用的代码:

public InvokeSubmitReportResponse InvokeSubmitOrderReportRequest(DateTime startDate, DateTime endDate)
{
    RequestReportRequest callrequest = new RequestReportRequest();
    RequestReportResponse callresponse = new RequestReportResponse();
    InvokeSubmitReportResponse response = new InvokeSubmitReportResponse();
    callrequest.Merchant = sellerId;
    callrequest.MarketplaceIdList = new IdList();
    callrequest.MarketplaceIdList.Id = new List<string>(new string[] { marketPlaceId });
    callrequest.StartDate = startDate;
    callrequest.EndDate = endDate;
    callrequest.ReportType = "_GET_ORDERS_DATA_";
    try
    {
        callresponse = service.RequestReport(callrequest);
        response.CallStatus = true;
        response.EndDate = callresponse.RequestReportResult.ReportRequestInfo.EndDate;
        response.ReportProcessingStatus = callresponse.RequestReportResult.ReportRequestInfo.ReportProcessingStatus;
        response.ReportRequestId = callresponse.RequestReportResult.ReportRequestInfo.ReportRequestId;
        response.ReportType = callresponse.RequestReportResult.ReportRequestInfo.ReportType;
        response.Scheduled = callresponse.RequestReportResult.ReportRequestInfo.Scheduled;
        response.StartDate = callresponse.RequestReportResult.ReportRequestInfo.StartDate;
        response.SubmittedDate = callresponse.RequestReportResult.ReportRequestInfo.SubmittedDate;

    }
    catch (MarketplaceWebServiceException ex)
    {
        response.CallStatus = false;
        response.Error = ex;
    }
    return response;
}

在本文档中,它告诉我唯一必需的参数是 ReportType . 如果我注释掉请求中的所有其他参数,则会出现SellerId is required错误。 如果我提交一个只包含ReportType的请求,Merchant我会得到The service cannot handle the request. Request is invalid.错误,就像我传递所有要传递的参数一样。 我已经检查了帐户识别参数,它们都是正确的。

谁能建议问题可能是什么?

更新

使用亚马逊暂存器时我收到同样的错误,所以我假设这是他们的错误。

_GET_ORDERS_DATA_也称为

"Scheduled XML Order Report"。我没有尝试过,但我相信你不能要求这种类型的报告。计划报告旨在与 ManageReportSchedule 调用一起使用,这将允许您创建此类计划。此类报告的进一步处理(GetReport 调用等)与请求的报告相同。

最新更新