Arguments
applyCouponRequestInput
ApplyCouponRequestInputApply coupon request schema used to apply the coupon that includes cart id and coupon to be applied.
Select `true` to retrieve the price breakup of cart items.
Select `true` to retrieve all the items added in the cart.
id
StringThe unique identifier of the cart.
Select `true` for getting a payment option in response.
buyNow
BooleanThis is boolean to get buy_now cart.
cartType
StringThe type of cart.
Response
applied_promo_details
[AppliedPromotion]List of applied promotions data to cart which includes promotion id, promotion name, offer text, description, buy rules, discount rules and promotion type.
breakup_values
CartBreakupPrice breakup of cart which denotes different values like coupon, display, and loyalty points.
buy_now
BooleanBuy now flag for the cart which denotes user is doing fast checkout for the cart using buy now.
cart_id
IntUnique identifier of the user cart.
checkout_mode
StringCheckout mode of user cart.
comment
StringComment message to be added in user cart.
coupon
CartDetailCouponCoupon data of user cart which denotes if coupon is applied, coupon code, coupon amount, coupon title and coupon message.
common_config
CartCommonConfigCommon config at sales channel which includes delivery charge config.
coupon_text
StringCoupon text of coupon applied on cart.
currency
CartCurrencyCurrency of the price for the cart.
delivery_charge_info
StringDelivery charge in information message on shipment.
delivery_promise
DeliveryPromiseResponseDelivery promise of user cart.
gstin
StringGSTIN added in user cart.
id
StringUnique identifier of the user cart.
is_valid
BooleanCart validity flag determines the if the response is valid or not.
items
[CartProductInfo]Items data list in user cart that includes item id, item size, store id, available sizes and rest of the item related data.
last_modified
StringLast modified timestamp of cart.
message
StringMessage of the get cart detail API response.
notification
JSONNotification object which denotes notification data for user cart.
pan_config
JSONPan card config states at what condition user should enter the pan card.
pan_no
StringPermanent Account Number of the user.
payment_selection_lock
PaymentSelectionLockPayment selection lock config for the user cart.
restrict_checkout
BooleanRestrict checkout flag to restrict the checkout process.
staff_user_id
StringStaff employee user id if cart is created by staff employee for the customer.
success
BooleanSuccess flag of get cart detail API response.
uid
StringUnique identifier of the user cart.
custom_cart_meta
JSONMetadata for custom cart
Mutation
1mutation applyCoupon(2 $applyCouponRequestInput: ApplyCouponRequestInput3 $b: Boolean4 $i: Boolean5 $id: String6 $p: Boolean7 $buyNow: Boolean8 $cartType: String9) {10 applyCoupon(11 applyCouponRequestInput: $applyCouponRequestInput12 b: $b13 i: $i14 id: $id15 p: $p16 buyNow: $buyNow17 cartType: $cartType18 ) {19 applied_promo_details {20 amount21 article_quantity22 code23 meta24 mrp_promotion25 offer_text26 promo_id27 promotion_group28 promotion_name29 promotion_type30 cancellation_allowed31 }32 buy_now33 cart_id34 checkout_mode35 comment36 coupon {37 cashback_amount38 cashback_message_primary39 cashback_message_secondary40 coupon_code41 coupon_description42 coupon_id43 coupon_subtitle44 coupon_title45 coupon_type46 coupon_value47 discount48 is_applied49 is_valid50 maximum_discount_value51 message52 minimum_cart_value53 }54 coupon_text55 currency {56 code57 symbol58 }59 delivery_charge_info60 gstin61 id62 is_valid63 items {64 coupon_message65 custom_order66 discount67 is_set68 key69 message70 moq71 parent_item_identifiers72 product_ean_id73 quantity74 bulk_offer75 }76 last_modified77 message78 notification79 pan_config80 pan_no81 payment_selection_lock {82 default_options83 enabled84 payment_identifier85 }86 restrict_checkout87 staff_user_id88 success89 uid90 custom_cart_meta91 }92}
Try it
Input Variables
1{2 "applyCouponRequestInput": {3 "coupon_code": "coupon_code"4 },5 "b": true,6 "i": true,7 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",8 "p": true,9 "buyNow": true,10 "cartType": "cartType"11}
Response
1{2 "applyCoupon": {3 "applied_promo_details": [4 {5 "amount": 30.7,6 "article_quantity": 42,7 "code": "code",8 "meta": {},9 "mrp_promotion": true,10 "offer_text": "offer_text",11 "promo_id": "promo_id",12 "promotion_group": "promotion_group",13 "promotion_name": "promotion_name",14 "promotion_type": "promotion_type",15 "cancellation_allowed": true16 }17 ],18 "buy_now": true,19 "cart_id": 42,20 "checkout_mode": "checkout_mode",21 "comment": "comment",22 "coupon": {23 "cashback_amount": 30.7,24 "cashback_message_primary": "cashback_message_primary",25 "cashback_message_secondary": "cashback_message_secondary",26 "coupon_code": "coupon_code",27 "coupon_description": "coupon_description",28 "coupon_id": "coupon_id",29 "coupon_subtitle": "coupon_subtitle",30 "coupon_title": "coupon_title",31 "coupon_type": "coupon_type",32 "coupon_value": 30.7,33 "discount": 30.7,34 "is_applied": true,35 "is_valid": true,36 "maximum_discount_value": 30.7,37 "message": "message",38 "minimum_cart_value": 30.739 },40 "coupon_text": "coupon_text",41 "currency": {42 "code": "code",43 "symbol": "symbol"44 },45 "delivery_charge_info": "delivery_charge_info",46 "gstin": "gstin",47 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",48 "is_valid": true,49 "items": [50 {51 "coupon_message": "coupon_message",52 "custom_order": {},53 "discount": "discount",54 "is_set": true,55 "key": "key",56 "message": "message",57 "moq": {},58 "parent_item_identifiers": {},59 "product_ean_id": "product_ean_id",60 "quantity": 42,61 "bulk_offer": {}62 }63 ],64 "last_modified": "last_modified",65 "message": "message",66 "notification": {},67 "pan_config": {},68 "pan_no": "pan_no",69 "payment_selection_lock": {70 "default_options": "default_options",71 "enabled": true,72 "payment_identifier": "payment_identifier"73 },74 "restrict_checkout": true,75 "staff_user_id": "staff_user_id",76 "success": true,77 "uid": "uid",78 "custom_cart_meta": {}79 }80}
Was this section helpful?