Customer Address
Represents a customer's mailing address. For example, a customer's default address and an order's billing address are both mailing addresses. Apps using the Customer Account API must meet the protected customer data requirements.
Anchor to FieldsFields
- Anchor to address1address1•String
The first line of the address. Typically the street address or PO Box number.
- Anchor to address2address2•String
The second line of the address. This is typically the apartment, suite, or unit number.
- Anchor to citycity•String
The name of the city, district, village, or town.
- Anchor to companycompany•String
The name of the customer's company or organization.
- Anchor to countrycountry•String
The name of the country.
- Anchor to firstNamefirst•String
Name The first name of the customer.
- Anchor to formattedformatted•[String!]!non-nullPre-auth accessible
A formatted version of the address, customized by the provided arguments.
- Anchor to formattedAreaformatted•String
Area A comma-separated list of the values for city, province, and country.
- •ID!non-nullPre-auth accessible
A globally-unique ID.
- Anchor to lastNamelast•String
Name The last name of the customer.
- Anchor to namename•String
The full name of the customer, based on firstName and lastName.
- Anchor to phoneNumberphone•String
Number The customer's unique phone number.
Formatted using E.164 standard. For example, +16135551111.
- Anchor to provinceprovince•String
The region of the address, such as the province, state, or district.
- Anchor to territoryCodeterritory•Country
Code Code The two-letter code for the country of the address.
For example, US.
- •String
The zip or postal code of the address.
- Anchor to zoneCodezone•String
Code The alphanumeric code for the region.
For example, ON.
Anchor to MutationsMutations
- •mutation
Creates a new address for a customer.
- Anchor to addressaddress•Customer
Address Input! required Specifies the fields to use when creating the address.
- Anchor to defaultAddressdefault•Boolean
Address Default:false The flag to set the address as the default address.
Arguments
- Anchor to customerAddresscustomer•Customer
Address Address The created customer address.
- Anchor to userErrorsuser•[User
Errors Errors Customer Address User Errors!]! non-null The list of errors that occurred from executing the mutation.
Fields
- •mutation
Updates a specific address for a customer.
- Anchor to addressaddress•Customer
Address Input Specifies the fields to use when updating the address.
- Anchor to addressIdaddress•ID!
Id required The ID of the address to be updated.
- Anchor to defaultAddressdefault•Boolean
Address Default:null The flag to set the address as the default address.
Arguments
- Anchor to customerAddresscustomer•Customer
Address Address The updated address.
- Anchor to userErrorsuser•[User
Errors Errors Customer Address User Errors!]! non-null The list of errors that occurred from executing the mutation.
Fields