link retail sale with return on api

in Development
I have noticed that the Sale API returns all transactions including refunds. However there doesn't appear to be a way of linking the original sale with the corresponding return.
It seems it is possible since if I look on Lightspeed I can see the original sale ID on the return.
Where is this link on the API?
Thanks
It seems it is possible since if I look on Lightspeed I can see the original sale ID on the return.
Where is this link on the API?
Thanks
Best Answers
-
jamesratcliffe Posts: 160 moderator
@reports: There's no direct link between the 2 sale records. All refunds in Lightspeed Retail are at the line item level. TheSaleLine.parentSaleLineID
points to the original SaleLine. You can use that to find the original sale:GET /API/Account/X/Sale.json?load_relations=["SaleLines"]&SaleLines.parentSaleLineID=Y
James Ratcliffe
Lightspeed HQ
Answers
Make sure you select "Did this answer the question?" right below the comment that contains the answer you're accepting.
Lightspeed HQ