XM
Members
Update Password
Path:
1
PATCH https://{baseurl}/api-commerceIdentity/auth/password
Copied!
Helps to reset the account password via the reset password link sent to the user's email. Currently, there are no rigid password formats, so user can use their own choice of password.
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 reset token ID, system generated user ID, and the new password.
Required: true

Sample Request

1
{
2
"resetToken": "5ebd67b985fe410008041954",
3
"userId": "5e20f4f530d2b70008bb8738",
4
"newPassword": "Password12345!"
5
}
Copied!

Response

HTTP Code : 200 Message : OK
Description: You will see this message when the user's password has been successfully changed.
Sample
1
{
2
"_id": "5e97947d3cb8553c0e43d87f",
3
"isActive": {
4
"status": true
5
},
6
"registrationDate": "2020-04-15T22:34:22.429Z",
7
"expiryDate": "2070-04-15T22:34:22.429Z",
8
"roles": [
9
"5de1646f8c6352091d944f1c"
10
],
11
"name": {
12
"first": "John",
13
"middle": "A",
14
"last": "Doe"
15
},
16
"phone": [
17
{
18
"_id": "5e97947d3cb8553c0e43d880",
19
"number": "123456789",
20
"countryCode": "+1",
21
"extension": "1234",
22
"kind": "mobile",
23
"id": "5e97947d3cb8553c0e43d880"
24
}
25
],
26
"email": "[email protected]",
27
"extra": {
28
"resetPassword": "requested"
29
},
30
"registrationSite": "abcde.com",
31
"account": "5e97947d3cb8553c0e43d87e",
32
"userId": 90,
33
"address": [],
34
"provider": [
35
{
36
"registrationDate": "2020-04-15T22:34:22.429Z",
37
"isActive": true,
38
"_id": "5e97947d3cb8553c0e43d881",
39
"name": "LOCAL",
40
"lastLoginDate": "2020-04-16T04:28:33.560Z",
41
"id": "5e97947d3cb8553c0e43d881"
42
}
43
],
44
"createdAt": "2020-04-15T23:10:53.773Z",
45
"updatedAt": "2020-04-16T04:59:53.755Z",
46
"__v": 0
47
}
Copied!
HTTP Code : 404 Message : Not Found
Description: You'll see this error when the system user ID and/or rest token ID is incorrect.
Sample
1
{
2
"code": "USER_NOT_FOUND",
3
"message": "User not found."
4
}
Copied!

Changelog

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