Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart.
Arguments
areaCode
StringCustomer servicable area_code.
Select `true` to retrieve the price breakup of cart items.
buyNow
BooleanSelect `true` to set/initialize buy now cart.
Select `true` to retrieve all the items added in the cart.
id
StringThe unique identifier of the cart.
updateCartRequestInput
UpdateCartRequestInputUpdate cart request data that involves items in cart and operation to be performed for items specified.
cartType
StringThe type of cart.
orderType
StringThe order type of shipment HomeDelivery - If the customer wants the order home-delivered PickAtStore - If the customer wants the handover of an order at the store itself.
Response
Get cart detail API response schema which includes applied promo details, breakup values, buy_now, cart id, checkout mode, comment common config, coupon, coupon text, gstin etc.
message
StringMessage of update cart API response.
success
BooleanTrue if all items are added successfully. False if partially added or not added.
Mutation
1mutation updateCart(2 $areaCode: String3 $b: Boolean4 $buyNow: Boolean5 $i: Boolean6 $id: String7 $updateCartRequestInput: UpdateCartRequestInput8 $cartType: String9 $orderType: String10) {11 updateCart(12 areaCode: $areaCode13 b: $b14 buyNow: $buyNow15 i: $i16 id: $id17 updateCartRequestInput: $updateCartRequestInput18 cartType: $cartType19 orderType: $orderType20 ) {21 cart {22 buy_now23 cart_id24 checkout_mode25 comment26 coupon_text27 delivery_charge_info28 gstin29 id30 is_valid31 last_modified32 message33 notification34 pan_config35 pan_no36 restrict_checkout37 staff_user_id38 success39 uid40 custom_cart_meta41 }42 message43 success44 }45}
Try it
Input Variables
1{2 "areaCode": "areaCode",3 "b": true,4 "buyNow": true,5 "i": true,6 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",7 "updateCartRequestInput": {8 "items": [9 {10 "_custom_json": {},11 "article_id": "article_id",12 "extra_meta": {},13 "identifiers": {14 "identifier": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e"15 },16 "item_id": 42,17 "item_index": 42,18 "item_size": "item_size",19 "meta": {},20 "parent_item_identifiers": {},21 "quantity": 4222 }23 ],24 "operation": "update_item"25 },26 "cartType": "cartType",27 "orderType": "orderType"28}
Response
1{2 "updateCart": {3 "cart": {4 "buy_now": true,5 "cart_id": 42,6 "checkout_mode": "checkout_mode",7 "comment": "comment",8 "coupon_text": "coupon_text",9 "delivery_charge_info": "delivery_charge_info",10 "gstin": "gstin",11 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",12 "is_valid": true,13 "last_modified": "last_modified",14 "message": "message",15 "notification": {},16 "pan_config": {},17 "pan_no": "pan_no",18 "restrict_checkout": true,19 "staff_user_id": "staff_user_id",20 "success": true,21 "uid": "uid",22 "custom_cart_meta": {}23 },24 "message": "message",25 "success": true26 }27}
Was this section helpful?