Extracting only sales from sale where accountID != 0

shuareyshuarey Member Posts: 2

I have tried a few different parameters, but I can't filter the data down to sales that were either charges or credits to specific customers. So far, all I've got is the following query:

{APIEndPoint}/Account/{account}/Sale.json?offset={offset}&load_relations=all&Sale.customerID!=0

I've tried making the zero wrapped in quotations and just set it to greater than zero, etc.

Basically, I'm just trying to get all Sale objects that have customerID not equal to zero.

If anyone has an idea, I'd appreciate it.

Tags:

2 comments

  • Adrian SamuelAdrian Samuel Moderator, Lightspeed Staff Posts: 573 moderator
    edited September 4

    Hey @shuarey,

    Thank you for your question. To execute a query like that you'll need to do something like this

    https://api.lightspeedhq.com/API/Account/{{accountID}}/Sale.json?customerID=>,0&completed=true

    You can read more about how to use query parameters here: https://developers.lightspeedhq.com/retail/introduction/parameters/

    Hope this helps!

    Adrian Samuel

    API Integrations Consultant - Strategic Solutions

    Lightspeed HQ

  • shuareyshuarey Member Posts: 2

    Thank you Adrian. That helped! It took about 10k results out of my query. Additionally I filtered out another 30k results by saying Sale.SalePayments.SalePayment.paymentTypeID=,4

Sign In or Register to comment.