interface CustomerDraft {
    addresses?: BaseAddress[];
    anonymousCart?: CartResourceIdentifier;
    anonymousCartId?: string;
    anonymousId?: string;
    authenticationMode?: string;
    billingAddresses?: number[];
    companyName?: string;
    custom?: CustomFieldsDraft;
    customerGroup?: CustomerGroupResourceIdentifier;
    customerNumber?: string;
    dateOfBirth?: string;
    defaultBillingAddress?: number;
    defaultShippingAddress?: number;
    email: string;
    externalId?: string;
    firstName?: string;
    isEmailVerified?: boolean;
    key?: string;
    lastName?: string;
    locale?: string;
    middleName?: string;
    password?: string;
    salutation?: string;
    shippingAddresses?: number[];
    stores?: StoreResourceIdentifier[];
    title?: string;
    vatId?: string;
}

Properties

addresses?: BaseAddress[]

Addresses of the Customer.

anonymousCart?: CartResourceIdentifier

Identifies a Cart that will be assigned to the new Customer.

anonymousCartId?: string

Deprecated since an anonymous Cart can be identified by its id or external key.

Deprecated

anonymousId?: string

Identifies Carts and Orders belonging to an anonymous session that will be assigned to the new Customer.

authenticationMode?: string
  • Set to Password to make the password field required for the Customer.
    • Set to ExternalAuth when the password is not required for the Customer.
billingAddresses?: number[]

Indices of the billing addresses in the addresses array. The billingAddressIds of the Customer will be set to the IDs of these addresses.

companyName?: string

Company name of the Customer. When representing a company as a Customer, Business Units provide extended funtionality.

Custom Fields for the Customer.

customerGroup?: CustomerGroupResourceIdentifier

Sets the CustomerGroup for the Customer.

customerNumber?: string

User-defined unique identifier for a Customer. Once set, it cannot be changed.

Can be used to refer to a Customer in a human-readable way (in emails, invoices, and other correspondence).
dateOfBirth?: string

Date of birth of the Customer.

defaultBillingAddress?: number

Index of the address in the addresses array to use as the default billing address. The defaultBillingAddressId of the Customer will be set to the id of that address.

defaultShippingAddress?: number

Index of the address in the addresses array to use as the default shipping address. The defaultShippingAddressId of the Customer will be set to the id of that address.

email: string

Email address of the Customer that must be unique for an entire Project or to a Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.

externalId?: string

Optional identifier for use in external systems like customer relationship management (CRM) or enterprise resource planning (ERP).

firstName?: string

Given name (first name) of the Customer.

isEmailVerified?: boolean

Set to true if the email address of the Customer has been verified already. The intended use is to leave this field unset upon sign-up of the Customer and initiate the email verification afterwards.

key?: string

User-defined unique identifier for the Customer. The key field is preferred over customerNumber as it is mutable and provides more flexibility.

This field is optional for backwards compatibility reasons, but we strongly recommend setting it. Keys are mandatory for importing Customers with the [Import API](/../import-export/).
lastName?: string

Family name (last name) of the Customer.

locale?: string

Preferred language of the Customer. Must be one of the languages supported by the Project.

middleName?: string

Middle name of the Customer.

password?: string

Required when authenticationMode is set to Password. Provide the Customer's password in plain text. The API stores passwords in an encrypted format.

salutation?: string

Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.

shippingAddresses?: number[]

Indices of the shipping addresses in the addresses array. The shippingAddressIds of the Customer will be set to the IDs of these addresses.

stores?: StoreResourceIdentifier[]

Sets the Stores for the Customer.

- If no Stores are specified, the Customer is a global customer, and can log in using the [Password Flow for global Customers](/../api/authorization#password-flow-for-global-customers).
- If any Stores are specified, the Customer can only log in using the [Password Flow for Customers in a Store](/../api/authorization#password-flow-for-customers-in-a-store) for those specific Stores.
title?: string

Title of the Customer, for example, 'Dr.'.

vatId?: string

Individual VAT ID of the Customer.