-1

I have used this example to create a custom api for updating quote by rest: https://www.thirdandgrove.com/creating-custom-rest-api-magento2

Also I have found this example to add discount to quote: https://webkul.com/blog/set-custom-discount-fee-cart-magento-2/

How to combine this examples to add discount to magento2 quote by custom rest api?

1 Answers1

0

I have the answer already: I have added a coupon code in Magento and did a put request to carts/{ID}/coupons/{coupon code} with empty request body to add discount to cart.