updateCartBuyerIdentity

updateCartBuyerIdentity updates the buyer's identity if it was not provided in the createCart mutation.

Arguments

input : CartBuyerIdentityUpdateInput!

The input object contains the unique identifier (ID) for the cart and the buyer identity details that need to be associated with the cart.


Returns

CartResponse.*: CartResponse

Any requested field from the CartResponse object.


Examples

{
    "input": {
        "id": "{{cartId}}",
        "buyerIdentity": {
            "firstName": "{{firstName}}",
            "lastName": "{{lastName}}",
            "email": "{{email}}",
            "phone": "{{phone}}",
            "address1": "{{address1}}",
            "address2": "{{address2}}",
            "city": "{{city}}",
            "provinceCode": "{{provinceCode}}",
            "countryCode": "US",
            "postalCode": "{{postalCode}}"
        }
    }
}
mutation ($input: CartBuyerIdentityUpdateInput!) {
    updateCartBuyerIdentity(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
                        }
                    }
                }
            }
        }
    }
}