accountAddressCreate Mutation
Create a new address for the customer.
Requires one of following set of permissions: AUTHENTICATED_USER or AUTHENTICATED_APP + IMPERSONATE_USER.
Triggers the following webhook events:
- CUSTOMER_UPDATED (async): A customer account was updated.
- ADDRESS_CREATED (async): An address was created.
Applied directives
@webhookEventsInfo(asyncEvents: [CUSTOMER_UPDATED, ADDRESS_CREATED], syncEvents: [])
accountAddressCreate(customerId: ID, input: AddressInput!, type: AddressTypeEnum): AccountAddressCreate
Returns
Show return type
type AccountAddressCreate {
user: User
accountErrors: [AccountError!]! @deprecated(reason: "Use `errors` field instead.")
errors: [AccountError!]!
address: Address
}Arguments
customerId
customerId · ID
ID of customer the application is impersonating. The field can be used and is required by apps only. Requires IMPERSONATE_USER and AUTHENTICATED_APP permission.
Added in Saleor 3.19input
input · AddressInput!
Fields required to create address.
type
type · AddressTypeEnum
A type of address. If provided, the new address will be automatically assigned as the customer’s default address of that type.
Schema: Saleor 3.23.43. Download SDL.