Apply Customer Discount on Sale creation

in Development
So I still can't quite figure out how to apply a discount when creating a sale through the API.
The user associated with the sale has a Discount. How do I make sure that his discount is applied when creating the sale?
The user associated with the sale has a Discount. How do I make sure that his discount is applied when creating the sale?
2 comments
You'll need to make two calls. To do this efficiently I would suggest a GET and then a POST.
You'll need to first do a GET to query the customer. You can do this with the following request url:
You'll then need to get the discountID object value from the response and then put that in your POST request body
So your request url would be
Let's say the SalePayment.amount was greater than the value on the sale then the response body will return a Sale.change object which will tell you how much they've overpaid by.
I hope this helps!
Adrian Samuel
Software Developer
Lightspeed HQ