timeStamp not working in Sales search via php

rsirotarsirota Member Posts: 50

I am trying to load all sales for a specific date (ie 1/14/2021). The following code was produced by Postman and works in postman, however in my php script it does not.

CURLOPT_URL => 'https://api.lightspeedapp.com/API/Account/215990/Sale?load_relations=%5B%22SaleLines.Discount%22,%20%22Customer%22%5D&timeStamp=%3E,2021-01-14T08:00:00'

I have tried the following:

$tokenURL = "https://api.lightspeedapp.com/API/Account/{$accountID}/Sale?load_relations={$relations}&timeStamp>,2021-01-14";

and

$tokenURL = "https://api.lightspeedapp.com/API/Account/{$accountID}/Sale?load_relations={$relations}&timeStamp>,2021-01-14T00:00:01-8:00";

and

$tokenURL = "https://api.lightspeedapp.com/API/Account/{$accountID}/Sale?load_relations={$relations}&timeStamp>,2021-01-14T08:00:00";

and even converted the date to a datetime object.

However, I am getting records back with the following dates: 2020-02-07T22:35:31+00:00 and beyond..


Any suggestions?

Tags:
Sign In or Register to comment.