Service

Name Change Password
Description Change password of a user
Method POST
URL /security/change/password
Example /api/security/change/password
Access OWNER, MANAGER, TRAVELER, PARTNER

HTTP Headers

Authorization eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXUyJ9...

Parameters

Fields Type Required Description
current_password text yes Current password of the user
new_password text yes New password for the user
confirm_password text yes Confirm new password

Response

            
                {
                    "code": R111,
                    "message": "Success"
                }
            
            

Response Codes

Code Message Cause Possible Frontend Message [Behavior]
EC000 Internal error in API Internal error connecting the database "Oops! Looks like we hit a snag. Try closing the app and reopening it."
EC001 User not found Token user id doesn't match our records "Sorry, We couldn't find your information!"
R000 Fail The password wasn't changed
R111 Success The operation was successful "The password has been changed"
SC005 Password is not secure New_password doesn't have at least 6 characters, 1 number, and 1 upper case "New Password must have at least 6 characters, 1 number, 1 upper case (ex: Passw5)"
SC006 User no authorization The token role is not valid for using the API services "You have been logged out." - [Take the user to the login screen]
SC013 Invalid current_password The current_password doesn't match our records "It looks like that current password does not match our records. Please try again."
SC014 Expired token The token has expired "You have been logged out." - [Take the user to the login screen]
VID103 Invalid input for confirm_password Confirm_password is different from new_password "Passwords does not match"
VID238 Invalid input for current_password Current_password is empty or it wasn't sent "Please fill out this field"
VID239 Invalid input for new_password New_password is empty or it wasn't sent "Please fill out this field"