XM
Members
Create Local User
Path:
1
POST https://{baseurl}/api-commerceIdentity/user/local
Copied!
Signup, being the starting point in a user's shopping experience, is considered a major tipping point in e-commerce. We offer a light-weight onboarding experience and collects only minimal information from your shoppers such as email (which serves as the username), full name, and password. In response, the user details are retrieved along with the system generated user ID (represented as _Id), which is required for subsequent calls (specially customer-context calls).
From the store perspective, you will benefit from the key customer details. This will help you in your personalisation efforts to provide a unified shopping experience.
Headers
Content-Type : application/json
x-site-context : { "date": "2020-08-28T02:35:27.787Z", "channel": 12, "account": 5f493c9f30ec2a0007a94fc8", "stage": "sandbox" }

Parameters

Type : requestBody
Name : The email, name, and password.
Required: true

Sample Request

1
{
2
"user": {
3
"name": {
4
"first": "John",
5
"middle": "A",
6
"last": "Smith"
7
},
8
"phone": [{
9
"number": "123456789",
10
"countryCode": "+1",
11
"extension": "1234",
12
"kind": "mobile"
13
}],
14
"email": "[email protected]",
15
"extra": {
16
"dob": "03-19-1993"
17
}
18
},
19
"provider": {
20
"username": "[email protected]",
21
"password": "ExamplePassword123!"
22
}
23
}
Copied!

Sample Response

HTTP Code: 200 Message: OK
Description: You will see this message when the user is successfully onboarded. In response, the user details are retrieved along with JWT tokens (access and refresh).
1
{
2
"_id": "5e97947d3cb8553c0e43d87f",
3
"userId": 90,
4
"roles": [
5
{
6
"id": "5de1646f8c6352091d944f1c"
7
}
8
],
9
"name": {
10
"first": "John",
11
"middle": "A",
12
"last": "Smith"
13
},
14
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsInJvbGVzIjpbeyJpZCI6IjVkZTE2NDZmOGM2MzUyMDkxZDk0NGYxYyJ9XSwiaWF0IjoxNTg2OTkyMjUzLCJleHAiOjE1ODY5OTQwNTN9.RQpIQQF6ccw03Pe1O5FtT8L-5qSGmJ-GZqfqpsmt0XA6ttEg7xDIVRsFH4hePlSIlJ_1ybIJgZgMH-D1NEzfwA",
15
"refreshToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVlOTc5NDdkM2NiODU1M2MwZTQzZDg3ZiIsImlhdCI6MTU4Njk5MjI1MywiZXhwIjoxNTkwODgwMjUzfQ.TbYzrtTT3hq1SMewFy1YPGeC-GqBv1J2zFPXSHFL28doNq1WnyPSNg1A8z_jFvLCQEtIaUKSNfqqlagykC9sPw"
16
}
Copied!
HTTP Code: 406 Message: Not Acceptable
Description: You will see this message when the email address provided already exists.
Sample:
1
{
2
"code": "USER_EXISTS",
3
"message": "User with given email/username already exists."
4
}
Copied!

Changelog

*Last updated - July 2020
Last modified 5mo ago
Copy link
Contents
Changelog