Skip to main content

customerSetDefaultAddress

Requires a customer (portal or buyer app) session.

Mark an address as the ordering default. screen 17.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation CustomerSetDefaultAddress($addressId: ID!) {
customerSetDefaultAddress(addressId: $addressId) {
id
postalCode
type
city
contactPhone
country
}
}

Variables:

{
"addressId": "id"
}

Response:

{
"data": {
"customerSetDefaultAddress": {
"id": "id",
"postalCode": "string",
"type": "BILLING",
"city": "string",
"contactPhone": "string",
"country": "string"
}
}
}
customerSetDefaultAddress(
addressId: ID!
): CustomerAddress!

Arguments​

customerSetDefaultAddress.addressId ● ID! non-null scalar​

The ID of the address.

Type​

CustomerAddress object​

An address of the customer.