Trying to apply a discount amount on the order and it doesn't work when I use update order API.
Trying to apply a discount amount on the order and it doesn't work when I use update order API.
What does "doesn't work" mean? Are you getting an error, if so what is it? What environment are you working in? What is the request you are making?
Please see the "Add Discounts" section in our working with orders documentation - https://docs.clover.com/clover-platform/docs/working-with-orders
Using sandbox environment. Directly applying discount from api reference page. Getting 200 response but it is not updating the order. I am sending discount name and amount (-200)
It is not clear to me what "not updating the order" means. What are you expecting to see? Have you seen our working with orders documentation - https://docs.clover.com/clover-platform/docs/working-with-orders? You may want to take a look at the "calculating order totals" section. If reading this doesn't help send the complete request in a private comment/post (see the sticky).
Order discount didn't get updated when I called the below API.
Below is the request
curl --request POST \ --url 'https://sandbox.dev.clover.com/v3/merchants/VV5REWPA9BWE1/orders/K01J9CNJGNEH0?access_token=<scrubbed>' \ --header 'content-type: application/json' \ --data '{"discounts":[{"discount":{},"approver":{},"name":"QuSe","amount":-100}]}'
Below is the response 200 OK.
{"href":
"https://sandbox.dev.clover.com/v3/merchants/VV5REWPA9BWE1/orders/K01J9CNJGNEH0"
"id":
"K01J9CNJGNEH0"
"currency":
"USD"
"employee":{
...
}"total":
1409
"externalReferenceId":
"C7F5E0"
"title":
"QuSe Order"
"note":
"Takeout-ASAP 1111111111"
"taxRemoved":
false
"isVat":
false
"state":
"OPEN"
"manualTransaction":
false
"groupLineItems":
true
"testMode":
false
"createdTime":
1589057464000
"clientCreatedTime":
1589057464000
"modifiedTime":
1589057463000
}
1 Person is following this question.