@plentymarkets/shop-api / doAddCoupon
Function: doAddCoupon() ​
doAddCoupon(
context
,params
):Promise
<Data
<AddCouponResponse
>>
Method doAddCoupon - Used to add a coupon to the cart.
Parameters ​
• context: PlentysystemsIntegrationContext
• params: DoAddCouponParams
couponCode: string,
Returns ​
Promise
<Data
<AddCouponResponse
>>
The cart or error.
Remarks ​
- Calls /rest/storefront/coupons/
- Method should be used to add a coupon to the cart.
Example ​
ts
const { data, error } = await sdk.boilerplate.doAddCoupon({
couponCode: ''
});