Reputation: 5808
I am trying to retrieve an Order Report via the MWS API. To do this I have to submit a report request. No matter how I prepare the request I am getting the same error:
The service cannot handle the request. Request is invalid.
I am using the Amazon Client Library. tis is the code we are using to make the call:
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;
}
In this documentation it tells me that the only required parameter is ReportType
. If I comment out all the other parameters in the request I get a SellerId is required
error. If I submit a request with just the ReportType
and Merchant
I get the The service cannot handle the request. Request is invalid.
error, as I do if I pass all the paramters I want to pass. I have checked the account identifying parameters and they are all correct.
Can anyone advise what the problem could be?
Update
I get the same error when using the Amazon scratchpad so I am assuming its a bug on their side.
Upvotes: 1
Views: 1446
Reputation: 6882
_GET_ORDERS_DATA_
is also known as "Scheduled XML Order Report". I haven't tried, but I believe you cannot request a report of that type. Scheduled reports are meant to be used with the ManageReportSchedule call, which will let you create such a schedule. Further processing of such a report (GetReport calls etc.) is the same as with requested reports.
Upvotes: 1