Is there a way in the API to see a name for a discount given? We have several types of discounts that can be applied to an order but would like to be able to search on this field.
Thank you for contacting us.
When you go to https://developers.lightspeedhq.com/retail/endpoints/Sale/ you can find all additional relations which give you more details about the sale.
For checking the name of the Discount you need the following query:
I hope this helps.
What would be the easiest way to find all order on a specific date with a Discount whose name is "XXXX"?
I don't think that the Retail API is granular enough to facilitate querying across linked "tables" to this degree. You likely will need to just pull all orders for a specific date, with this relation loaded, and parse the results to keep only those orders who match what you want.