Cannot add Discount to a Sale via API

in Development
Hello,
Discount parameter seem to be ignored by the API when request is posted:
Here is request, which creates the sale successfully, but in response/nore in Reports->Totals discount is not present
{ "Discount": { "name": "Online Store Discount", "discountPercent": 10 }, "shopID": 1, "employeeID": 1, "registerID": 1, "completed": true, "SaleLines": { "SaleLine": [ { "itemID": "2", "unitQuantity": 2 }, { "itemID": "3", "unitQuantity": 2 } ] }, "SalePayments": { "SalePayment": { "amount": 45, "paymentTypeID": 3 } }, "enablePromotions": true, "taxCategoryID": "2" }
What may be the reason?
Thanks
1 comment
Hey @dmchuba,
You'll need to specify the discountID on the SaleLine level or on the whole sale level
I hope this helps!
Adrian Samuel
Software Developer
Lightspeed HQ