validate Navigate to XML API
This REST API is used to validate coupon Code
Sample Request REST
{ "action":"validate", "agent_id":"Devteam", "coupon_code":"XMAS5DISC", "source":"ENROLLMENT_PORTAL", "address_one":"9918 Brooklet Dr" }
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":"RESTAPI000", "msg":"Success", "data":[ { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-143", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"22.00", "balance":"0.00", "invoice_amount":"22.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"22.00", "tax_amount":"0.00", "reference_number":"B10PADC23E62", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-143", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"22.00", "invoice_amount":"22.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"22.00", "tax_amount":"0.00", "reference_number":"B10PADC23E62", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-141", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"22.00", "balance":"0.00", "invoice_amount":"22.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"22.00", "tax_amount":"0.00", "reference_number":"B10PADC23E54", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-141", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"22.00", "invoice_amount":"22.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"22.00", "tax_amount":"0.00", "reference_number":"B10PADC23E54", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-123", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"22.00", "balance":"0.00", "invoice_amount":"22.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"22.00", "tax_amount":"0.00", "reference_number":"B70PAC2EE3DF", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-123", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"22.00", "invoice_amount":"22.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"22.00", "tax_amount":"0.00", "reference_number":"B70PAC2EE3DF", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-121", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"17.00", "balance":"0.00", "invoice_amount":"17.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"17.00", "tax_amount":"0.00", "reference_number":"B50P0AF8FB2C", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-121", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"17.00", "invoice_amount":"17.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"17.00", "tax_amount":"0.00", "reference_number":"B50P0AF8FB2C", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-119", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"17.00", "balance":"0.00", "invoice_amount":"17.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"17.00", "tax_amount":"0.00", "reference_number":"B50P0AF8FB15", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-119", "invoice_type":"Equipment Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"17.00", "invoice_amount":"17.00", "transaction_id":"", "due_date":"2019-07-04", "without_tax_amount":"17.00", "tax_amount":"0.00", "reference_number":"B50P0AF8FB15", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-04" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-61", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"13.84", "balance":"0.00", "invoice_amount":"13.84", "transaction_id":"841421875", "due_date":"2019-07-02", "without_tax_amount":"10.00", "tax_amount":"3.84", "reference_number":"B40P0AF6E9A7", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-02" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-61", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"13.84", "invoice_amount":"13.84", "transaction_id":"841421875", "due_date":"2019-07-02", "without_tax_amount":"10.00", "tax_amount":"3.84", "reference_number":"B40P0AF6E9A7", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-02" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-49", "invoice_type":"Equipment Purchase", "payment_type":"Skip Payment", "amount":"22.69", "balance":"0.00", "invoice_amount":"22.69", "transaction_id":"841421785", "due_date":"2019-07-02", "without_tax_amount":"21.62", "tax_amount":"1.07", "reference_number":"skip91219038964", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-07-02" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-49", "invoice_type":"Equipment Purchase", "payment_type":"Skip Payment", "amount":"0.00", "balance":"22.69", "invoice_amount":"22.69", "transaction_id":"841421785", "due_date":"2019-07-02", "without_tax_amount":"21.62", "tax_amount":"1.07", "reference_number":"skip91219038964", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-07-02" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-33", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"13.84", "balance":"0.00", "invoice_amount":"13.84", "transaction_id":"841422228", "due_date":"2019-07-02", "without_tax_amount":"10.00", "tax_amount":"3.84", "reference_number":"B50P0AF661EA", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-02" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-33", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"13.84", "invoice_amount":"13.84", "transaction_id":"841422228", "due_date":"2019-07-02", "without_tax_amount":"10.00", "tax_amount":"3.84", "reference_number":"B50P0AF661EA", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-07-02" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-27", "invoice_type":"Equipment Purchase", "payment_type":"Skip Payment", "amount":"133.27", "balance":"0.00", "invoice_amount":"133.27", "transaction_id":"841421749", "due_date":"2019-07-02", "without_tax_amount":"122.91", "tax_amount":"10.36", "reference_number":"skip9107185594", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-07-02" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-27", "invoice_type":"Equipment Purchase", "payment_type":"Skip Payment", "amount":"0.00", "balance":"133.27", "invoice_amount":"133.27", "transaction_id":"841421749", "due_date":"2019-07-02", "without_tax_amount":"122.91", "tax_amount":"10.36", "reference_number":"skip9107185594", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-07-02" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-07-1", "invoice_type":"Equipment Purchase", "payment_type":"Skip Payment", "amount":"17.16", "balance":"0.00", "invoice_amount":"17.16", "transaction_id":"841421436", "due_date":"2019-07-01", "without_tax_amount":"16.56", "tax_amount":"0.60", "reference_number":"skip91137851587", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-07-01" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-07-1", "invoice_type":"Equipment Purchase", "payment_type":"Skip Payment", "amount":"0.00", "balance":"17.16", "invoice_amount":"17.16", "transaction_id":"841421436", "due_date":"2019-07-01", "without_tax_amount":"16.56", "tax_amount":"0.60", "reference_number":"skip91137851587", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-07-01" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-06-37", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"13.60", "balance":"0.00", "invoice_amount":"13.60", "transaction_id":"841421132", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"3.60", "reference_number":"B40P0AF30E39", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-06-29" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-06-37", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"13.60", "invoice_amount":"13.60", "transaction_id":"841421132", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"3.60", "reference_number":"B40P0AF30E39", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-06-29" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-06-35", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"13.60", "balance":"0.00", "invoice_amount":"13.60", "transaction_id":"841420835", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"3.60", "reference_number":"B50P0AF30258", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-06-29" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-06-35", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"13.60", "invoice_amount":"13.60", "transaction_id":"841420835", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"3.60", "reference_number":"B50P0AF30258", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-06-29" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-06-33", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"13.60", "balance":"0.00", "invoice_amount":"13.60", "transaction_id":"841420831", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"3.60", "reference_number":"B70PAC28F46C", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-06-29" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-06-33", "invoice_type":"CSR Plan Purchase", "payment_type":"Credit Card", "amount":"0.00", "balance":"13.60", "invoice_amount":"13.60", "transaction_id":"841420831", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"3.60", "reference_number":"B70PAC28F46C", "is_payment_done":"Y", "created_by":"ewebsiteapi", "create_date":"2019-06-29" }, { "cr_dr_type":"CR", "customer_id":"9", "invoice_number":"2019-06-21", "invoice_type":"New Signup Plan Purchase", "payment_type":"Cash", "amount":"10.00", "balance":"0.00", "invoice_amount":"10.00", "transaction_id":"", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"0.00", "reference_number":"Cash9100211883758190", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-06-29" }, { "cr_dr_type":"DR", "customer_id":"9", "invoice_number":"2019-06-21", "invoice_type":"New Signup Plan Purchase", "payment_type":"Cash", "amount":"0.00", "balance":"10.00", "invoice_amount":"10.00", "transaction_id":"", "due_date":"2019-06-29", "without_tax_amount":"10.00", "tax_amount":"0.00", "reference_number":"Cash9100211883758190", "is_payment_done":"Y", "created_by":"Devteam", "create_date":"2019-06-29" } ], "token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.OTM0fQ.bG15ow1TqsA8-8yvk4blibP1XvIhUKAw1BJDOlNXEc0" }
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
All the status codes are listed under the status code sections. Please click here to go to the status code.