Skip to content

customerDefaultAddressUpdate

Mutationin Customer

Set the customer's default shipping and/or billing address by referencing an existing address in their address book. At least one of the two ids is required.

Arguments

ArgumentTypeDescription
shippingAddressIdID
billingAddressIdID

Returns

CustomerDefaultAddressUpdateResponse!

FieldTypeDescription
customerCustomerUpdated customer account information
customerErrors[CustomerDefaultAddressUpdateError!]Error details if update failed

Example

mutation {
customerDefaultAddressUpdate(
shippingAddressId: "addr-123"
billingAddressId: "addr-456"
) {
customer {
id
defaultShippingAddress {
id
}
billingAddress {
id
}
}
customerErrors {
... on ValidationError {
message
}
}
}
}

The query is the example the schema documents. The response shows its shape with placeholder values.

Served by

@evolve-framework/commercetoolsResolved
@evolve-framework/medusaResolved
@evolve-framework/sfccNot resolved

Used by

The storefront packages that send it, in these GraphQL documents: