This feature is marked as beta and may be affected by changes. Use with caution for production.

My Customer Profile

Except for sign up and sign in, this endpoint can only be used with an access token created with the password flow. It gives access to the profile of the customer to whom the access token was issued.

This endpoint can also be used to sign up a customer from an anonymous session, or merge an anonymous session to an existing account.

Representations

All representations are JSON objects submitted or received as payload to API requests or responses. Responses are equal to the responses on the customers endpoint, but requests may differ. The customer group, the customer number and external id can not be set via this endpoint.

MyCustomerDraft

Get Customer

Endpoint: /{projectKey}/me
Method: GET
OAuth2 Scopes: manage_my_profile:{projectKey}
Response Representation: Customer

Create Customer (Sign Up)

Creates a customer.

If used with an access token for Anonymous Sessions, all orders and carts belonging to the anonymousId will be assigned to the newly created customer.

Endpoint: /{projectKey}/me/signup
Method: POST
OAuth2 Scopes: manage_my_profile:{projectKey}
Request Representation: MyCustomerDraft
Response Representation: CustomerSignInResult

Signing up a customer produces the CustomerCreated message.

Authenticate Customer (Sign In)

Retrieves the authenticated customer (a customer that matches the given email/password pair).

If used with an access token for Anonymous Sessions, all orders and carts belonging to the anonymousId will be assigned to the newly created customer.

Endpoint: /{projectKey}/me/login
Method: POST
OAuth2 Scopes: manage_my_profile:{projectKey}
Response Representation: CustomerSignInResult
Fields:

Specific Error Codes:

Update Customer

Endpoint: /{projectKey}/me
Method: POST
OAuth2 Scopes: manage_my_profile:{projectKey}
Response Representation: Customer
Fields:

Update Actions
Please find below the individual update actions provided on this endpoint.


Change Email

Set First Name

Set Last Name

Set Middle Name

Set Title

Set Salutation

Add Address

Adds an address to the customer’s addresses array. Sets the address ID to be unique in the addresses list.

Change Address

Replaces the address with the given ID, with the new address in the customer’s addresses array. The new address will have the same ID.

Remove Address

Removes the address with the given ID from the customer’s addresses array.

Set Default Shipping Address

Sets the default shipping address from the Customer’s addresses.
If the address is not in the Customer’s shipping addresses it will be added to the Customer’s shippingAddressIds.

Add Shipping Address ID

Adds an existing address from the Customer’s addresses - referred to by its id - to the Customer’s shippingAddressIds.

Remove Shipping Address ID

Removes an existing shipping address from the Customer’s shippingAddressesIds.
If the shipping address is the Customer’s default shipping address the Customer’s defaultShippingAddressId will be unset.

Set Default Billing Address

Sets the default billing address from the Customer’s addresses.
If the address is not in the Customer’s billing addresses it will be added to the Customer’s billingAddressIds.

Add Billing Address ID

Adds an existing address from the Customer’s addresses - referred to by its id - to the Customer’s billingAddressIds.

Remove Billing Address ID

Removes an existing billing address from the Customer’s billingAddressesIds.
If the billing address is the Customer’s default billing address the Customer’s defaultBillingAddressId will be unset.

Set Company Name

Set Date of Birth

Set Vat Id

Set Custom Type

This action sets or removes the custom type for an existing customer.

This action overwrites any existing custom type and fields.

Set CustomField

If value is absent or null, this field will be removed if it exists.

If value is provided, set the value of the field defined by the name.
The FieldDefinition determines the format for the value to be provided.
In particular, for the fields definitions, value has to provided as: - for EnumType and LocalizedEnumType fields: the key of the EnumValue or the LocalizedEnumValue - for LocalizedStringType fields: the LocalizedString object - for MoneyType fields: the Money object - for SetType fields: the entire Set object - for ReferenceType fields: the Reference object

Set Locale

Sets the locale. Must be one of the languages supported for this Project.

Change Customer’s Password

Endpoint: /{projectKey}/me/password
Method: POST
OAuth2 Scopes: manage_my_profile:{projectKey}
Response Representation: Customer
Fields:

Specific Error Codes:

Reset Customer’s Password

Set a new password using a token. The last step of the customer password reset flow.

Endpoint: /{projectKey}/me/password/reset
Method: POST
OAuth2 Scopes: manage_my_profile:{projectKey}
Response Representation: Customer
Fields:

Verify Customer’s Email

Verifies customer’s email using a token. The last step of the customer email verification.

Endpoint: /{projectKey}/me/email/confirm
Method: POST
OAuth2 Scopes: manage_my_profile:{projectKey}
Fields:

Delete Customer

Endpoint: /{projectKey}/me
Method: DELETE
OAuth2 Scopes: manage_my_profile:{projectKey}
Response Representation: Customer
Query parameters: