Api
Store Cart_apply Coupon
Apply a coupon code to the cart. Validates the coupon against the promotions/campaigns module. Returns the updated cart with discount applied.
Path Parameters
cartId*string
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://loading/v1/store/cart/string/coupon" \ -H "Content-Type: application/json" \ -d '{ "code": "string" }'{
"billingAddress": {
"city": "string",
"country": "string",
"district": "string",
"division": "string",
"house": "string",
"name": "string",
"note": "string",
"phone": "string",
"postcode": "string",
"road": "string",
"thana": "string"
},
"codFee": 0,
"couponCode": "string",
"couponDiscount": 0,
"createdAt": "2019-08-24T14:15:22Z",
"customerId": "string",
"customerNote": "string",
"discountTotal": 0,
"expiresAt": "2019-08-24T14:15:22Z",
"id": "string",
"itemCount": 0,
"items": [
{
"compareAtPrice": 0,
"id": "string",
"lineTotal": 0,
"product": {
"name": "string",
"slug": "string",
"thumbnail": "string"
},
"productId": "string",
"quantity": 0,
"unitPrice": 0,
"variant": {
"images": [
"string"
],
"inStock": true,
"lowStock": true,
"optionValues": {
"property1": "string",
"property2": "string"
}
},
"variantId": "string"
}
],
"paymentMethod": "string",
"shippingAddress": {
"city": "string",
"country": "string",
"district": "string",
"division": "string",
"house": "string",
"name": "string",
"note": "string",
"phone": "string",
"postcode": "string",
"road": "string",
"thana": "string"
},
"shippingFee": 0,
"shippingMethodId": "string",
"shippingMethodName": "string",
"shopId": "string",
"status": "string",
"subtotal": 0,
"total": 0,
"updatedAt": "2019-08-24T14:15:22Z"
}