Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set date range for requestReport using Amazon Advertising API?

Is it possible to set date range for requestReport?

POST /v2/sp/{recordType}/report

 {
   "segment": {segment},
   "reportDate": {reportDate}, <-- here
   "metrics": {metrics}
 }  

Or do I need to make 30 request in order to get results for a month? Maybe snapshots can help?

like image 814
lidox Avatar asked Mar 19 '19 08:03

lidox


2 Answers

Yes, you have to do multiple requests (one for each day) and merge them. The Advertising API currently does not offer an option to request data for a date range. Snapshots can maybe help you to get data which has no click data for the requested date(s).

like image 192
tector Avatar answered Oct 18 '22 00:10

tector


Yes, you do. What I do is run it daily using a cron job and load the data into a database, and query the database. Keep in mind certain metrics, like sales, don't finalize until after the attribution window e.g. 14 days.

like image 27
mr_mooo_cow Avatar answered Oct 17 '22 23:10

mr_mooo_cow