I've tried adding discounts at both the order level and item level, and I've tried the following fields oulined in the API Documentation:
`ordercart.lineItems.priceWithModifiersAndItemAndOrderDiscounts`
`ordercart.lineItems.discounts.amount`
`ordercart.discounts.amount`
`ordercart.lineItems.discountAmount`
`ordercart.lineItems.orderLevelDiscountAmount`
The equivalent works for a `percentage` discount, but when I try to do an `amount` based discount I get the following error:
{ "details": "[Invalid value for 'amount']", "message": "invalid_discount_attribute" }
How can I add a value based discount to the item level and order level?
For reference, the full body I am posting:
{ "orderCart": { "lineItems": [ { "quantity": 1, "price": 250, "discountAmount":20, "orderLevelDiscountAmount":30, "item": { "id": "8SFWVR7Z3CNW0", "name": "Avo Go Go2", "price": 250, "taxRates": [], "taxRateValue": 0, "tags": "" }, "modifications":[ { "name":"True Nopal", "amount": 20, "modifier":{ "id":"N1GGT87M65RA8", "modifierGroup":{ "id":"T167H9DA5SM8W" } } }, { "name":"True Nopal 2", "amount": 30, "modifier":{ "id":"N1GGT87M65RA8", "modifierGroup":{ "id":"T167H9DA5SM8W" } } } ], "discounts":[ { "name":"TEST DISCOUNT2", "total": 10, "percentage": 0 } ] }, { "quantity": 1, "price": 250, "discountAmount":20, "orderLevelDiscountAmount":30, "item": { "id": "8SFWVR7Z3CNW0", "name": "Avo Go Go2", "price": 250, "taxRates": [], "taxRateValue": 0, "tags": "" }, "modifications":[ { "name":"True Nopal3", "amount": 20, "modifier":{ "id":"N1GGT87M65RA8", "modifierGroup":{ "id":"T167H9DA5SM8W" } } } ], "discounts":[ { "name":"TEST DISCOUNT2", "total": 20, "percentage": 0 } ] } ], "discounts":[ { "name":"TEST DISCOUNT", "amount": 30, "percentage": 0 } ], "groupLineItems": true } }
Thanks!