Anchor to section titled 'undefined'

cartBuyerIdentityUpdate
mutation

Updates customer information associated with a cart. Buyer identity is used to determine international pricing and should match the customer's shipping address.


The customer associated with the cart. Used to determine international pricing. Buyer identity should match the customer's shipping address.

Anchor to cartId
cartId
required

The ID of the cart.


Was this section helpful?

The updated cart.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation cartBuyerIdentityUpdate($buyerIdentity: CartBuyerIdentityInput!, $cartId: ID!) {
  cartBuyerIdentityUpdate(buyerIdentity: $buyerIdentity, cartId: $cartId) {
    cart {
      # Cart fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "buyerIdentity": {
    "companyLocationId": "gid://shopify/<objectName>/10079785100",
    "countryCode": "AC",
    "customerAccessToken": "<your-customerAccessToken>",
    "deliveryAddressPreferences": [
      {
        "customerAddressId": "gid://shopify/<objectName>/10079785100",
        "deliveryAddress": {
          "address1": "<your-address1>",
          "address2": "<your-address2>",
          "city": "<your-city>",
          "company": "<your-company>",
          "country": "<your-country>",
          "firstName": "<your-firstName>",
          "lastName": "<your-lastName>",
          "phone": "<your-phone>",
          "province": "<your-province>",
          "zip": "<your-zip>"
        },
        "deliveryAddressValidationStrategy": "COUNTRY_CODE_ONLY",
        "oneTimeUse": true
      }
    ],
    "email": "<your-email>",
    "phone": "<your-phone>",
    "preferences": {
      "delivery": {
        "coordinates": {
          "countryCode": "AC",
          "latitude": 1.1,
          "longitude": 1.1
        },
        "deliveryMethod": [
          "PICKUP_POINT"
        ],
        "pickupHandle": [
          "<your-pickupHandle>"
        ]
      },
      "wallet": [
        "<your-wallet>"
      ]
    }
  },
  "cartId": "gid://shopify/<objectName>/10079785100"
}
input CartBuyerIdentityInput {
  companyLocationId: ID
  countryCode: CountryCode
  customerAccessToken: String
  deliveryAddressPreferences: [DeliveryAddressInput!]
  email: String
  phone: String
  preferences: CartPreferencesInput
}

input DeliveryAddressInput {
  customerAddressId: ID
  deliveryAddress: MailingAddressInput
  deliveryAddressValidationStrategy: DeliveryAddressValidationStrategy
  oneTimeUse: Boolean
}

input CartPreferencesInput {
  delivery: CartDeliveryPreferenceInput
  wallet: [String!]
}