Missing Sales when querying Sale Endpoint

Daelan WoodDaelan Wood Member Posts: 1

I'm wondering if anyone here might have some insight into why a specific Sale is not showing when I use the following API request:

https://api.lightspeedapp.com/API/Account/XXXXXXXXXXX/Sale.json?timeStamp==>,'.$date.'&limit='.$limit.'&offset='.$offset.'&orderby=timeStamp&archived=true

This Query will return results for the Sale 24661 and 24663 but it doesn't show 24662

When I query the specific saleID it gives me proper results

https://api.lightspeedapp.com/API/Account/XXXXXXXX/Sale/24662.json

Any ideas why the first one isn't returning any results? Sale hasn't been cancelled or voided or archived.

2 comments

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 654 moderator
    Hey @Daelan Wood

    In your initial query you've specified in the url that it should only show sales that are archived.

    You also said the specific sale you're looking for "hasn't been cancelled or voided or archived".

    So the reason it isn't showing in your initial query is because it has been filtered out and the reason why it is showing in your specific SaleID request is because you are searching for that specific sale and haven't associated any query parameters to filter it out

    Adrian Samuel

    Software Developer

    Lightspeed HQ

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 654 moderator
    @Daelan Wood it looks like I might have misunderstood your question and I want to explore further.

    Could you send me the full request details that you detailed in your original request. Remove the AccountID but please include the offset, the date and limit 

    Adrian Samuel

    Software Developer

    Lightspeed HQ

Sign In or Register to comment.