Anchor to section titled 'undefined'

customerAddressUpdate
mutation

Requires unauthenticated_write_customers access scope.

Updates the address of an existing customer.


The customer’s mailing address.

Anchor to customerAccessToken
customerAccessToken
required

The access token used to identify the customer.

Anchor to id
id
required

Specifies the customer address to update.


Was this section helpful?

The customer’s updated mailing address.

The list of errors that occurred from executing the mutation.

The list of errors that occurred from executing the mutation. Use customerUserErrors instead.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation customerAddressUpdate($address: MailingAddressInput!, $customerAccessToken: String!, $id: ID!) {
  customerAddressUpdate(address: $address, customerAccessToken: $customerAccessToken, id: $id) {
    customerAddress {
      # MailingAddress fields
    }
    customerUserErrors {
      # CustomerUserError fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "address": {
    "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>"
  },
  "customerAccessToken": "<your-customerAccessToken>",
  "id": "gid://shopify/<objectName>/10079785100"
}
input MailingAddressInput {
  address1: String
  address2: String
  city: String
  company: String
  country: String
  firstName: String
  lastName: String
  phone: String
  province: String
  zip: String
}