cancel
Showing results for 
Search instead for 
Did you mean: 

rest api add discount to order

SOLVED

rest api add discount to order

Hi,

 

I would like to add discount to a order created by rest api. I found an example to create a custom api for updating quote: https://www.thirdandgrove.com/creating-custom-rest-api-magento2   How to add discount to this quote?

Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: rest api add discount to order

Hello Jeroen,

Kindly refer to Swagger from Magento2
http://devdocs.magento.com/swagger/#/
NOTE ::: this URL takes time to load all data .

Here you can find
quoteCouponManagementV1
Coupon management service interface.

PUT /V1/carts/{cartId}/coupons/{couponCode}



You can use this REST API to apply coupon to cart

Let me know if you need any more help from my side.

View solution in original post

2 REPLIES 2

Re: rest api add discount to order

Hello Jeroen,

Kindly refer to Swagger from Magento2
http://devdocs.magento.com/swagger/#/
NOTE ::: this URL takes time to load all data .

Here you can find
quoteCouponManagementV1
Coupon management service interface.

PUT /V1/carts/{cartId}/coupons/{couponCode}



You can use this REST API to apply coupon to cart

Let me know if you need any more help from my side.

Re: rest api add discount to order

Hello Amit,

 

How to apply auto discount by api, when we create rule without coupon code.