Query String parameter quirks

Surge777xSurge777x Member Posts: 6
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


gives me this result

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

which is far too many

I had it working previously with


        "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.


  • Michael CareyMichael Carey Administrator, Lightspeed Staff Posts: 60 moderator
    edited February 2019


    Rather than providing two parameters to get the date range (greater than and less than), you could try using the 'between' operator.


    You can read more about the available query operators here: https://developers.lightspeedhq.com/retail/introduction/parameters/#query-operators


    Michael Carey

    Product Manager
    Lightspeed HQ
  • Surge777xSurge777x Member Posts: 6

    I did find the solution to this issue, using the between operator in the query string instead of greater than and less than

    ><%3E%3CBetween operator. Search values that are within a range. (Example: itemID=><,1,10 would return all itemIDs greater than or equal to 1 and less than or equal to 10)

Sign In or Register to comment.