Customer Reset Password
2/7/25Less than 1 minute
Description
The Customer Reset Password API allows you reset customer password by supplying the token sent to their email address.
Endpoint
POST /v1/password/reset/customer
Required Headers
{
"Content-Type": "application/json",
"X-MerchantApiKey": "MERCHANT_API_KEY"
}
๐ฅ Request Body
Parameter | Type | Required | Description |
---|---|---|---|
token | string | Yes | The token sent to the customer email or attached to client url supplied. |
newPassword | string | Yes | The customer new password. |
confirmPassword | string | Yes | Confirm password to make sure customer is certain of the newly inputted password |
Example API Call (Fetch or Axios)
fetch('https://api.shopsynch.com/v1/password/reset/customer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-MerchantApiKey': 'MERCHANT_API_KEY'
},
body: JSON.stringify({
token: "45645897-5f8b-4f63-85b6-5c6ca1ab68b7",
newPassword: "123456",
confirmPassword: "123456"
})
})
.then(response => response.json())
.then(data => console.log(data));
๐ค Sample 200 Response (Success)
{
"message": "Password has been reset successfully.",
"status": true
}
๐ค Sample 400 Response (Success)
{
"status": false,
"message": "Invalid password reset token"
}