Mara M
Mara M

Reputation: 153

InputDataError Amazon MSW Java

I'm trying to download a report with Amazon MWS Java samples. I made the request report and then I made the get report request list. The answer is that it's DONE but when I'm trying to call the getReport I'm getting this error: Caught Exception: InputDataError Response Status Code: 400 Error Code: InputDataError Error Type: Sender The keys and IDs are the same as in other requests that work. I'm getting the Report ID from this answer which I receive from get report request list:

GetReportRequestListResponse
    GetReportRequestListResult
        HasNext
            false
        ReportRequestInfo
            ReportRequestId
                74259017632
            ReportType
                _GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_
            StartDate
                2018-01-31T22:00:00Z
            EndDate
                2018-02-01T22:00:00Z
            SubmittedDate
                2018-04-11T08:10:44Z
            CompletedDate
                2018-04-11T08:10:54Z
            ReportProcessingStatus
                _DONE_
    ResponseMetadata
        RequestId
            9d7668b4-8568-4522-aefc-1bc72f33e20d

And this is how I set my report ID:

GetReportRequest request = new GetReportRequest();
request.setMerchant( merchantId );
request.setReportId( "74259017632" );

Upvotes: 1

Views: 533

Answers (1)

iMakeWebsites
iMakeWebsites

Reputation: 587

74259017632 is your requestID.

You need to send your reportID.

So there are 3 steps:

  1. GetReportRequestList for _GET_XML_ALL_ORDERS_DATA_BY_ORDER_DATE_
  2. GetReportList for 74259017632 (this will give you the reportid)
  3. GetReport for the reportID

Upvotes: 1

Related Questions