Join
Log In
English
EN
FR
NL
Menu
Log In
API
OnSite
Restaurant
eCom
Retail
Query for returning only products where inventory is available?
thisisbolo
Member
Posts:
26
October 2018
in
Development
Is there a way to do this in the the call? Is there a query partaker for this like &qoh>0?
Super Cat Lightspeed
Tags:
api
0
·
Share on Google+
2 comments
[Deleted User]
Posts:
0
October 2018
Hello
@thisisbolo
,
Yes, this is possible loading first the relation "ItemShops" and then using the query parameter ">". See my code sample below.
GET /API/Account/{{accountID}}/Item?load_relations=["ItemShops"]&ItemShops.qoh=>,0
0
·
Share on Google+
thisisbolo
Member
Posts:
26
October 2018
That's great Alex. It worked! Thank you. For anyone that needs this URL encoded, this is what it would look like:
https://api.lightspeedapp.com/API/Account/{{accountID}}/Item.json?load_relations=["ItemShops"]&ItemShops.qoh=>,0
It looks like you don't need the .qoh=>,0 encoded out. When I did this, it returned an error.
Super Cat Lightspeed
0
·
Share on Google+
Sign In
or
Register
to comment.
2 comments
Yes, this is possible loading first the relation "ItemShops" and then using the query parameter ">". See my code sample below.