Skip to content

Description

The Change Merchant Password API allows an authenticated merchant or store owner to update their password. The merchant must provide their current password and a new password to complete the process.
Ensure the new password meets the required security standards.

Endpoint

PATCH /v1/change/password/merchant

Required Headers

json
{
  "Content-Type": "application/json",
  "Authorization": "Bearer JWT_TOKEN",
}

📥 Request Body

ParameterTypeRequiredDescription
currentPasswordstringYesThe current password.
newPasswordstringYesThe new password.
confirmPasswordstringYesConfirm password to make sure user is certain of the newly inputted password

Example API Call (Fetch or Axios)

javascript
fetch('https://api.shopsynch.com/v1/change/password/merchant', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-MerchantApiKey': 'MERCHANT_API_KEY'
  },
  body: JSON.stringify({
    currentPassword: "password",
    newPassword: "123456",
    confirmPassword: "123456"
  })
})
.then(response => response.json())
.then(data => console.log(data));

📤 Sample 200 Response (Success)

json
{
    "message": "Password changed successfully.",
    "status": true
}

Next Steps

Build with joy