I am running the following code trying to cycle through days of the month with a for loop. The query payload works, but it sends back my very first orders rather than orders within the date range.
If I write the same payload without the variables, I get the accurate data
I’m not terribly familiar with javascript, but just a quick glance, I think your issue may be that your days are not zero filled in your dates. The format should be YYYY-MM-DD.