XM

Reset Password

Path:

PATCH https://{baseurl}/api-commerceIdentity/auth/local/reset/token

To prevent a common pitfall of cart abandonment due to password reset issues, we offer a simple and straightforward option to reset password. Your customers will receive a reset password link in their email. By clicking the link, they can go ahead to change their password through the Update Password API.

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 address

Required: true

Sample Request

{
"username" : "[email protected]",
}

Response

HTTP Code : 200 Message : OK

Description: You will see this message when the password reset is initiated (link is sent to the user's registered email address).

Sample

{
"name": "John Doe",
"resetLink": "http://localhost:3000/resetpassword/5e97e4873cb8553c0e43d88e",
"email": "[email protected]",
"emailSent": true
}

HTTP Code : 404 Message : Not Found

Description: You'll see this message when the email address provided is incorrect.

Sample

{
"code": "USER_NOT_FOUND",
"message": "User not found."
}

Changelog

  • Last updated - July 2020