Skip to content

customerAddressCreate

Mutationin Customer

Add a new address to the customer's address book

Arguments

ArgumentTypeDescription
addressAddressInput!

Returns

CustomerAddressCreateResponse!

FieldTypeDescription
customerCustomerUpdated customer account information with new address
customerErrors[CustomerAddressCreateError!]Error details if address creation failed

Example

mutation {
customerAddressCreate(address: {
givenName: "John"
familyName: "Doe"
streetName: "Secondary Street"
streetNumber: "456"
city: "Rotterdam"
postalCode: "2000BB"
country: "NL"
}) {
customer {
id
addresses {
items {
id
givenName
familyName
city
}
}
}
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/sfccStub: answers Not implemented

Used by

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