Anchor to companyLocationAssignAddresscompany
companyLocationAssignAddress
mutation
Requires access scope or
access scope. Also: The API client must be installed on a Shopify Plus store.
Updates an address on a company location.
Anchor to Arguments
Arguments
- Anchor to addressaddress•Company
Address requiredInput! The input fields to use to update the address.
- Anchor to addressTypesaddress•
Types [CompanyAddress requiredType!]! The list of address types on the location to update.
- Anchor to locationIdlocation•
Id ID!required The ID of the company location to update addresses on.
Was this section helpful?
Anchor to CompanyLocationAssignAddressPayload returnsCompanyLocationAssignAddressPayload returns
- Anchor to addressesaddresses•
The list of updated addresses on the company location.
- Anchor to userErrorsuser•
Errors [BusinessCustomer non-nullUser Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
mutation companyLocationAssignAddress($address: CompanyAddressInput!, $addressTypes: [CompanyAddressType!]!, $locationId: ID!) {
companyLocationAssignAddress(address: $address, addressTypes: $addressTypes, locationId: $locationId) {
addresses {
# CompanyAddress fields
}
userErrors {
field
message
}
}
}
Input
{
"address": {
"address1": "<your-address1>",
"address2": "<your-address2>",
"city": "<your-city>",
"countryCode": "",
"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"
}
{
"address": {
"address1": "<your-address1>",
"address2": "<your-address2>",
"city": "<your-city>",
"countryCode": "",
"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
}