0👍
Looks like you are not applying your timestamps correctly in your axios call. You can use JS’ template string syntax to expand the values in order to call the correct URL:
axios.get(`https://testing.com/wp-json/wc/v3/orders?after=${startCombineDateAndTime}&before=${closeCombineDateAndTime}&per_page=40&consumer_key=ck_123&consumer_secret=cs_456`)
0👍
Solved it through fixing the axios.get url and convertingJS timestamp to ISO8601 compliant date. If anyone needs…
var today= new Date();
today.setHours(0, 0, 0, 0);
var isoTimeType = today.toISOString();
axios.get('https:/testing.de/wp-json/wc/v3/orders?per_page=40&consumer_key=ck_123&consumer_secret=cs_456', {
params: {
after: isoTimeType
}
})
Source:stackexchange.com