Sale endpoint return

Andres1219Andres1219 Member Posts: 6


I'm trying to retrieve the sales but I'm quite confused. If I understand, it returns non cancelled et non voided invoices.

When I filter the returns with completed = true and calctotal != 0, I get the same count that what I can find in all transactions report. But when I don't filter on completed = true, the count isn't the same.

What kind of transactions does the Sale endpoint returns?

Thanks for helping me.


  • gregaricangregarican Member Posts: 744 

    There are a few query parameters you can try, like voided=true/false, archived=true/false, completed=true/false, etc. When I was developing our API queries I would frequently compare the JSON response against a Lightspeed Retail report in the web client.

    If you aren't filtering your API query against completed = true, then your response would include transactions that weren't truly completed. For example, the customer and item(s) were selected into a "cart" but the payment wasn't tendered. Think of them like abandoned carts on an e-com site. :)

    For true sales via the API I would typically include voided=false&completed=true&archived=false in my query parameters I believe.

  • Andres1219Andres1219 Member Posts: 6

    Thanks for the answer :) .

    Actually, it's because there are quite a bunch of bad manipulations in the sales and that's why the results I get differs from the all transaction report if it may can someone else :)

Sign In or Register to comment.