Skip to main content
POST
/
v1
/
auth
/
change-password
Change Password
curl --request POST \
  --url https://olp-api.nipuntheekshana.com/v1/auth/change-password \
  --header 'Content-Type: application/json' \
  --data '
{
  "currentPassword": "<string>",
  "newPassword": "<string>"
}
'
This endpoint requires a valid Bearer token in the Authorization header.

Request Body

currentPassword
string
required
The merchant’s current password.
newPassword
string
required
The new password. Minimum 8 characters, must include uppercase, lowercase, and a number.

Example Request

{
  "currentPassword": "SecureP@ss123",
  "newPassword": "NewSecureP@ss456"
}

Example Response (200)

{
  "message": "Password changed successfully"
}

Error Responses

401 Wrong Password
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Current password is incorrect"
  }
}
400 Validation Error
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "New password must be at least 8 characters"
  }
}