updateCartItems

updateCartItems updates only the quantity of existing products in a cart. No error is returned if prompted to update a non-existing product.

Arguments

input : CartItemsUpdateInput!

The input object contains the unique identifier (ID) for the cart and the items with their quantities that need to be updated.


Returns

CartResponse.*: CartResponse

Any requested field from the CartResponse object.


Examples

{
    "input": {
        "id": "{{cartId}}",
        "items": {
            "amazonCartItemsInput": [{
                "quantity": 1,
                "productId": "{{productId}}"
            }],
            "shopifyCartItemsInput": [{
                "quantity": 1,
                "variantId": "{{variantId}}"
            }]
        }
    }
}
mutation ($input: CartItemsUpdateInput!) {
    updateCartItems(input: $input) {
        id
        buyerIdentity {
            firstName
            lastName
            address1
            address2
            city
            provinceCode
            countryCode
            postalCode
            email
            phone
        }
        stores {
            ... on AmazonStore {
                store
                cartLines {
                    quantity
                    product {
                        id
                    }
                }
                offer {
                    subtotal {
                        value
                        displayValue
                        currency
                    }
                    margin {
                        value
                        displayValue
                        currency
                    }
                    notAvailableIds
                    shippingMethods {
                        id
                        label
                        price {
                            value
                            displayValue
                            currency
                        }
                        taxes {
                            value
                            displayValue
                            currency
                        }
                        total {
                            value
                            displayValue
                            currency
                        }
                    }
                }
            }
            ... on ShopifyStore {
                store
                cartLines {
                    quantity
                    variant {
                        id
                    }
                }
                offer {
                    subtotal {
                        value
                        displayValue
                        currency
                    }
                    margin {
                        value
                        displayValue
                        currency
                    }
                    notAvailableIds
                    shippingMethods {
                        id
                        label
                        price {
                            value
                            displayValue
                            currency
                        }
                        taxes {
                            value
                            displayValue
                            currency
                        }
                        total {
                            value
                            displayValue
                            currency
                        }
                    }
                }
            }
        }
    }
}