POST Register customer
POST /customers
Operation ID: Register customer. Tags: customers. Security: customers_auth; oauth2_application; client_id.
Registers a customer.
You must specify the login credentials, last name, and email address. This method ignores all other data, which can only be set for an existing customer. To set other values, make calls after the customer is created.
When using OAuth, don't include the password in the request. In this case, including the password throws
an InvalidPasswordException .
When using JWT, the password is required.
Also returns the hashedLoginId for Einstein use cases.
Note: If customers are created using OCAPI call then any updated to the customer records should be done through OCAPI calls as well. The customer records created with Script API call should not be updated with OCAPI calls as the email validation is handled differently in these calls and may result in InvalidEmailException.
This endpoint may return the following faults:
- 400 - CustomerAlreadyRegisteredException - Indicates that the resource is called with JWT representing a registered customer.
- 400 - InvalidLoginException - Indicates that login doesn't match acceptance criteria.
- 400 - InvalidPasswordException - Indicates that password doesn't match acceptance criteria.
- 400 - LoginAlreadyInUseException - Indicates that the given login is already used.
- 400 - MissingEmailException - Indicates that request document does not contain email.
- 400 - MissingLastNameException - Indicates that request document does not contain last_name.
- 400 - MissingLoginException - Indicates that request document does not contain login.
- 400 - MissingPasswordException - Indicates that password was not provided in JWT scenario.
Request body (required)
Media type: application/json, text/xml. Schema: customer_registration.
Responses
- 400
CustomerAlreadyRegisteredException- Indicates that the resource is called with JWT representing a registered customer. orInvalidLoginException- Indicates that login doesn't match acceptance criteria. orInvalidPasswordException- Indicates that password doesn't match acceptance criteria. orLoginAlreadyInUseException- Indicates that the given login is already used. orMissingEmailException- Indicates that request document does not contain email. orMissingLastNameException- Indicates that request document does not contain last_name. orMissingLoginException- Indicates that request document does not contain login. orMissingPasswordException- Indicates that password was not provided in JWT scenario.Media type:
application/json, text/xml. Schema:fault. - default
Media type:
application/json, text/xml. Schema:customer.