Anchor to section titled 'undefined'

companyLocationAssignAddress
mutation

Requires write_customers access scope or write_companies access scope. Also: The API client must be installed on a Shopify Plus store.

Updates an address on a company location.


The input fields to use to update the address.

The list of address types on the location to update.

Anchor to locationId
locationId
required

The ID of the company location to update addresses on.


Was this section helpful?

The list of updated addresses on the company location.

The list of errors that occurred from executing the mutation.


Was this section helpful?
Hide code
Mutation reference
Copy
mutation companyLocationAssignAddress($address: CompanyAddressInput!, $addressTypes: [CompanyAddressType!]!, $locationId: ID!) {
  companyLocationAssignAddress(address: $address, addressTypes: $addressTypes, locationId: $locationId) {
    addresses {
      # CompanyAddress fields
    }
    userErrors {
      field
      message
    }
  }
}
Hide code
Input
Copy
{
  "address": {
    "address1": "<your-address1>",
    "address2": "<your-address2>",
    "city": "<your-city>",
    "countryCode": "AC",
    "firstName": "<your-firstName>",
    "lastName": "<your-lastName>",
    "phone": "<your-phone>",
    "recipient": "<your-recipient>",
    "zip": "<your-zip>",
    "zoneCode": "<your-zoneCode>"
  },
  "addressTypes": [
    "BILLING"
  ],
  "locationId": "gid://shopify/<objectName>/10079785100"
}
input CompanyAddressInput {
  address1: String
  address2: String
  city: String
  countryCode: CountryCode
  firstName: String
  lastName: String
  phone: String
  recipient: String
  zip: String
  zoneCode: String
}