Query String parameter quirks

Surge777xSurge777x Posts: 5Member
I've noticed some strange issues with query string parameters when trying to find a list of sales within a date range. If i don't have them in a specific order they will bring back every sale our account has ever created. I swap the location of the two time variables then it will pull for the date range.
For example

https://api.lightspeedapp.com/API/Account/{account}/Sale.json?load_relations=["SaleLines"]&offset=0&completeTime=>=,2019-01-01T00:00:00-0600&completeTime=<,2019-01-06T00:00:00-0600&completed==,true

gives me this result

        "count": "127",
        "offset": "0",
        "limit": "100"

which is far too many

I had it working previously with

https://api.lightspeedapp.com/API/Account/{account}/Sale.json?load_relations=["SaleLines"]&offset=0&completeTime=<,2019-01-06T00:00:00-0600&completeTime=>=,2019-01-01T00:00:00-0600&completed==,true

        "count": "7",
        "offset": "0",
        "limit": "100"

which is accurate for the date range

I think it should work regardless of the order, but in these cases it changes depending on the order, and sometimes it works one way and sometimes works the other way.
Tags:
Sign In or Register to comment.