amazon-selling-partner-api

How do I get a specific settlement report from the Amazon Selling Partner API?


My problem with the GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE is that you cannot really ask the API for specific time periods, can you? The /reports/2021-06-30/reports endpoint only allows to filter for "createdSince" and "createdUntil" dates which does not correspond with the actual time periods of the data inside the reports.

Does anyone know how to get a settlement report for specific time periods of the data itself via the API?

I tried listing all reports under this endpoint /reports/2021-06-30/reports?reportTypes=GET_V2_SETTLEMENT_REPORT_DATA_FLAT_FILE&pageSize=100 which does not give me a complete list of all settlement reports that are actually accessible via the Seller Central. I only find a couple of them and they do not cover the whole date range that I want to download.


Solution

  • createdSince and createdUntil are used to filter already requested reports, when you perform a getReports API GET request.

    If you want to generate a report, you have to call the createReport POST API . In the request body you can pass two parameters, both optional:

    Remember that dates, using Amazon SP-API, must be passed in ISO 8601 format, so a valid date must be expressed in yyyy-MM-ddTHH:mm:ss.sssZ format.