API: Register a Customer
Prerequisites
In order to perform the sign up of a customer, you should have read our introduction on how our API is built and what basic concepts have been applied:
Variables
Throughout our tutorials, we will use Variables which are also part of our Postman collections:
{{API_URL_SHOP}}
: this covers the whole URL of the REST-API including the suffix for “shop”-related endpoints
The request: create a customer resource
Request:
Method
POST
Endpoint
POST {{API_URL_SHOP}}/customers
Request Body
Request Code (Success)
204 - No Content
Response Body
(empty)
Restrictions:
Emails needs to be unique across the whole instance of your store or marketplace.
Certain validators are applied on
$firstName
and$lastName
, which can be found here (TODO: link).
Good to know
Once the registration went through successfully, the customer resource has been setup properly. According to channel settings, a verification is required or not. If this is the case, the system will send a registration email with a link to confirm the email address used for registration and to finally activate the account. Unless this activation take happen, the account is not fully verified and thus can not be used for any further requests. Also, a JWT token on behalf of this customer can’t be created at this moment.
Without requiring account verification (which is the default setting for faster onboarding), the customer resource is activated and unlocked immediately. Accordingly, a JSON WebToken can be obtained directly next.
Last updated