How to get all the listing products in the last ten days through Amazon sp-api?

I used this api:/reports/2021-06-30/reports to createReport with GET_MERCHANT_LISTINGS_ALL_DATA. but the request param dataStartTime don’t work. the api return all the products to me,not last ten days

as the title.How to get all the listing products in the last ten days through Amazon sp-api?

1 Like

Hello,

To retrieve all the listing products in the last ten days using the Amazon Selling Partner API, you can follow these steps:

  1. Use the Reports API to create a new report request. Set the reportType parameter to “GET_MERCHANT_LISTINGS_ALL_DATA” to fetch the listing data.
  2. Specify the desired start and end dates for the report by setting the dataStartTime and dataEndTime parameters. In this case, you would set dataStartTime to the date ten days ago and dataEndTime to the current date.
  3. Submit the report request using the createReport operation of the Reports API. The API will generate a report for the specified time range.
  4. Retrieve the report status using the getReport operation. This will provide you with the report ID.
  5. Once the report status shows as “DONE”, you can download the report using the getReportDocument operation, passing the report ID as a parameter. This will give you access to the report data.

By following these steps, you should be able to fetch the listing products from the last ten days. Make sure to properly handle pagination if the number of results exceeds the maximum allowed per request.

Please note that you need to be a registered Amazon seller and have authorized access to use the Selling Partner API.