Query for returning only products where inventory is available?

thisisbolothisisbolo Member Posts: 25
Is there a way to do this in the the call? Is there a query partaker for this like &qoh>0?
Super Cat Lightspeed


  • Alex LugoAlex Lugo Administrator, Lightspeed Staff Posts: 181 moderator
    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
    Alex Lugo
    API Support Specialist
    Lightspeed HQ
  • thisisbolothisisbolo Member Posts: 25
    That's great Alex. It worked! Thank you. For anyone that needs this URL encoded, this is what it would look like:


    It looks like you don't need the .qoh=>,0 encoded out. When I did this, it returned an error.
    Super Cat Lightspeed
Sign In or Register to comment.