update_bill_preferences Navigate to XML API

For update bill preference.

End Point https://www.vcareapi.com:8080/payment
Field (Short Description) Value/Tag Name Format Field Example Type Notes Validation rules
action string update_bill_preferences Required update_bill_preferences update_bill_preferences
agent_id string Jhon doe Required This is the Telgoo5 user id.For the Agent/Employee who is sending the API request.
agent_password string jhondoe Optional This is the password for the Agent Id mentioned above. This is configuration level field. If you have set the permissions for the Agent Id for the requirement of the password in API transactions then you will need to pass the Agent Password in all the REST API transaction, else if you have set the permissions to password not required then you don’t need to pass the Agent Password in the REST API.
source string API Optional Source of the order/application Expected Value:API, TABLET, WEBSITE
enrollment_id string a458 Required a458
email alphanumeric test@gmail.com Required test@gmail.com
Sample Request REST
{
   "agent_id":"ewebsiteapi",
   "source":"tablet",
   "action":"update_bill_preferences",
   "bill_notify_type":"email",
   "enrollment_id":"a458",
   "email":"test@gmail.com"
}
List of status code, description and resolution.
Status Code Description How to Resolve?
RESTAPI000 SUCCESS SUCCESS
RESTAPI001 FAIL Multiple errors like Invalid Token, Token already used, Token expire & Invalid Access!!
RESTAPI101 FAIL Module required.
RESTAPI102 FAIL Action required.
RESTAPI103 FAIL Source Not Allowed.
RESTAPI104 FAIL Invalid Agent ID or Password.
RESTAPI105 FAIL Module does not exist.
RESTAPI106 FAIL Action does not exist.
RESTAPI107 FAIL Invalid company.
RESTAPI108 FAIL Invalid method.
RESTAPI109 FAIL Unauthorized Access.
RESTAPI010 FAIL Multiple errors come in an array.
Sample Response
{
   "msg_code":"RESTAPI110",
   "msg":"Error occurred",
   "errors":[
      "Please Enter Valid Bill Notify Type(i.e. EMAIL or PRINTOUT)"
   ]
}
SUCCESS
Sample Fail Response: 1
{
    
    "msg": "Invalid Token",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Invalid Token
How to Resolve?: Provide valid token in header
Sample Fail Response: 2
{
    
    "msg": "Invalid Access!!",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Invalid Access!!
How to Resolve?: Request method will be POST
Sample Fail Response: 3
{
    "errors":["Source Not Allowed"]
    "msg": "Source Not Allowed",
    "msg_code": "RESTAPI103",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Source Not Allowed
How to Resolve?: Provide valid Source
Sample Fail Response: 4
{
    "errors":["Agent Id should not be blank"]
    "msg": "Agent Id should not be blank",
    "msg_code": "RESTAPI104",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Agent Id should not be blank
How to Resolve?: Provide valid Agent Id
Sample Fail Response: 5
{
    "errors":["Invalid Agent Id"]
    "msg": "Invalid Agent Id",
    "msg_code": "RESTAPI104",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Invalid Agent Id
How to Resolve?: Provide valid Agent Id
Sample Fail Response: 6
{
    
    "msg": "Token already used",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Token already used
How to Resolve?: You can use token once per request
Sample Fail Response: 7
{
    
    "msg": "Token expire",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Token expire
How to Resolve?: Create token again
Sample Fail Response: 8
{
    "errors":["Please enter Enrollment Id"]
    "msg": "Error occurred",
    "msg_code": "RESTAPI110",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Error occurred
How to Resolve?: Provide Enrollment Id