Arguments
id
StringThe unique identifier of the cart.
areaCode
StringCustomer servicable area_code.
includeBreakup
BooleanThis is a boolean value. Select `true` to retrieve the price breakup of cart items.
buyNow
BooleanThis is a boolen value. Select `true` to set/initialize buy now cart.
includeAllItems
BooleanThis is a boolean value. Select `true` to retrieve all the items added to the cart.
addCartRequestInput
AddCartRequestInput Specify the item details as shown below. Refer `AddCartRequest` for more details.
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
cart
CartGet 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 add to cart API response.
partial
BooleanWhen adding multiple items check if all added. True if only few are added.
success
BooleanTrue if all items are added successfully. False if partially added or not added.
Mutation
1mutation addItemsToCart(2 $id: String3 $areaCode: String4 $includeBreakup: Boolean5 $buyNow: Boolean6 $includeAllItems: Boolean7 $addCartRequestInput: AddCartRequestInput8 $orderType: String9) {10 addItemsToCart(11 id: $id12 areaCode: $areaCode13 includeBreakup: $includeBreakup14 buyNow: $buyNow15 includeAllItems: $includeAllItems16 addCartRequestInput: $addCartRequestInput17 orderType: $orderType18 ) {19 cart {20 buy_now21 cart_id22 checkout_mode23 comment24 coupon_text25 delivery_charge_info26 gstin27 id28 is_valid29 last_modified30 message31 notification32 pan_config33 pan_no34 restrict_checkout35 user_cart_items_count36 staff_user_id37 uid38 success39 custom_cart_meta40 }41 message42 partial43 success44 }45}
Try it
Input Variables
1{2 "id": "08a16b83-9094-4e89-8c05-2ccadd5c1c7e",3 "areaCode": "areaCode",4 "includeBreakup": true,5 "buyNow": true,6 "includeAllItems": true,7 "addCartRequestInput": {8 "items": [9 {10 "_custom_json": {},11 "article_assignment": {},12 "article_id": "article_id",13 "display": "display",14 "extra_meta": {},15 "item_id": 42,16 "item_size": "item_size",17 "meta": {},18 "parent_item_identifiers": [19 {}20 ],21 "pos": true,22 "product_group_tags": [23 "product_group_tags"24 ],25 "quantity": 42,26 "seller_id": 42,27 "store_id": 42,28 "seller_identifier": "seller_identifier"29 }30 ],31 "new_cart": true32 },33 "orderType": "orderType"34}
Response
1{2 "addItemsToCart": {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 "user_cart_items_count": 42,20 "staff_user_id": "staff_user_id",21 "uid": "uid",22 "success": true,23 "custom_cart_meta": {}24 },25 "message": "message",26 "partial": true,27 "success": true28 }29}
Was this section helpful?