mutation

updateCart

Update cart. Customers can modify added product attributes such as quantity and size, as well as remove items from the cart.
Arguments
areaCode
String
Customer servicable area_code.
Select `true` to retrieve the price breakup of cart items.
buyNow
Boolean
Select `true` to set/initialize buy now cart.
Select `true` to retrieve all the items added in the cart.
The unique identifier of the cart.
updateCartRequestInput
UpdateCartRequestInput
Update cart request data that involves items in cart and operation to be performed for items specified.
cartType
String
The type of cart.
orderType
String
The 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
String
Message of update cart API response.
success
Boolean
True if all items are added successfully. False if partially added or not added.
Mutation
1mutation updateCart(
2 $areaCode: String
3 $b: Boolean
4 $buyNow: Boolean
5 $i: Boolean
6 $id: String
7 $updateCartRequestInput: UpdateCartRequestInput
8 $cartType: String
9 $orderType: String
10) {
11 updateCart(
12 areaCode: $areaCode
13 b: $b
14 buyNow: $buyNow
15 i: $i
16 id: $id
17 updateCartRequestInput: $updateCartRequestInput
18 cartType: $cartType
19 orderType: $orderType
20 ) {
21 cart {
22 buy_now
23 cart_id
24 checkout_mode
25 comment
26 coupon_text
27 delivery_charge_info
28 gstin
29 id
30 is_valid
31 last_modified
32 message
33 notification
34 pan_config
35 pan_no
36 restrict_checkout
37 staff_user_id
38 success
39 uid
40 custom_cart_meta
41 }
42 message
43 success
44 }
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": 42
22 }
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": true
26 }
27}