Getting Started
Welcome to Credgenics API Documentation. This document will provide instructions on how to quickly integrate Credgenics APIs. Credgenics APIs are based on REST standards. In order to interact with our API, any HTTP client in any programming language can be used.
Authentication
All the API requests to Credgenics are authenticated via an authentication token.
The API key/token (Authentication Token) will be generated based on the Client ID and Client Secret:
Your Client ID is used as a unique identification key. The Client ID can be shared freely in code and email, and cannot be used alone to act on your behalf.
Your Client Secret should be treated delicately. It is how you securely identify your rights. Do not distribute client secrets in email, distributed native apps, client-side javascript, or public code repositories.
For generating Client ID and Client Secret please reach out to Support Team or the CSM, it will be valid for 6 months from creation. (An email notification will be triggered 1 month from expiry)
Authentication API
import requests
import json
url = "https://apiprod.credgenics.com/user/public/access-token"
payload = json.dumps({
"client_id": "ezfa42yo1s902hil",
"client_secret": "b5ki7qt6qtdgs4to09miuk3cwssnlcutc"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location 'https://apiprod.credgenics.com/user/public/access-token' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"client_id": "ezfa42yo1s902hil",
"client_secret": "b5ki7qt6qtdgs4to09miuk3cwssnlcutc"
}'
const myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
const raw = JSON.stringify({
"client_id": "ezfa42yo1s902hil",
"client_secret": "b5ki7qt6qtdgs4to09miuk3cwssnlcutc"
});
const requestOptions = {
method: "POST",
headers: myHeaders,
body: raw,
redirect: "follow"
};
fetch("https://apiprod.credgenics.com/user/public/access-token", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
The above code returns JSON structured like this:
{
"data": {
"api_key": "2c70dcee-30b4-4a91-bf1b-45be8b944130",
"client_id": "ezfa42yo1s903hau",
"expiry": 1731396132
},
"message": "API Key generated successfully"
}
Request Body Parameters
Key name | Variable Type | Data Type | Description |
---|---|---|---|
client_id | text | string | Unique identification key required to generate API Key |
client_secret | text | string | Confidential key required for generating the API key |
Response Status Code
200 OK
for a successful request.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
Base URLs for Recovery
For Production: https://apiprod.credgenics.com/recovery
For Testing: https://apiuat.credgenics.com/recovery
Lending APIs
Get Loan API
import requests
url = "{BASE_URL}/loan/{loan_id}?fields={fields}"
payload = {}
headers = {
'authenticationtoken': '{auth_token}'
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request GET '{BASE_URL}/loan/{loan_id}?fields={fields}' \
--header 'authenticationtoken: {auth_token}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("{BASE_URL}/loan/{loan_id}?fields={fields}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above command returns JSON structured like this:
{
"loan_details": {
"loan_id": "2954",
"loan_type": "Business Loan",
"product_type": "Arbitration",
"applicant_name": "Keval Gor",
"applicant_contact_number": "9706367068",
"applicant_email": "",
"applicant_gender": "Male",
"business_name": "Sathiya Collection",
"emi_amount": null,
"loan_tenure": null,
"applicant_language": "",
"applicant_occupation": "",
"applicant_pan_number": "",
"applicant_cibil_score": null,
"applicant_dob": null,
"payment_link": "",
"client_loan_sanction_date": "2018-02-22",
"loan_end_date": null,
"interest_on_loan": null,
"merchant_name": "",
"security_type": "",
"total_loan_amount": 268500,
"loan_nbfc_name": "HLPL",
"loan_nbfc_cin": "",
"tenure_finished": true,
"backed_by_surety": false,
"credit_bank_name": "",
"applicant_address": [
{
"applicant_address_type": "Home",
"applicant_address_text": "Shopno4, Sarpat Gate Bhuj, Bhuj, Gujarat, 370001",
"applicant_city": "Bhuj",
"applicant_state": "Gujarat",
"applicant_landmark": "",
"applicant_pincode": 370001
}
],
"defaults": [
{
"created": "2020-08-14 14:29:02.660409",
"late_fee": null,
"expected_emi": 127718,
"other_penalty": null,
"recovery_date": "2020-09-12 00:59:51.418571",
"payment_method": "Online",
"date_of_default": "2020-07-05",
"dpd": "225",
"dpd_bracket": "180+",
"tags": [
{
"tag_name": "temporary",
"active": true,
"created": "2021-07-21 07:50:41"
}
],
"recovery_method": "",
"allocation_month": "2020-8-01",
"amount_recovered": 8500,
"settlement_amount": 25000,
"default_emi_number": null,
"total_claim_amount": 127718,
"allocation_dpd_value": 91,
"actual_date_of_default": "2020-05-15",
"allocation_dpd_bracket": "91-120",
"client_amount_recovered": null,
"expected_emi_interest_amount": null,
"principal_outstanding_amount": null,
"expected_emi_principal_amount": null,
"calling_status": "Initiated",
"fos_status": "Initiated",
"recovery_status": "Fully Recovered"
}
],
"global_status": "Closed",
"legal_status": "Initiated",
"settlement_status": "Initiated",
"document_details": [],
"references": [
{
"relation_with_applicant": "Colleague",
"name": "Abhishek Kumar",
"contact_number": "8802913432"
}
],
"co_applicant": [
{
"co_applicant_name": "Naveen Shekhawat",
"co_applicant_type": "Individual",
"co_applicant_email": "pravinsingh@gmail.com",
"co_applicant_gender": "Male",
"co_applicant_contact_number": "9814274470",
"co_applicant_dob": "1990-06-29",
"co_applicant_address": [
{
"co_applicant_address_text": "",
"co_applicant_address_type": "Home",
"co_applicant_state": "Rajasthan",
"co_applicant_city": "Alwar",
"co_applicant_pincode": 301024
}
]
}
],
"credit_account_number": "",
"applicant_aadhar_number": "",
"applicant_monthly_income": null,
"credit_account_holder_name": "",
"credit_account_holder_type": "",
"archive": false
},
"communication_details": [
{
"type_of_comm": "call",
"comm_dict": {
"to": "9706367068",
"from": "8178041121",
"duration": "0 : 0 : 34",
"called_to": "applicant",
"call_start_time": "2020-11-04 17:16:32",
"call_end_time": "2020-11-04 17:17:06",
"call_response": "Will pay tomorrow",
"recording_url": "",
"applicant_type": "applicant"
}
},
{
"type_of_comm": "sms",
"comm_dict": {
"sms_body": "Hi Keval,\n\nPFA legal notice for the non payment of your outstanding dues to Credgenics as per the terms of the loan agreement. \n\nKindly ignore if the matter has already been settled.\n\nhttps://credgenics.com/notices/930b9ecfee7e?t=64bbec02\n\nThanks and Regards,\n\nAdvocates for HLPL\nAR - Abhishek Gupta\nEmail id: abhishek.gupta1@udaan.com\nPhone number: 9513231633 ",
"sms_mobile": "9706367068",
"notice_link": "930b9ecfee7e",
"delivered_time": "2020-08-15 16:57:31",
"clicked_time": "2020-08-18 10:55:04.839459",
"sms_language": "en",
"message_count": 3,
"template_name": "Legal Notice Template",
"character_count": 362,
"notice_click_count": 2
}
}
],
"payment_history": [
{
"payment_id": 123,
"amount_recovered": 2000,
"recovery_method": "Communications",
"allocation_month": "2021-4-01",
"payment_method": "Online",
"payment_mode": "",
"payment_reference_number": "",
"author": "demo.admin@credgenics.com",
"created": "2021-05-15 18:44:15"
},
{
"payment_id": 1234,
"amount_recovered": 1000,
"recovery_method": "Communications",
"allocation_month": "2021-4-01",
"payment_method": "Online",
"payment_mode": "",
"payment_reference_number": "",
"author": "demo.admin@credgenics.com",
"created": "2021-04-15 06:43:50"
}
],
"notice_tracking_details": [
{
"notice_id": 125792,
"case_type": "lrn",
"document_type": "Notice",
"s3_link": "https://s3-ap-south-1.amazonaws.com/credgenics-cases/production/notice_links/930b9ecfee7e.pdf",
"created": "2021-04-15 06:43:50",
"data": {}
},
{
"notice_id": 12543,
"case_type": "lrn",
"document_type": "Speedpost",
"created": "2021-05-15 18:44:15",
"data": {
"events": [
{
"date": "05/10/2020",
"time": "15:27:17",
"office": "Bhuj HO",
"description": "Item Delivery Confirmed"
},
{
"date": "05/10/2020",
"time": "09:17:46",
"office": "Bhuj HO",
"description": "Out for Delivery"
},
{
"date": "05/10/2020",
"time": "08:22:29",
"office": "Bhuj HO",
"description": "Item Received"
},
{
"date": "04/10/2020",
"time": "10:57:04",
"office": "Bhuj ICH",
"description": "Item Dispatched"
},
{
"date": "04/10/2020",
"time": "09:18:22",
"office": "Bhuj ICH",
"description": "Item Bagged"
},
{
"date": "04/10/2020",
"time": "06:17:52",
"office": "Bhuj ICH",
"description": "Item Received"
},
{
"date": "03/10/2020",
"time": "12:30:43",
"office": "Ahmedabad NSH",
"description": "Item Dispatched"
},
{
"date": "03/10/2020",
"time": "11:26:43",
"office": "Ahmedabad NSH",
"description": "Item Bagged"
},
{
"date": "03/10/2020",
"time": "08:40:56",
"office": "Ahmedabad NSH",
"description": "Item Received"
},
{
"date": "29/09/2020",
"time": "17:52:17",
"office": "Rohini Sector7 SO",
"description": "Item Dispatched"
},
{
"date": "29/09/2020",
"time": "17:18:27",
"office": "Rohini Sector7 SO",
"description": "Item Bagged"
},
{
"date": "29/09/2020",
"time": "16:17:42",
"office": "Rohini Sector7 SO",
"description": "Item Booked"
}
],
"booked_at": "Rohini Sector7 SO",
"article_type": "Inland Speed Post",
"speedpost_id": "ED670494304IN",
"applicant_type": "applicant",
"speedpost_tarrif": "41.30",
"delivery_location": "Sonipat HO",
"speedpost_s3_link": "",
"speedpost_booked_on": "29/09/2020 16:17:42",
"applicant_address_type": "home",
"applicant_address_index": 0,
"speedpost_delivery_status": "Delivered",
"co_applicant_address_index": -1,
"speedpost_undelivered_reason": "",
"speedpost_destination_pincode": "131001",
"speedpost_delivery_confirmed_on": "05/10/2020 15:27:17"
}
}
],
"remarks": [
{
"remark_id": 5237,
"remarks": "(Legal Notice Template ) SMS Sent",
"created": "2020-11-15 16:57:26",
"author": "ssingh@credgenics.com"
},
{
"remark_id": 9544,
"remarks": "Will pay settlement amount tomorrow: Call response , Promise to Pay: Call status , 2020-11-24 - Reminder date",
"created": "2020-11-23 12:43:11",
"author": "ssingh@credgenics.com"
}
]
}
Use this API to get all the data for a particular loan.
HTTP Request - GET
GET {BASE_URL}/loan/{loan_id}?fields={fields}
Path Parameters
Parameter | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
loan_id | Loan id of the loan | ||||||||||||
fields | Name of the fields of which you want to get the details of in the response. Eg: fields=loan,payment or fields=notice
|
||||||||||||
start_date / start_time | Specify unix timestamp to retrieve loan details from that date. | ||||||||||||
end_date / end_time | Specify unix timestamp to retrieve loan details up to that date. |
Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token given by Credgenics |
Response Structure
Key | Description |
---|---|
loan_details | JSON object containing information provided at the time of loan insertion and payment related details. For all keys included in this, refer the loan upload API parameters. |
communication_details | JSON object containing information about all the communications that are performed on the loan. Communication includes call, sms, email and voice messaging. |
payment_history | JSON object containing information about all the payment that are recovered on the loan. |
notice_tracking_details | JSON object containing information about the legal activities performed on the loan account. It includes legal notice and physical notice tracking. |
remarks | JSON object containing all the activities that are performed on the loan account. It provides a snapshot view of the loan account. |
Response Status Code
Status Code: 400 Bad Request
Sample Response:
{
"message": "Please provide allocation month : 2025-2-03 in YYYY-M-DD timestamp format",
"success": false
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
200 OK
for a successful request.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
401 Unauthorized
if authentication failed. API credentials are incorrect.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Upload Loan API
import requests
import json
url = "{BASE_URL}/loan/{loan_id}"
payload = json.dumps({
"loan_id": "283921",
"loan_type": "Personal Loan",
"applicant_name": "Shri Ram",
"applicant_dob": "1992-03-23",
"applicant_email_details": [
{
"applicant_email": "abc@yopmail.com",
"applicant_email_type": "Personal"
}
],
"applicant_gender": "Male",
"applicant_contact_details": [
{
"applicant_contact_number": "9876543210",
"applicant_contact_number_type": "Personal"
}
],
"applicant_monthly_income": 40000,
"applicant_cibil_score": 820,
"applicant_occupation": "Job",
"applicant_aadhar_number": "235498671293",
"applicant_language": "hi",
"applicant_pan_number": "ADJIY-3516-D",
"total_loan_amount": 50000,
"loan_tenure": 12,
"client_loan_sanction_date": "2018-04-06",
"loan_end_date": "2019-04-06",
"interest_on_loan": 18,
"tenure_finished": True,
"security_type": "Secured immovable",
"backed_by_surety": False,
"loan_nbfc_name": "AKARA CAPITAL ADVISORS PVT. LTD.",
"loan_nbfc_cin": "U65191TN1994PLC079235",
"emi_amount": 6000,
"product_type": "",
"credit_account_number": "11271000005809",
"credit_account_holder_name": "Sri Ram",
"credit_bank_name": "HDFC Bank",
"credit_account_holder_type": "Current",
"credit_bank_ifsc_code": "HDFC0G45B4W",
"tags": "tag1,tag2",
"agent_email": "demoagent@email.com,demoagent2@email.com",
"document_details": [
{
"security_mode": "NACH",
"document_number": "757493",
"document_bank_name": "HDFC Bank",
"document_bank_ifsc_code": "",
"document_amount": 50000,
"document_date": "2018-04-10",
"document_dishonour_date": "2018-04-12",
"document_signature_name": "",
"document_bounce_bank_account_number": "",
"document_bounce_bank_ifsc_code": "",
"document_bounce_charges": 100,
"document_bounce_bank_name": "Yes Bank",
"document_bounce_bank_address": "",
"document_bounce_memo_date": "2018-04-12",
"reason_of_document_bounce": "",
"document_bounce_memo_reference_number": "",
"document_sequence_number": "",
"document_bounce_memo_return_date": "2019-06-23"
}
],
"business_name": "",
"applicant_address": [
{
"applicant_address_type": "Home",
"applicant_address_text": " 395/13 veer dua colony baldev nager",
"applicant_state": "Rajasthan",
"applicant_city": "Jodhpur",
"applicant_landmark": "",
"applicant_address_latitude": "",
"applicant_address_longitude": "",
"applicant_pincode": 342001
}
],
"defaults": [
{
"allocation_month": "2021-7-01",
"total_claim_amount": 113000,
"late_fee": 59443,
"date_of_default": "2019-04-07",
"expected_emi": 54000,
"default_emi_number": 12,
"settlement_amount": 45000,
"client_amount_recovered": 0,
"principal_outstanding_amount": 45000,
"expected_emi_interest_amount": 100,
"expected_emi_principal_amount": 45000,
"other_penalty": 200
}
],
"co_applicant": [
{
"co_applicant_name": "Naveen Shekhawat",
"co_applicant_type": "Individual",
"co_applicant_email_details": [
{
"co_applicant_email": "abc@yopmail.com",
"co_applicant_email_type": "Personal"
}
],
"co_applicant_gender": "Male",
"co_applicant_contact_details": [
{
"co_applicant_contact_number": "9876543210",
"co_applicant_contact_number_type": "Personal"
}
],
"co_applicant_dob": "1990-06-29",
"co_applicant_address": [
{
"co_applicant_address_text": "",
"co_applicant_address_type": "Home",
"co_applicant_state": "Rajasthan",
"co_applicant_city": "Alwar",
"co_applicant_pincode": 301024
}
]
}
],
"references": [
{
"relation_with_applicant": "Colleague",
"name": "Abhishek Kumar",
"reference_contact_details": [
{
"contact_number": "9876543210",
"reference_contact_number_type": "Personal"
}
]
}
],
"merchant_name": "Intellipaat",
"payment_link": "https://rzp.io/i/itKAy2q",
"payment_link_expiry": 1627390971
})
headers = {
'authenticationtoken': '{auth_token}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text.encode('utf8'))
curl --location --request POST '{BASE_URL}/loan/{loan_id}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"loan_id": "283921",
"loan_type": "Personal Loan",
"applicant_name": "Shri Ram",
"applicant_dob": "1992-03-23",
"applicant_email_details": [
{
"applicant_email": "abc@yopmail.com",
"applicant_email_type": "Personal"
}
],
"applicant_gender": "Male",
"applicant_contact_details": [
{
"applicant_contact_number": "9876543210",
"applicant_contact_number_type": "Personal"
}
],
"applicant_monthly_income": 40000,
"applicant_cibil_score": 820,
"applicant_occupation": "Job",
"applicant_aadhar_number": "235498671293",
"applicant_language": "hi",
"applicant_pan_number": "ADJIY-3516-D",
"total_loan_amount": 50000,
"loan_tenure": 12,
"client_loan_sanction_date": "2018-04-06",
"loan_end_date": "2019-04-06",
"interest_on_loan": 18,
"tenure_finished": true,
"security_type": "Secured immovable",
"backed_by_surety": false,
"loan_nbfc_name": "AKARA CAPITAL ADVISORS PVT. LTD.",
"loan_nbfc_cin": "U65191TN1994PLC079235",
"emi_amount": 6000,
"product_type": "",
"credit_account_number": "11271000005809",
"credit_account_holder_name": "Sri Ram",
"credit_bank_name": "HDFC Bank",
"credit_account_holder_type": "Current",
"credit_bank_ifsc_code": "HDFC0G45B4W",
"tags": "tag1,tag2",
"agent_email": "demoagent@email.com,demoagent2@email.com",
"document_details": [
{
"security_mode": "NACH",
"document_number": "757493",
"document_bank_name": "HDFC Bank",
"document_bank_ifsc_code": "",
"document_amount": 50000,
"document_date": "2018-04-10",
"document_dishonour_date": "2018-04-12",
"document_signature_name": "",
"document_bounce_bank_account_number": "",
"document_bounce_bank_ifsc_code": "",
"document_bounce_charges": 100,
"document_bounce_bank_name": "Yes Bank",
"document_bounce_bank_address": "",
"document_bounce_memo_date": "2018-04-12",
"reason_of_document_bounce": "",
"document_bounce_memo_reference_number": "",
"document_sequence_number": "",
"document_bounce_memo_return_date": "2019-06-23"
}
],
"business_name": "",
"applicant_address": [
{
"applicant_address_type": "Home",
"applicant_address_text": " 395/13 veer dua colony baldev nager",
"applicant_state": "Rajasthan",
"applicant_city": "Jodhpur",
"applicant_landmark": "",
"applicant_address_latitude": "",
"applicant_address_longitude": "",
"applicant_pincode": 342001
}
],
"defaults": [
{
"allocation_month": "2021-7-01",
"total_claim_amount": 113000,
"late_fee": 59443,
"date_of_default": "2019-04-07",
"expected_emi": 54000,
"default_emi_number": 12,
"settlement_amount": 45000,
"client_amount_recovered": 0,
"principal_outstanding_amount": 45000,
"expected_emi_interest_amount": 100,
"expected_emi_principal_amount": 45000,
"other_penalty": 200
}
],
"co_applicant": [
{
"co_applicant_name": "Naveen Shekhawat",
"co_applicant_type": "Individual",
"co_applicant_email_details": [
{
"co_applicant_email": "abc@yopmail.com",
"co_applicant_email_type": "Personal"
}
],
"co_applicant_gender": "Male",
"co_applicant_contact_details": [
{
"co_applicant_contact_number": "9876543210",
"co_applicant_contact_number_type": "Personal"
}
],
"co_applicant_dob": "1990-06-29",
"co_applicant_address": [
{
"co_applicant_address_text": "",
"co_applicant_address_type": "Home",
"co_applicant_state": "Rajasthan",
"co_applicant_city": "Alwar",
"co_applicant_pincode": 301024
}
]
}
],
"references": [
{
"relation_with_applicant": "Colleague",
"name": "Abhishek Kumar",
"reference_contact_details": [
{
"contact_number": "9876543210",
"reference_contact_number_type": "Personal"
}
]
}
],
"merchant_name": "Intellipaat",
"payment_link": "https://rzp.io/i/itKAy2q",
"payment_link_expiry": 1627390971
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({"loan_id":"283921","loan_type":"Personal Loan","applicant_name":"Shri Ram","applicant_dob":"1992-03-23","applicant_email_details":[{"applicant_email":"abc@yopmail.com","applicant_email_type":"Personal"}],"applicant_gender":"Male","applicant_contact_details":[{"applicant_contact_number":"9876543210","applicant_contact_number_type":"Personal"}],"applicant_monthly_income":40000,"applicant_cibil_score":820,"applicant_occupation":"Job","applicant_aadhar_number":"235498671293","applicant_language":"hi","applicant_pan_number":"ADJIY-3516-D","total_loan_amount":50000,"loan_tenure":12,"client_loan_sanction_date":"2018-04-06","loan_end_date":"2019-04-06","interest_on_loan":18,"tenure_finished":true,"security_type":"Secured immovable","backed_by_surety":false,"loan_nbfc_name":"AKARA CAPITAL ADVISORS PVT. LTD.","loan_nbfc_cin":"U65191TN1994PLC079235","emi_amount":6000,"product_type":"","credit_account_number":"11271000005809","credit_account_holder_name":"Sri Ram","credit_bank_name":"HDFC Bank","credit_account_holder_type":"Current","credit_bank_ifsc_code":"HDFC0G45B4W","tags":"tag1,tag2","agent_email":"demoagent@email.com,demoagent2@email.com","document_details":[{"security_mode":"NACH","document_number":"757493","document_bank_name":"HDFC Bank","document_bank_ifsc_code":"","document_amount":50000,"document_date":"2018-04-10","document_dishonour_date":"2018-04-12","document_signature_name":"","document_bounce_bank_account_number":"","document_bounce_bank_ifsc_code":"","document_bounce_charges":100,"document_bounce_bank_name":"Yes Bank","document_bounce_bank_address":"","document_bounce_memo_date":"2018-04-12","reason_of_document_bounce":"","document_bounce_memo_reference_number":"","document_sequence_number":"","document_bounce_memo_return_date":"2019-06-23"}],"business_name":"","applicant_address":[{"applicant_address_type":"Home","applicant_address_text":"395/13 veer dua colony baldev nager","applicant_state":"Rajasthan","applicant_city":"Jodhpur","applicant_landmark":"","applicant_address_latitude":"","applicant_address_longitude":"","applicant_pincode":342001}],"defaults":[{"allocation_month":"2021-7-01","total_claim_amount":113000,"late_fee":59443,"date_of_default":"2019-04-07","expected_emi":54000,"default_emi_number":12,"settlement_amount":45000,"client_amount_recovered":0,"principal_outstanding_amount":45000,"expected_emi_interest_amount":100,"expected_emi_principal_amount":45000,"other_penalty":200}],"co_applicant":[{"co_applicant_name":"Naveen Shekhawat","co_applicant_type":"Individual","co_applicant_email_details":[{"co_applicant_email":"abc@yopmail.com","co_applicant_email_type":"Personal"}],"co_applicant_gender":"Male","co_applicant_contact_details":[{"co_applicant_contact_number":"9876543210","co_applicant_contact_number_type":"Personal"}],"co_applicant_dob":"1990-06-29","co_applicant_address":[{"co_applicant_address_text":"","co_applicant_address_type":"Home","co_applicant_state":"Rajasthan","co_applicant_city":"Alwar","co_applicant_pincode":301024}]},{"references":[{"relation_with_applicant":"Colleague","name":"Abhishek Kumar","reference_contact_details":[{"contact_number":"9876543210","reference_contact_number_type":"Personal"}]}],"merchant_name":"Intellipaat","payment_link":"https://rzp.io/i/itKAy2q","payment_link_expiry":1627390971});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{BASE_URL}/loan/{loan_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above code returns JSON structured like this:
Sample Success Response
{
"message": "Data uploaded successfully"
}
Use this API to add new Loan / EMI to the data. Goes without saying your data is secure with us. :)
HTTP Request - POST
POST {BASE_URL}/loan/{loan_id}
Path Parameters
Parameter | Description |
---|---|
loan_id | Loan id of the loan |
Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token assigned by Credgenics |
Request Body Parameters
Key name | Variable Type | Data Type | Description |
---|---|---|---|
loan_id | text | string | The loan_id of the loan provided by the lender |
client_customer_id | text | string | A unique ID provided by the client which uniquely maps to a borrower who may or may not have multiple loans with the client |
loan_type | text | string | The type of loan loan based on the function it serves e.g. - Personal Loan, Business Loan, Vehicle Loan, etc. |
applicant_name | text | string | Full name of the applicant |
applicant_email_details | list | list | List of Variable containing information about the email addresses associated with the applicant |
applicant_email | email address | string | Email ID of the applicant (should be separated by comma in case of multiple emails, ordering is important) |
applicant_email_type | text | string | The type or category of the email provided for the borrower. |
applicant_contact_details | list | list | List of Variable containing information about the contact number associated with the applicant |
applicant_contact_number | mobile_number | string | Contact number of borrower (should be separated by comma in case of multiple contact numbers, ordering is important) |
applicant_contact_number_type | text | string | The type or category of the contact number provided for the borrower. |
applicant_gender | gender | string | Gender of the applicant (Options: Male, Female, Non-Binary) |
applicant_dob | date | date | Date of birth of the applicant in the format "YYYY-MM-DD" |
applicant_monthly_income | decimal | float | Last updated monthly income of the applicant |
applicant_cibil_score | number | integer | Last updated bureau score of the borrower |
applicant_aadhar_number | text | string | The Aadhar number of the applicant |
applicant_pan_number | text | string | PAN number of the applicant |
applicant_photo_link | url | string | URL of the profile photo uploaded for the loan applicant |
applicant_notice_reference_number | text | string | Notice reference number of the Applicant |
applicant_occupation | text | string | Last updated occupation of the applicant |
applicant_language | language | string | Language of the applicant as per ISO 639-1 Code standards (Link: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (Options:English,Hindi,Tamil,Punjabi,Telugu,Marathi,Gujarati,Kannada,Bengali,Malayalam,Oriya,Assamese) |
total_loan_amount | amount | float | Total amount that was disbursed by the bank for the given loan account |
vehicle_registration_number | text | string | The vehicle registration number for the vehicle linked to the loan at the time of approval |
loan_tenure | number | integer | Tenure of the loan in months |
client_loan_sanction_date | date | date | The sanction date of the loan in the format 'YYYY-MM-DD' |
loan_end_date | date | date | The date on which the loan was supposed to end as per the amortisation schedule e.g. "YYYY-MM-DD" |
interest_on_loan | percentage | float | The total interest amount that was determined at the time of loan disbursal as per the amortisation schedule |
tenure_finished | bool | boolean | Boolean indicator showing wheher the tenure of the loan is finished or not. (Options: True/False) |
security_type | text | string | The type of security against the loan in case the loan is an secured loan (Options: Secured/Secured Movable/Secured Immovable) otherwise the value will be 'Unsecured' |
backed_by_security | bool | boolean | Boolean variable providing information of whether the loan has a guarantor or not (Options: True/False) |
chassis_number | text | string | Chassis number of vehicle linked to the loan |
loan_nbfc_name | text | string | The name of the NBFC linked to the loan (if applicable) |
loan_nbfc_cin | text | string | The CIN of the NBFC linked to the loan (if applicable) |
tags | text | string | List of tags that need to be applied to the loan at the time of upload [multiple values should be comma separated, order not important] |
agent_email | email address | string | Email of the user to which loan should be allocated to at the time of loan data upload |
emi_amount | amount | float | The amount of a single EMI that was determined at the time of loan disbursal as per the amortisation schedule |
engine_number | text | string | The engine number of the vehicle linked to the loan |
group_id | text | string | The group_id assigned to the linked loan by lender |
product_type | text | string | The financial product type in which the loan falls in, a further classification of loan type e.g. - 4-wheeler loan, 2-wheeler Loan, Overdraft loan, Term Loan etc. |
credit_account_number | number | integer | The account number of the borrower in which he/she received the loan amount. Eg - "0000012835" |
credit_account_holder_name | text | string | Full name of the credit account holder e.g - "Ramesh Singh" |
credit_account_holder_type | text | string | The account type of the credit bank account holder e.g - Savings, Current, etc |
credit_bank_name | text | string | The name of the bank in which credit account holder (borrower) received the loan amount |
credit_bank_ifsc_code | text | string | The IFSC code of the bank in which borrower received the loan amount |
business_name | text | string | Last updated name of the business of the applicant |
make_and_model | text | string | The make and model of the vehicle linked to the loan (Applicable in case of vehicle/auto loans) |
merchant_name | text | string | Name of the merchant linked to the loan e.g. the merchant to which |
notice_date | date | date | The date that is to be printed on the draft PDF |
notice_delivery_partner | text | string | The name of the delivery partner merchant that was used to deliver the notice |
payment_link | url | string | The URL corresponding to the given allocation month and loan to send to the borrower through various communications in order to get them to pay through it |
payment_link_expiry | number | integer | The expiry time for the payment link (seconds) |
channel_partner | text | string | Channel partner name of the applicant |
loan_region | text | string | Geographical Region to which the loan belongs to |
loan_regional_manager_name | text | string | Name of the regional manager assigned by the client to the loan |
loan_regional_manager_contact_number | mobile number | string | Contact number of the regional manager assigned by the client to the loan |
loan_regional_manager_contact_email | email address | string | Contact email of the regional manager assigned by the client to the loan |
loan_source_branch_address | text | string | Address of the physical branch which disbured the loan (if applicable) |
Document Keys | |||
document_details | list | list | List of variable containing all the details corresponding to the document that has been uploaded |
security_mode | text | string | The security mode for the loan provided by the borrower at the time of loan approval e.g. - NACH, ECS, ENACH, PDC, Others (Two wheeler, Four wheeler, house) etc. |
document_number | text | string | Document number of the security document e.g. Cheque Number, ECS number etc. |
document_bank_name | text | string | The name of bank/lender that issued the security document e.g. cheque bank name |
document_bank_ifsc_code | text | string | The IFSC code of the bank that has issued the security document |
document_amount | amount | float | The amount mentioned on the security document. Eg. cheque amount |
document_date | date | date | The execution date of the security document submitted by borrower e.g. cheque date |
document_dishonour_date | date | date | The dishonour date of the security document e.g. Cheque dishonour date |
document_signature_name | text | string | The name of the signee on the security document. Eg. Signee name on the Cheque |
document_bounce_bank_account_number | number | integer | The account number of the bank account in which document was bounced |
document_bounce_charges | decimal | float | The charges associated with the document bounce processing |
document_bounce_bank_name | text | string | Bank name in which the security_mode document was bounced |
document_bounce_bank_ifsc_code | text | string | IFSC code of the bank in which document was bounced |
document_bounce_bank_address | text | string | Address of the bank in which document was bounced |
document_bounce_memo_date | date | date | Date of document bounce memo |
reason_of_document_bounce | text | string | Reason behind the security_mode document bounce. Eg. Insufficient balance |
document_micr | text | string | 9 digit Document MICR Code of the document |
document_presented_in_account | text | string | Account in which document is presented |
document_presented_zone | text | string | Zone in which document is presented |
document_bounce_memo_branch_address | text | string | Address of the document bounce memo branch |
document_signature_address_text | text | string | Document signature address |
document_signature_city | text | string | Document signature city |
document_signature_state | text | string | Document signature state |
document_signature_pincode | postal code | integer | Document signature pincode |
document_bounce_memo_reference_number | text | string | Reference number of document bounce memo |
document_sequence_number | text | string | Sequence number of document |
document_bounce_memo_return_date | date | date | Document bounce memo return date |
document_umrn | text | string | Document Unique Mandate Reference Number |
Address Keys | |||
applicant_address | list | list | List of Variable containing all the sub-variables corresponding to the address of the applicant |
applicant_address_type | text | string | The type of address that has been provided for applicant address [Options - Home, Business, Office] |
applicant_address_text | text | string | Entire text body of address of applicant including lane, street, house number, colony etc. |
applicant_state | text | string | State provided in the applicant address |
applicant_city | text | string | City provided in the applicant address |
applicant_landmark | text | string | Nearby Landmark provided in the applicant address |
applicant_pincode | postal code | integer | Pincode provided in the applicant address |
applicant_address_latitude | text | string | The latitude of the location this applicant address points to, this will get used at the time of allocation |
applicant_address_longitude | text | string | The longitude of the location this applicant address points to, this will get used at the time of allocation |
Default Keys | |||
defaults | list | list | List of variable containing all the different allocation month level variables that provide information about the different amounts that are due, recovered and general details of the EMI or allocation in question |
allocation_month | date | date | The month and year for which the loan has been allocated on the CG Platform |
allocation_dpd_value | number | integer | The DPD value of the borrower at the time of allocation of loan onto the CG Platform |
allocation_dpd_bracket | text | string | The DPD bracket of the borrower at the time of allocation of loan onto the CG Platform |
total_claim_amount | amount | float | The DPD bracket of the borrower at the time of allocation of loan onto the CG Platform |
late_fee | amount | float | Late fee that needs to be paid by the borrower |
date_of_default | date | date | Date on which the borrower defaulted on the loan (first default) |
expected_emi | amount | float | The EMI amount without late fees and penalties that is to be recovered for the given month from the borrower |
default_emi_number | number | integer | The serial number of the EMI that the borrower defaulted on as per the amortization schedule created at the time of loan disbursal by the lender |
settlement_amount | amount | float | The settlement amount that is to be recovered from the borrower to in order to generate the settlement NOC by lender |
client_amount_recovered | amount | float | The amount that was already recovered by the client/lender before allocating the loan on CG Platform |
principal_outstanding_amount | amount | float | The principal outstanding amount corresponding to the loan at the time of allocation to CG |
expected_emi_interest_amount | amount | float | The interest amount corresponding to the EMI that is to be recovered for the given month from the borrower |
expected_emi_principal_amount | amount | float | The principal amount corresponding to the EMI that is to be recovered for the given month from the borrower |
other_penalty | decimal | float | The penalty amount corresponding to the EMI that is to be recovered for the given month from the borrower |
Reference Keys | |||
references | list | list | List of Variable containing all the details of the person who has served as a reference for the borrower |
relation_with_applicant | text | string | The relation of the reference to the applicant |
name | text | string | The full name of the reference |
reference_contact_number_details | list | list | List of Variable containing information about the contact number associated with the applicant |
contact_number | mobile number | string | The contact number of the reference |
reference_contact_number_type | text | string | The type or category of the contact number provided for the reference. |
reference_gender | gender | string | The gender of the reference |
reference_pan_number | text | string | The PAN card number of the reference |
reference_address | list | list | List of Variable containing all the address details of the reference |
reference_address_type | text | string | The address type of the reference |
reference_address_text | text | string | The full address text of the reference |
reference_city | text | string | The city of residence of the reference |
reference_state | text | string | The state of residence of the reference |
reference_pincode | postal code | integer | The pincode of residence of the refernece |
Coapplicant Keys | |||
co_applicant | list | list | List of Variable containing all the sub-variables regarding the details of the co-applicant |
co_applicant_name | text | string | Full name of the co-applicant |
co_applicant_type | text | string | The type of the co-applicant |
co_applicant_language | language | string | The language used by the co-applicant |
co_applicant_email_details | list | list | List of Variable containing information about the email addresses associated with the applicant |
co_applicant_email | email address | string | Email ID of the co-applicant [should be separated by comma in case of multiple emails, ordering is important] |
co_applicant_email_type | text | string | The type or category of the email provided for the coapplicant. |
co_applicant_contact_number_details | list | list | List of Variable containing information about the contact number associated with the applicant |
co_applicant_contact_number | mobile number | string | Contact number of borrower [should be separated by comma in case of multiple contact numbers, ordering is important] |
co_applicant_contact_number_type | text | string | The type or category of the contact number provided for the coapplicant. |
co_applicant_gender | gender | string | Gender of the co-applicant [Options: Male, Female, Other] |
co_applicant_dob | date | date | Date of birth of the co-applicant in the format "YYYY-MM-DD" |
co_applicant_notice_reference_number | text | string | Notice reference number of co-applicant |
co_applicant_photo_link | url | string | URL of the profile photo uploaded for the loan co-applicant |
co_applicant_address | list | list | List of Variable containing all the sub-variables corresponding to the address of the co-applicant |
co_applicant_address_text | text | string | Entire text body of address of co-applicant including lane, street, house number, colony etc. |
co_applicant_address_type | text | string | The type of address that has been provided for co-applicant address [Options - Home, Business, Office] |
co_applicant_state | text | string | State provided in the co-applicant address |
co_applicant_city | text | string | City provided in the co-applicant address |
co_applicant_pincode | postal code | integer | Pincode provided in the co-applicant address |
co_applicant_address_latitude | text | string | The latitude of the location this co-applicant address points to, this will get used at the time of allocation |
co_applicant_address_longitude | text | string | The longitude of the location this co-applicant address points to, this will get used at the time of allocation |
Response Status Code
Status Code: 400 Bad Request
Sample response 1
{
"message": "Data Validation Failed",
"output": {
"errors": {
"applicant_dob": "Value must be of type date with format YYYY-MM-DD",
"applicant_language": "Invalid languages, [feger]",
"co_applicant": {
"0": {
"co_applicant_email": "Invalid Emails, [tempgmail.com]"
}
},
"defaults": {
"0": {
"default_emi_number": "Value must be a number"
}
}
}
},
"success": false
}
Sample Response 2
{
"message": "Data Validation Failed",
"output": {
"errors": {
"applicant_address": {
"0": {
"applicant_address_type": "Invalid value provided for applicant_address_type"
}
},
"applicant_contact_details": {
"0": {
"applicant_contact_number_type": "Invalid value provided for applicant_contact_number_type"
}
},
"co_applicant": {
"0": {
"co_applicant_contact_details": {
"0": {
"co_applicant_contact_number_type": "Invalid value provided for co_applicant_contact_number_type"
}
}
}
}
}
},
"success": false
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
201 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Update Loan API
import requests
url = "{BASE_URL}/loan/{loan_id}"
payload = "{\n \"total_loan_amount\": 60000\n}"
headers = {
'authenticationtoken': '{auth_token}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request PATCH '{BASE_URL}/loan/{loan_id}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"total_loan_amount": 60000
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({"total_loan_amount":60000});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{BASE_URL}/loan/{loan_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above code returns JSON structured like this:
{
"output": "Loan successfully updated",
"message": "success"
}
Use this API to update the details of a particular loan.
HTTP Request - PATCH
PATCH {BASE_URL}/loan/{loan_id}
Path Parameters
Parameter | Description |
---|---|
loan_id | Loan id of the loan |
Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token given by Credgenics |
Response Status Code
Status Code: 400 Bad Request
Sample response
{
"message": "Data Validation Failed",
"output": {
"errors": {
"total_loan_amount": "Value must be a number"
}
},
"success": false
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
200 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Update Payment API
import requests
import json
url = "{BASE_URL}/payments/{loan_id}?allocation_month={allocation_month}"
payload = json.dumps({
"amount_recovered": 1000,
"recovery_date": "2022-01-08",
"recovery_method": "Communications",
"recovered_by": "shriram@gmail.com",
"payment_method": "Cheque",
"closure_with": "NOC",
"payment_mode": "cash",
"payment_reference_number": "RFN123456",
"payment_received_date" : "2022-01-12",
"payment_meta_data": {
"pan_number": "ABCDE1234B"
}
})
headers = {
'authenticationtoken': '{auth_token}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request PATCH '{BASE_URL}/payments/{loan_id}?allocation_month={allocation_month}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount_recovered": 1000,
"recovery_date": "2022-01-08",
"recovery_method": "Communications",
"recovered_by": "shriram@gmail.com",
"payment_method": "Cheque",
"closure_with": "NOC",
"payment_mode": "cash",
"payment_reference_number": "RFN123456",
"payment_received_date" : "2022-01-12",
"payment_meta_data": {
"pan_number": "ABCDE1234B"
}
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"amount_recovered": 1000,
"recovery_date": "2022-01-08",
"recovery_method": "Communications",
"recovered_by": "shriram@gmail.com",
"payment_method": "Cheque",
"closure_with": "NOC",
"payment_mode": "cash",
"payment_reference_number": "RFN123456",
"payment_received_date" : "2022-01-12",
"payment_meta_data": {
"pan_number": "ABCDE1234B"
}
});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{BASE_URL}/payments/{loan_id}?allocation_month={allocation_month}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above code returns JSON structured like this:
{
"output": "Data updated successfully",
"loan_id": "hello",
"message": "success"
}
Use this API to update the payment details of a customer. This API will create a new entry corresponding to a loan_id.
HTTP Requests - PATCH
PATCH {BASE_URL}/payments/{loan_id}?allocation_month={allocation_month}
Path Parameters
Parameter | Description |
---|---|
loan_id | Loan id of the recovered loan |
allocation_month | Allocation month of the recovered loan. Eg - "2021-2-01" |
Example Json for Recovery Amount Bifurcation
{
"amount_recovered": 2200,
"date_of_default": "2022-05-07",
"recovery_date": "2022-06-02 09:30:00",
"recovery_method": "Field collection",
"payment_method": "Cash",
"recovered_expected_emi": 2000, //recovery amount bifurcation key
"recovered_late_fee": 100, //recovery amount bifurcation key
"recovered_penalty": 100 //recovery amount bifurcation key
}
Enabling Recovery Amount Bifurcation can be achieved through Company Details tab on Setting page.
Steps:
- Log in to the platform
- Navigate to the Company details tab in settings page
- Select Variable tab in Company details
- Under Recovery Variables, enable Recovered Amount Bifurcation.
After enabling recovery amount bifurcation, you can add the desired bifurcation variables using Add variable option.
Once the variables are added, you need to add recovered_ as a prefix to all bifurcation variables and add them in the payload at the top-level keys.
For example: if you add late_fee as a bifurcation variable, then the payload key format will be recovered_late_fee
{
"amount_recovered": 2200,
"date_of_default": "2022-05-07",
"recovery_date": "2022-06-02 09:30:00",
"recovery_method": "Field collection",
"payment_method": "Cash",
"recovered_expected_emi": 2000, //recovery amount bifurcation key
"recovered_late_fee": 100, //recovery amount bifurcation key
"recovered_penalty": 100, //recovery amount bifurcation key
"payment_meta_data": {
"cheque_number": "1230",
"cheque_date": "2024-08-05",
"account_number": "wsedfgh",
"ifsc_code": "adfsdg",
"bank_name": "abc",
"branch_name": "abc",
"cheque_holder_name": "ram",
"relation_with_applicant": "son"
}
}
Request Headers
Parameter | Description |
---|---|
authenticationtoken | The authentication token assigned to you by Credgenics |
Content-Type | "application/json" |
Request Body Parameters
Key Name | Type | Required | Description |
---|---|---|---|
amount_recovered | float | True | Total amount received in a given payment |
recovery_method | string | False | The recovery method that was used to recover a given payment from the borrower (Options: Field Collection, Communication, Legal) |
payment_method | string | False | The method of payment that was used to complete the transfer of money (Options: Online, Cash, Cheque, Bank Account Transfer, Application, Payment Link) |
payment_received_date | date | False | The date on which the payment was actually received in the lenders account after processing of payment by the payment processor |
closure_with | string | False | In cases where the recovery status is 'Closed', it needs to be specified whether the loan was settled or a complete recovery was made (Options: NOC, Settlement) |
payment_reference_number | string | False | The unique reference number generated by the payment processor at the time of execution of payment e.g. UPI transaction ID |
payment_mode | string | False | The mode of payment that was used to complete the transfer of money e.g. UPI, NEFT, RTGS etc. |
recovered_by | string | False | The user_id / mobile_number / email_address of the user that collected the payment, in case of blank it will auto-infer from the auth token. |
recovery_date | datetime | False | This is the date on which the recovery was made by the agent/channel i.e. it has been updated on CG system that the recovery has been done. This date might differ from the actual date on which the payment was received from the borrower. |
Response Status Code
Status Code: 400 Bad Request
Sample response
{
"message":"Value must be a number",
"success":false
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
200 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Credit Line APIs
Get Customer API
import requests
url = "{BASE_URL}/loan/{client_customer_id}?fields={fields}"
payload = {}
headers = {
'authenticationtoken': '{auth_token}',
}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request GET '{BASE_URL}/loan/{client_customer_id}?fields={fields}' \
--header 'authenticationtoken: {auth_token}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
var requestOptions = {
method: "GET",
headers: myHeaders,
redirect: "follow",
};
fetch(
"{BASE_URL}/loan/{client_customer_id}?fields={fields}",
requestOptions
)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.log("error", error));
The above command returns JSON structured like this:
{
"output":{
"applicant_details":{
"client_customer_id":"189004",
"defaults":[
{
"allocation_month":"2021-1-01",
"amount_recovered":0,
"settlement_amount":null,
"tags":[
{
"tag_name":"temporary",
"active":true,
"created":"2021-07-21 07:50:41"
},
{
"tag_name":"temporary-tag",
"active":true,
"created":"2021-07-21 09:50:41"
}
]
},
{
"allocation_month":"2021-2-01",
"amount_recovered":3550,
"settlement_amount":45000,
"tags":[
{
"tag_name":"demo",
"active":true,
"created":"2021-07-21 10:50:41"
}
]
}
],
"loan_type":"Personal Loan",
"references":[
{
"name":"Shri Ram",
"contact_number":"9999999999",
"relation_with_applicant":"Colleague"
}
],
"co_applicant":[
{
"co_applicant_name":"Naveen Shekhawat",
"co_applicant_type":"Individual",
"co_applicant_email":"pravinsingh@gmail.com",
"co_applicant_gender":"Male",
"co_applicant_contact_number":"9814274470",
"co_applicant_dob":"1990-06-29",
"co_applicant_address":[
{
"co_applicant_address_text":"",
"co_applicant_address_type":"Home",
"co_applicant_state":"Rajasthan",
"co_applicant_city":"Alwar",
"co_applicant_pincode":301024
}
]
}
],
"payment_link":"",
"product_type":"Payday personal",
"applicant_dob":"1992-03-23",
"business_name":"ABC PVT. LTd.",
"engine_number":"",
"loan_end_date":"2019-04-06",
"loan_nbfc_cin":"U65191TN1994PLC078035",
"merchant_name":"Intellipaat",
"security_type":"Secured immovable",
"applicant_name":"Sri Ram",
"chassis_number":"",
"loan_nbfc_name":"AKARA CAPITAL ADVISORS PVT. LTD.",
"make_and_model":"",
"applicant_email":"shriram@gmail.com",
"applicant_gender":"Male",
"backed_by_surety":false,
"credit_bank_name":"HDFC Bank",
"document_details":[
{
"security_mode":"NACH",
"document_number":"757493",
"document_bank_name":"HDFC Bank",
"document_bank_ifsc_code":"",
"document_amount":50000,
"document_date":"2018-04-10",
"document_dishonour_date":"2018-04-12",
"document_signature_name":"",
"document_bounce_bank_account_number":"",
"document_bounce_bank_ifsc_code":"",
"document_bounce_charges":null,
"document_bounce_bank_name":"Yes Bank",
"document_bounce_bank_address":"",
"document_bounce_memo_date":null,
"reason_of_document_bounce":"",
"document_bounce_memo_reference_number":"",
"document_sequence_number":""
}
],
"applicant_address":[
{
"applicant_city":"Jodhpur",
"applicant_state":"Rajasthan",
"applicant_pincode":342001,
"applicant_landmark":"",
"applicant_address_text":"395/13 Veer Dua Colony Baldev Nager",
"applicant_address_type":"Home"
}
],
"applicant_language":"hi",
"applicant_occupation":"Job",
"applicant_pan_number":"",
"applicant_cibil_score":820,
"credit_account_number":"",
"credit_bank_ifsc_code":"HDFC0G45B4W",
"applicant_aadhar_number":"",
"applicant_contact_number":"9999999999",
"applicant_monthly_income":40000,
"credit_account_holder_name":"Sri Ram",
"credit_account_holder_type":"Current",
"loan_regional_manager_name":"",
"vehicle_registration_number":"",
"loan_regional_manager_contact_email":"",
"loan_regional_manager_contact_number":"",
"archive":false
},
"transactions_details":[
{
"transaction_id":"283921",
"data":{
"defaults":[
{
"created":"2021-02-14 20:22:41.889461",
"late_fee":59443,
"upload_date":null,
"closure_with":"",
"expected_emi":54000,
"payment_mode":"",
"other_penalty":null,
"recovery_date":"2021-02-26 13:07:22.248235",
"payment_method":"Online",
"date_of_default":"2020-01-23",
"dpd":"30",
"dpd_bracket":"30+",
"recovery_method":"",
"allocation_month":"2021-2-01",
"amount_recovered":3450,
"payment_reference_number":"",
"default_emi_number":12,
"total_claim_amount":113000,
"allocation_dpd_value":679,
"actual_date_of_default":"2019-04-07",
"allocation_dpd_bracket":"180+",
"client_amount_recovered":0,
"expected_emi_interest_amount":null,
"principal_outstanding_amount":45000,
"expected_emi_principal_amount":45000,
"recovery_status":"Not Recovered"
}
],
"emi_amount":6000,
"loan_tenure":12,
"loan_end_date":"2019-04-06",
"transaction_id":"283921",
"tenure_finished":true,
"interest_on_loan":18,
"total_loan_amount":50000,
"client_loan_sanction_date":"2018-04-06"
}
},
{
"transaction_id":"18372",
"data":{
"defaults":[
{
"created":"2021-01-27 18:57:11.514467",
"late_fee":1000,
"upload_date":"",
"expected_emi":10001,
"other_penalty":null,
"date_of_default":"2020-03-02",
"dpd":"225",
"dpd_bracket":"180+",
"allocation_month":"2021-1-01",
"amount_recovered":0,
"default_emi_number":4,
"total_claim_amount":9000,
"allocation_dpd_value":331,
"actual_date_of_default":"2020-03-02",
"allocation_dpd_bracket":"180+",
"client_amount_recovered":null,
"expected_emi_interest_amount":2000,
"principal_outstanding_amount":1000,
"expected_emi_principal_amount":9000,
"recovery_status":"Not Recovered"
}
],
"emi_amount":1000,
"loan_tenure":11,
"loan_end_date":"2020-03-02",
"transaction_id":"283920",
"tenure_finished":true,
"interest_on_loan":12,
"total_loan_amount":902929,
"client_loan_sanction_date":"2020-01-29"
}
}
],
"global_status":"Initiated",
"legal_status":"Initiated",
"settlement_status":"Initiated",
"payment_history":[
{
"payment_id":235,
"client_customer_id":"189004",
"amount_recovered":1000,
"recovery_method":"Communications",
"allocation_month":"2021-4-01",
"payment_method":"Online",
"payment_mode":"",
"payment_reference_number":"",
"author":"demo.admin@credgenics.com",
"created":"2021-04-15 06:43:50"
},
{
"payment_id":32432,
"client_customer_id":"189004",
"amount_recovered":1000,
"recovery_method":"Communications",
"allocation_month":"2021-4-01",
"payment_method":"Online",
"payment_mode":"",
"payment_reference_number":"",
"author":"demo.admin@credgenics.com",
"created":"2021-05-15 18:44:15"
}
],
"communication_details":[
{
"type_of_comm":"call",
"comm_dict":{
"to":"9706367068",
"from":"8178041121",
"duration":"0 : 0 : 34",
"called_to":"applicant",
"call_start_time":"2020-11-04 17:16:32",
"call_end_time":"2020-11-04 17:17:06",
"call_response":"Will pay tomorrow",
"recording_url":"",
"applicant_type":"applicant"
}
},
{
"type_of_comm":"sms",
"comm_dict":{
"sms_body":"Hi Keval,\n\nPFA legal notice for the non payment of your outstanding dues to Credgenics as per the terms of the loan agreement. \n\nKindly ignore if the matter has already been settled.\n\nhttps://credgenics.com/notices/930b9ecfee7e?t=64bbec02\n\nThanks and Regards,\n\nAdvocates for HLPL\nAR - Abhishek Gupta\nEmail id: abhishek.gupta1@udaan.com\nPhone number: 9513231633 ",
"sms_mobile":"9706367068",
"notice_link":"930b9ecfee7e",
"delivered_time":"2020-08-15 16:57:31",
"clicked_time":"2020-08-18 10:55:04.839459",
"sms_language":"en",
"message_count":3,
"template_name":"Legal Notice Template",
"character_count":362,
"notice_click_count":2
}
}
],
"notice_tracking_details":[
{
"notice_id":4332,
"case_type":"lrn",
"document_type":"Notice",
"s3_link":"https://s3-ap-south-1.amazonaws.com/credgenics-cases/production/notice_links/930b9ecfee7e.pdf",
"created":"2020-08-18 10:55:04",
"data":{
}
},
{
"notice_id":3563,
"case_type":"lrn",
"document_type":"Speedpost",
"created":"2020-08-18 10:55:04",
"data":{
"events":[
{
"date":"05/10/2020",
"time":"15:27:17",
"office":"Bhuj HO",
"description":"Item Delivery Confirmed"
},
{
"date":"05/10/2020",
"time":"09:17:46",
"office":"Bhuj HO",
"description":"Out for Delivery"
},
{
"date":"05/10/2020",
"time":"08:22:29",
"office":"Bhuj HO",
"description":"Item Received"
},
{
"date":"04/10/2020",
"time":"10:57:04",
"office":"Bhuj ICH",
"description":"Item Dispatched"
},
{
"date":"04/10/2020",
"time":"09:18:22",
"office":"Bhuj ICH",
"description":"Item Bagged"
},
{
"date":"04/10/2020",
"time":"06:17:52",
"office":"Bhuj ICH",
"description":"Item Received"
},
{
"date":"03/10/2020",
"time":"12:30:43",
"office":"Ahmedabad NSH",
"description":"Item Dispatched"
},
{
"date":"03/10/2020",
"time":"11:26:43",
"office":"Ahmedabad NSH",
"description":"Item Bagged"
},
{
"date":"03/10/2020",
"time":"08:40:56",
"office":"Ahmedabad NSH",
"description":"Item Received"
},
{
"date":"29/09/2020",
"time":"17:52:17",
"office":"Rohini Sector7 SO",
"description":"Item Dispatched"
},
{
"date":"29/09/2020",
"time":"17:18:27",
"office":"Rohini Sector7 SO",
"description":"Item Bagged"
},
{
"date":"29/09/2020",
"time":"16:17:42",
"office":"Rohini Sector7 SO",
"description":"Item Booked"
}
],
"booked_at":"Rohini Sector7 SO",
"article_type":"Inland Speed Post",
"speedpost_id":"ED670494304IN",
"applicant_type":"applicant",
"speedpost_tarrif":"41.30",
"delivery_location":"Sonipat HO",
"speedpost_s3_link":"",
"speedpost_booked_on":"29/09/2020 16:17:42",
"applicant_address_type":"home",
"applicant_address_index":0,
"speedpost_delivery_status":"Delivered",
"co_applicant_address_index":-1,
"speedpost_undelivered_reason":"",
"speedpost_destination_pincode":"131001",
"speedpost_delivery_confirmed_on":"05/10/2020 15:27:17"
}
}
],
"remarks":[
{
"remark_id":4234,
"remarks":"(Legal Notice Template ) SMS Sent",
"created":"2020-11-15 16:57:26",
"author":"ssingh@credgenics.com"
},
{
"remarks_id":254,
"remarks":"Will pay settlement amount tomorrow: Call response , Promise to Pay: Call status , 2020-11-24 - Reminder date",
"created":"2020-11-23 12:43:11",
"author":"ssingh@credgenics.com"
}
]
},
"message":"success"
}
Use this API to retrieve all details of a particular customer
HTTP Request - GET
GET {BASE_URL}/loan/{client_customer_id}?fields={fields}
Path Parameters
Parameter | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
client_customer_id | Customer id of the customer | ||||||||||||||
fields | Name of the fields of which you want to get the details of in the response. Eg: fields=loan,payment or fields=notice By default, the api will send all the fields in the response.
|
||||||||||||||
start_date / start_time | Specify unix timestamp to retrieve customer details from that date. | ||||||||||||||
end_date / end_time | Specify unix timestamp to retrieve customer details up to that date. |
Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token given by Credgenics |
Response Status Code
Status Code: 400 Bad Request
Sample Response:
{
"message": "Please provide correct client_customer_id",
"success": false
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
200 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Upload Transaction API
import requests
url = "{BASE_URL}/loan/{transaction_id}"
payload = "{\n \"client_customer_id\": \"189004\",\n \"transaction_id\": \"283921\",\n \"loan_type\": \"Personal Loan\",\n \"applicant_name\": \"Shri Ram\",\n \"applicant_dob\": \"1992-03-23\",\n \"applicant_email\": \"shriram@gmail.com\",\n \"applicant_gender\": \"Male\",\n \"applicant_contact_number\": \"9805265926\",\n \"applicant_monthly_income\": 40000,\n \"applicant_cibil_score\": 820,\n \"applicant_occupation\": \"Job\",\n \"applicant_aadhar_number\": \"235498671293\",\n \"applicant_language\": \"hi\",\n \"applicant_pan_number\": \"ADJIY-3516-D\",\n \"total_loan_amount\": 50000,\n \"loan_tenure\": 12,\n \"client_loan_sanction_date\": \"2018-04-06\",\n \"loan_end_date\": \"2019-04-06\",\n \"interest_on_loan\": 18,\n \"tenure_finished\": true,\n \"security_type\": \"Secured immovable\",\n \"backed_by_surety\": false,\n \"loan_nbfc_name\": \"AKARA CAPITAL ADVISORS PVT. LTD.\",\n \"loan_nbfc_cin\": \"U65191TN1994PLC079235\",\n \"emi_amount\": 6000,\n \"product_type\": \"\",\n \"credit_account_number\": \"11271000005809\",\n \"credit_account_holder_name\": \"Sri Ram\",\n \"credit_bank_name\": \"HDFC Bank\",\n \"credit_account_holder_type\": \"Current\",\n \"credit_bank_ifsc_code\": \"HDFC0G45B4W\",\n \"tags\": \"tag1,tag2\",\n \"agent_email\":\"demoagent@email.com\",\n \"document_details\": [\n {\n \"security_mode\": \"NACH\",\n \"document_number\": \"757493\",\n \"document_bank_name\": \"HDFC Bank\",\n \"document_bank_ifsc_code\": \"\",\n \"document_amount\": 50000,\n \"document_date\": \"2018-04-10\",\n \"document_dishonour_date\": \"2018-04-12\",\n \"document_signature_name\": \"\",\n \"document_bounce_bank_account_number\": \"\",\n \"document_bounce_bank_ifsc_code\": \"\",\n \"document_bounce_charges\": null,\n \"document_bounce_bank_name\": \"Yes Bank\",\n \"document_bounce_bank_address\": \"\",\n \"document_bounce_memo_date\": null,\n \"reason_of_document_bounce\": \"\"\n \"document_bounce_memo_reference_number\": \"\",\n \"document_sequence_number\": \"\"\n \"document_bounce_memo_return_date\": \"2018-02-21\"\n }\n ],\n \"business_name\": \"\",\n \"applicant_address\": [\n {\n \"applicant_address_type\": \"Home\",\n \"applicant_address_text\": \" 395/13 veer dua colony baldev nager\",\n \"applicant_state\": \"Rajasthan\",\n \"applicant_landmark\": \"\",\n \"applicant_city\": \"Jodhpur\",\n \"applicant_pincode\": 342001\n }\n ],\n \"defaults\": [\n {\n \"allocation_month\":\"2021-7-01\",\n \"total_claim_amount\": 113000,\n \"late_fee\": 59443,\n \"date_of_default\": \"2019-04-07\",\n \"expected_emi\": 54000,\n \"default_emi_number\": 12,\n \"settlement_amount\": 45000,\n \"client_amount_recovered\": 0,\n \"principal_outstanding_amount\": 45000,\n \"expected_emi_interest_amount\": null,\n \"expected_emi_principal_amount\": 45000,\n \"other_penalty\": null\n }\n ],\n \"co_applicant\": [\n {\n \"co_applicant_name\": \"Naveen Shekhawat\",\n \"co_applicant_type\": \"Individual\",\n \"co_applicant_email\": \"pravinsingh@gmail.com\",\n \"co_applicant_gender\": \"Male\",\n \"co_applicant_contact_number\": \"9814274470\",\n \"co_applicant_dob\": \"1990-06-29\",\n \"co_applicant_address\": [\n {\n \"co_applicant_address_text\": \"\",\n \"co_applicant_address_type\": \"Home\",\n \"co_applicant_state\": \"Rajasthan\",\n \"co_applicant_city\": \"Alwar\",\n \"co_applicant_pincode\": 301024\n }\n ],\n \"references\": [\n {\n \"relation_with_applicant\": \"Colleague\",\n \"name\": \"Abhishek Kumar\",\n \"contact_number\": \"8802913432\"\n }\n ],\n \"merchant_name\": \"Intellipaat\",\n \"payment_link\": \"https://rzp.io/i/itKAy2q\",\n \"payment_link_expiry\": 1627390971\n}"
headers = {
'authenticationtoken': '{auth_token}',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request POST '{BASE_URL}/loan/{transaction_id}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_customer_id": "189004",
"transaction_id": "283921",
"loan_type": "Personal Loan",
"applicant_name": "Shri Ram",
"applicant_dob": "1992-03-23",
"applicant_email": "shriram@gmail.com",
"applicant_gender": "Male",
"applicant_contact_number": "9805265926",
"applicant_monthly_income": 40000,
"applicant_cibil_score": 820,
"applicant_occupation": "Job",
"applicant_aadhar_number": "235498671293",
"applicant_language": "hi",
"applicant_pan_number": "ADJIY-3516-D",
"total_loan_amount": 50000,
"loan_tenure": 12,
"client_loan_sanction_date": "2018-04-06",
"loan_end_date": "2019-04-06",
"interest_on_loan": 18,
"tenure_finished": true,
"security_type": "Secured immovable",
"backed_by_surety": false,
"loan_nbfc_name": "AKARA CAPITAL ADVISORS PVT. LTD.",
"loan_nbfc_cin": "U65191TN1994PLC079235",
"emi_amount": 6000,
"product_type": "",
"credit_account_number": "11271000005809",
"credit_account_holder_name": "Sri Ram",
"credit_bank_name": "HDFC Bank",
"credit_account_holder_type": "Current",
"credit_bank_ifsc_code": "HDFC0G45B4W",
"tags": "tag1,tag2",
"agent_email": "demoagent@email.com,demoagent2@email.com",
"document_details": [
{
"security_mode": "NACH",
"document_number": "757493",
"document_bank_name": "HDFC Bank",
"document_bank_ifsc_code": "",
"document_amount": 50000,
"document_date": "2018-04-10",
"document_dishonour_date": "2018-04-12",
"document_signature_name": "",
"document_bounce_bank_account_number": "",
"document_bounce_bank_ifsc_code": "",
"document_bounce_charges": null,
"document_bounce_bank_name": "Yes Bank",
"document_bounce_bank_address": "",
"document_bounce_memo_date": null,
"reason_of_document_bounce": "",
"document_bounce_memo_reference_number": "",
"document_sequence_number": "",
"document_bounce_memo_return_date": "2019-06-23"
}
],
"business_name": "",
"applicant_address": [
{
"applicant_address_type": "Home",
"applicant_address_text": " 395/13 veer dua colony baldev nager",
"applicant_state": "Rajasthan",
"applicant_city": "Jodhpur",
"applicant_landmark": "",
"applicant_pincode": 342001
}
],
"defaults": [
{
"allocation_month": "2021-7-01",
"total_claim_amount": 113000,
"late_fee": 59443,
"date_of_default": "2019-04-07",
"expected_emi": 54000,
"default_emi_number": 12,
"settlement_amount": 45000,
"client_amount_recovered": 0,
"principal_outstanding_amount": 45000,
"expected_emi_interest_amount": null,
"expected_emi_principal_amount": 45000,
"other_penalty": null
}
],
"co_applicant": [
{
"co_applicant_name": "Naveen Shekhawat",
"co_applicant_type": "Individual",
"co_applicant_email": "pravinsingh@gmail.com",
"co_applicant_gender": "Male",
"co_applicant_contact_number": "9814274470",
"co_applicant_dob": "1990-06-29",
"co_applicant_address": [
{
"co_applicant_address_text": "",
"co_applicant_address_type": "Home",
"co_applicant_state": "Rajasthan",
"co_applicant_city": "Alwar",
"co_applicant_pincode": 301024
}
]
}
],
"references": [
{
"relation_with_applicant": "Colleague",
"name": "Abhishek Kumar",
"contact_number": "8802913432"
}
],
"merchant_name": "Intellipaat",
"payment_link": "https://rzp.io/i/itKAy2q",
"payment_link_expiry": 1627390971
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({"client_customer_id":"189004","transaction_id":"283921","loan_type":"Personal Loan","applicant_name":"Shri Ram","applicant_dob":"1992-03-23","applicant_email":"shriram@gmail.com","applicant_gender":"Male","applicant_contact_number":"9805265926","applicant_monthly_income":40000,"applicant_cibil_score":820,"applicant_occupation":"Job","applicant_aadhar_number":"235498671293","applicant_language":"hi","applicant_pan_number":"ADJIY-3516-D","total_loan_amount":50000,"loan_tenure":12,"client_loan_sanction_date":"2018-04-06","loan_end_date":"2019-04-06","interest_on_loan":18,"tenure_finished":true,"security_type":"Secured immovable","backed_by_surety":false,"loan_nbfc_name":"AKARA CAPITAL ADVISORS PVT. LTD.","loan_nbfc_cin":"U65191TN1994PLC079235","emi_amount":6000,"product_type":"","credit_account_number":"11271000005809","credit_account_holder_name":"Sri Ram","credit_bank_name":"HDFC Bank","credit_account_holder_type":"Current","credit_bank_ifsc_code":"HDFC0G45B4W","tags":"tag1,tag2","agent_email":"demoagent@email.com","document_details":[{"security_mode":"NACH","document_number":"757493","document_bank_name":"HDFC Bank","document_bank_ifsc_code":"","document_amount":50000,"document_date":"2018-04-10","document_dishonour_date":"2018-04-12","document_signature_name":"","document_bounce_bank_account_number":"","document_bounce_bank_ifsc_code":"","document_bounce_charges":null,"document_bounce_bank_name":"Yes Bank","document_bounce_bank_address":"","document_bounce_memo_date":null,"reason_of_document_bounce":"","document_bounce_memo_reference_number":"","document_seqeunce_number":"","document_bounce_memo_return_date": "2019-06-23"}],"business_name":"","applicant_address":[{"applicant_address_type":"Home","applicant_address_text":" 395/13 veer dua colony baldev nager","applicant_state":"Rajasthan","applicant_city":"Jodhpur","applicant_landmark": "","applicant_pincode":342001}],"defaults":[{"allocation_month":"2021-7-01","total_claim_amount":113000,"late_fee":59443,"date_of_default":"2019-04-07","expected_emi":54000,"default_emi_number":12,"settlement_amount":45000,"client_amount_recovered":0,"principal_outstanding_amount":45000,"expected_emi_interest_amount":null,"expected_emi_principal_amount":45000,"other_penalty":null}],"co_applicant":[{"co_applicant_name":"Naveen Shekhawat","co_applicant_type":"Individual","co_applicant_email":"pravinsingh@gmail.com","co_applicant_gender":"Male","co_applicant_contact_number":"9814274470","co_applicant_dob":"1990-06-29","co_applicant_address": [{"co_applicant_address_text": "","co_applicant_address_type": "Home","co_applicant_state": "Rajasthan","co_applicant_city": "Alwar","co_applicant_pincode": 301024}]}],"references":[{"relation_with_applicant":"Colleague","name":"Abhishek Kumar","contact_number":"8802913432"}],"merchant_name":"Intellipaat","payment_link":"https://rzp.io/i/itKAy2q", "payment_link_expiry": 1627390971});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{BASE_URL}/loan/{transaction_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above command returns JSON structured like this:
Sample Success Response
{
"output": "Transaction added successfully",
"message": "success"
}
Use this API to add new transaction / EMI of any customer.
HTTP Request - POST
POST {BASE_URL}/loan/{transaction_id}
Path Parameters
Parameter | Description |
---|---|
transaction_id | Transaction id of the transaction to upload |
Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token given by Credgenics |
Content-Type | application/json |
Response Status Code
Status Code: 400 Bad Request
Sample Response:
{
"message": "same transaction_id cannot exists for different client_customer_id"
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
201 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Update Transaction API
import requests
url = "{BASE_URL}/transaction/{client_customer_id}/{transaction_id}"
payload = "{\n \"total_loan_amount\": 60000\n}"
headers = {
'authenticationtoken': '{auth_token}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request PATCH '{BASE_URL}/transaction/{client_customer_id}/{transaction_id}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"total_loan_amount": 60000
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({"total_loan_amount":60000});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{BASE_URL}/transaction/{client_customer_id}/{transaction_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above code returns JSON structured like this:
Sample Success Response
{
"output": "Transaction updated successfully",
"message": "success"
}
Use this API to update the details of any transaction of a customer.
HTTP Request - PATCH
PATCH {BASE_URL}/transaction/{client_customer_id}/{transaction_id}
Path Parameters
Parameter | Description |
---|---|
client_customer_id | Customer id of the customer |
transaction_id | Transaction_id of the transaction to update |
Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token given by Credgenics |
Content-Type | application/json |
Response Status Code
Status Code: 400 Bad Request
Sample Response:
{
"message": "transaction not found"
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
200 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Update Payment API
import requests
import json
url = "{BASE_URL}/payments/{transaction_id}?allocation_month={allocation_month}"
payload=json.dumps({
"client_customer_id":"189004",
"amount_recovered": 1000,
"recovery_date": "2022-01-08",
"recovery_method": "Communications",
"recovered_by": "shriram@gmail.com",
"payment_method": "Cheque",
"closure_with": "NOC",
"payment_mode": "cash",
"payment_reference_number": "RFN123456",
"payment_received_date" : "2022-01-12"
})
headers = {
'authenticationtoken': '{auth_token}',
'Content-Type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data = payload)
print(response.text.encode('utf8'))
curl --location --request PATCH '{BASE_URL}/payments/{transaction_id}?allocation_month={allocation_month}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
"client_customer_id": "189004",
"amount_recovered": 1000,
"recovery_date": "2022-01-08",
"recovery_method": "Communications",
"recovered_by": "shriram@gmail.com",
"payment_method": "Cheque",
"closure_with": "NOC",
"payment_mode": "cash",
"payment_reference_number": "RFN123456",
"payment_received_date" : "2022-01-12"
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"client_customer_id":"189004",
"amount_recovered": 1000,
"recovery_date": "2022-01-08",
"recovery_method": "Communications",
"recovered_by": "shriram@gmail.com",
"payment_method": "Cheque",
"closure_with": "NOC",
"payment_mode": "cash",
"payment_reference_number": "RFN123456",
"payment_received_date" : "2022-01-12"
});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{BASE_URL}/payments/{transaction_id}?allocation_month={allocation_month}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above code returns JSON structured like this:
{
"output": "Data updated successfully",
"loan_id": "test",
"message": "success"
}
Use this API to update the payment details of a customer. This API will create a new entry corresponding to transaction_id.
HTTP Requests - PATCH
PATCH {BASE_URL}/payments/{transaction_id}?allocation_month={allocation_month}
Path Parameters
Parameter | Description |
---|---|
transaction_id | Transaction id of the recovered transaction |
allocation_month | Allocation month of the recovered loan. Eg - "2021-2-01" |
Example Json for Recovery Amount Bifurcation
{
"client_customer_id": "189004",
"amount_recovered": 2200,
"date_of_default": "2022-05-07",
"recovery_date": "2022-06-02 09:30:00",
"recovery_method": "Field collection",
"payment_method": "Cash",
"recovered_expected_emi": 2000, //recovery amount bifurcation key
"recovered_late_fee": 100, //recovery amount bifurcation key
"recovered_penalty": 100 //recovery amount bifurcation key
}
Enabling Recovery Amount Bifurcation can be achieved through Company Details tab on Setting page.
Steps:
- Log in to the platform
- Navigate to the Company details tab in settings page
- Select Variable tab in Company details
- Under Recovery Variables, enable Recovered Amount Bifurcation.
After enabling recovery amount bifurcation, you can add the desired bifurcation variables using Add variable option.
Once the variables are added, you need to add recovered_ as a prefix to all bifurcation variables and add them in the payload at the top-level keys.
For example: if you add late_fee as a bifurcation variable, then the payload key format will be recovered_late_fee
Request Headers
Parameter | Description |
---|---|
authenticationtoken | The authentication token assigned to you by Credgenics |
Content-Type | "application/json" |
Request Body Parameters
Key Name | Type | Required | Description |
---|---|---|---|
client_customer_id | string | True | Client customer id of the customer. |
amount_recovered | float | True | Total amount received in a given payment |
recovery_method | string | False | The recovery method that was used to recover a given payment from the borrower (Options: Field Collection, Communication, Legal) |
payment_method | string | False | The method of payment that was used to complete the transfer of money (Options: Online, Cash, Cheque, Bank Account Transfer, Application, Payment Link) |
payment_received_date | date | False | The date on which the payment was actually received in the lenders account after processing of payment by the payment processor |
closure_with | string | False | In cases where the recovery status is 'Closed', it needs to be specified whether the loan was settled or a complete recovery was made (Options: NOC, Settlement) |
payment_reference_number | string | False | The unique reference number generated by the payment processor at the time of execution of payment e.g. UPI transaction ID |
payment_mode | string | False | The mode of payment that was used to complete the transfer of money e.g. UPI, NEFT, RTGS etc. |
recovered_by | string | False | The name of the user that collected the payment, in case of agent it will be the name, otherwise it will be name of the API |
recovery_date | datetime | False | This is the date on which the recovery was made by the agent/channel i.e. it has been updated on CG system that the recovery has been done. This date might differ from the actual date on which the payment was received from the borrower. |
Response Status Code
Status Code: 400 Bad Request
Sample Response:
{
"message": "Please provide correct transaction_id for the provided client_customer_id",
"success": false
}
Status Code: 401 Unauthorized
Sample Response:
{
"message": "Session expired, please login again"
}
Status Code: 404 Not Found
Sample Response:
{
"message": "no Route matched with those values"
}
Status Code: 500 Internal Server Error
Sample Response:
{
"message":"something went wrong"
}
200 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
404 Not Found
if the requested route does not exist.
500 Internal Server Error
if an unexpected issue occurs on the server.
Webhook
A webhook (also called a web callback or HTTP push API) is a way for an application to provide other applications with real-time information. Credgenics webhook delivers data to your applications as soon as an event occurs, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both Credgenics and Clients.
This documentation will detail configuring webhooks, as well as information about events, retry mechanism and response format.
Starting up with Webhook
When a specified event occurs, Credgenics's Webhook will notify a URL of your choice via HTTP POST with information about the event that occured on our platform, so you can take action and keep your business running smoothly.
Webhook Setup
Setting up a Webhook can be achieved through Event Webhook page on Settings Navigation Bar in the portfolio.
Steps are:
- Log in to the platform
- Navigate to Settings tab on the left sidebar, then select Connections then Select Add Webhook.
- Configure the HTTP POST API and select the event on which you want to trigger the Webhook
- Save the details
Webhook Events
Event webhooks can be triggered by several types of events:
Digital Communications
Json response structure
{
"company_id": "794b6c35-647d-454c-964f-a04e12750d21",
"event": "email",
"data": {
"response": [
{
"shoot_id": "6fc1cc3b3a96479c824f964d5ec23224",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:51:02.309319",
"template_name": "##",
"error": null,
"status_code": 200,
"success": true,
"to": "test123@credgenics.com",
"cc": "test321@credgenics.com",
"from": "waterbottle <alerts@page24.net>",
"email_reply_to": "alerts@page24.net",
"email_body": "This is a testing email.<br/>",
"email_subject": "Mail2"
}
],
"allocation_month": "2025-4-01",
"author": "test@credgenics.com"
},
"loan_id": "anu60",
"event_id": "WUZbgpHBKM5Q27yi"
}
- Email : Events Webhook is triggered when any Email is sent to a borrower.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | A system-generated unique identifier assigned to each company upon onboarding onto the CG platform. |
event | String | The medium used to initiate communication with the customer |
event_id | String | The unique identifier associated with the outgoing webhook event |
shoot_id | String | A system-generated unique identifier assigned to each communication that successfully triggered from the CG platform |
transaction_id | String | Applicable to credit line companies where multiple transactions are associated with a single loan. This field captures the specific transaction ID for which the communication is triggered |
error | String | Default value null |
status_code | Integer | Default value 200 |
success | Boolean | Default value true |
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
author | String | Email address of the sender of the email |
triggered_time | String | Time when email was triggered |
from | String | The 'From' email address used to deliver the message |
to | String | The intended recipient's email address |
cc | String | Recipients who will receive a copy of the email |
email_subject | String | The Subject of the email |
email_body | String | Content of the email |
email_reply_to | String | Recipients who will receive replies and/or bounces |
template_name | String | Template selected for the email |
applicant_type | String | Type of the applicant |
Json response structure
{
"company_id": "794b6c35-647d-454c-964f-a04e12750d21",
"event": "sms",
"data": {
"response": [
{
"shoot_id": "fa316eae08b94a2b83d03124ab2dba18",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:10:31.729718",
"template_name": "Testsmsotp12i",
"error": null,
"status_code": 200,
"success": true,
"to": "8888888888",
"sms_body": "Your Credgenics verification code is Test. OTPs are SECRET. DO NOT disclose it to anyone.",
"sms_language": "en",
"client_template_id": "1107161513838675588"
},
{
"shoot_id": "20658e62f2b04adfaa575a72acd8fb21",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:10:31.729956",
"template_name": "Testsmsotp12i",
"error": null,
"status_code": 200,
"success": true,
"to": "9999999999",
"sms_body": "Your Credgenics verification code is Test. OTPsare SECRET. DO NOT disclose it to anyone.",
"sms_language": "en",
"client_template_id": "1107161513838675588"
}
],
"allocation_month": "2025-4-01",
"author": "test@credgenics.com"
},
"loan_id": "anu60",
"event_id": "BnuUthdP88YfDfSj"
}
- SMS : Events Webhook is triggered when any SMS is sent to a borrower.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | A system-generated unique identifier assigned to each company upon onboarding onto the CG platform. |
event | String | The medium used to initiate communication with the customer |
event_id | String | The unique identifier associated with the outgoing webhook event |
shoot_id | String | A system-generated unique identifier assigned to each communication that successfully triggered from the CG platform |
transaction_id | String | Applicable to credit line companies where multiple transactions are associated with a single loan. This field captures the specific transaction ID for which the communication is triggered |
error | String | Default value null |
status_code | Integer | Default value 200 |
success | Boolean | Default value true |
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
author | String | Sender of the sms |
triggered_time | String | Time when sms was triggered |
to | String | Mobile number of receiver |
sms_body | String | Text of the message that will be sent |
sms_language | String | Language of sms selected while triggering sms |
applicant_type | String | Type of the applicant |
client_template_id | String | Template ID of the client |
template_name | String | Name of the selected sms template |
Json response structure
{
"company_id": "794b6c35-647d-454c-964f-a04e12750d21",
"event": "voice",
"data": {
"response": [
{
"shoot_id": "7c392d5bf0914e1aa37dd7ce4f96edb4",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:46:55.487527",
"template_name": "Voice_1",
"error": null,
"status_code": 200,
"success": true,
"to": "9999999999",
"voice_body": "Hi this is a testing template.",
"voice_language": null,
"voice_gender": null
},
{
"shoot_id": "4c5771d32ef04fb7a71b115eb8bb3877",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:46:55.487823",
"template_name": "Voice_1",
"error": null,
"status_code": 200,
"success": true,
"to": "8888888888",
"voice_body": "Hi this is a testing template.",
"voice_language": null,
"voice_gender": null
}
],
"allocation_month": "2025-4-01",
"author": "test@credgenics.com"
},
"loan_id": "anu60",
"event_id": "KX3WNvQ5W4jXyfcK"
}
- Voice Message : Events Webhook is triggered when any Voice Message is sent to a borrower.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | A system-generated unique identifier assigned to each company upon onboarding onto the CG platform. |
event | String | The medium used to initiate communication with the customer |
event_id | String | The unique identifier associated with the outgoing webhook event |
shoot_id | String | A system-generated unique identifier assigned to each communication that successfully triggered from the CG platform |
transaction_id | String | Applicable to credit line companies where multiple transactions are associated with a single loan. This field captures the specific transaction ID for which the communication is triggered |
error | String | Default value null |
status_code | Integer | Default value 200 |
success | Boolean | Default value true |
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
author | String | Sender of the voice message |
triggered_time | String | Time when voice message was triggered |
to | String | Mobile number of receiver |
voice_body | String | Body of the voice message |
voice_language | String | Language selected while triggering the voice message |
voice_gender | String | Gender selected for voice message |
template_name | String | Name of the selected voice message template |
applicant_type | String | Type of the applicant |
Json response structure
{
"company_id": "794b6c35-647d-454c-964f-a04e12750d21",
"event": "whatsapp",
"data": {
"response": [
{
"shoot_id": "edb36906697e4e5d975319d1ab6c24da",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:43:43.139828",
"template_name": "waaaaa",
"error": null,
"status_code": 200,
"success": true,
"to": "9999999999",
"whatsapp_language": "en",
"whatsapp_body": "Hi test",
"client_template_id": "6766151"
},
{
"shoot_id": "c8104edc0eef44cd936995c4022be777",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:43:43.140116",
"template_name": "waaaaa",
"error": null,
"status_code": 200,
"success": true,
"to": "8888888888",
"whatsapp_language": "en",
"whatsapp_body": "Hi test",
"client_template_id": "6766151"
}
],
"allocation_month": "2025-4-01",
"author": "test@credgenics.com"
},
"loan_id": "anu60",
"event_id": "Z89YDbKiKdz7Dhyw"
}
- Whatsapp : Events Webhook is triggered when any Whatsapp communication is sent to a borrower.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | A system-generated unique identifier assigned to each company upon onboarding onto the CG platform. |
event | String | The medium used to initiate communication with the customer |
event_id | String | The unique identifier associated with the outgoing webhook event |
shoot_id | String | A system-generated unique identifier assigned to each communication that successfully triggered from the CG platform |
transaction_id | String | Applicable to credit line companies where multiple transactions are associated with a single loan. This field captures the specific transaction ID for which the communication is triggered |
error | String | Default value null |
status_code | Integer | Default value 200 |
success | Boolean | Default value true |
loan_id | String | Loan ID of the loan |
allocation_month | String | Month in which the loan was allocated |
author | String | Sender of the WhatsApp communication |
triggered_time | String | Time when WhatsApp communication was triggered |
to | String | Mobile number of receiver |
whatsapp_body | String | Body of the WhatsApp communication |
template_name | String | Name of the selected WhatsApp communication template |
applicant_type | String | Type of the applicant |
client_template_id | Integer | Template ID of the client |
{
"company_id": "794b6c35-647d-454c-964f-a04e12750d21",
"event": "dtmf_ivr",
"data": {
"response": [
{
"shoot_id": "cf226c0604e9445daecb99b536b20bad",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:13:09.528449",
"template_name": "dtmfheli",
"error": null,
"status_code": 200,
"success": true,
"to": "9999999999"
},
{
"shoot_id": "77eec86fd0bf42f7a70db8025191bb63",
"applicant_type": "applicant",
"transaction_id": null,
"triggered_time": "2025-04-04 15:13:09.534404",
"template_name": "dtmfheli",
"error": null,
"status_code": 200,
"success": true,
"to": "8888888888"
}
],
"allocation_month": "2025-4-01",
"author": "test@credgenics.com"
},
"loan_id": "anu60",
"event_id": "Z5GHjW8CW2AeRwSm"
}
- DTMF IVR : Events Webhook is triggered when any DTMF IVR communication is sent to a borrower.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | A system-generated unique identifier assigned to each company upon onboarding onto the CG platform. |
event | String | The medium used to initiate communication with the customer |
event_id | String | The unique identifier associated with the outgoing webhook event |
shoot_id | String | A system-generated unique identifier assigned to each communication that successfully triggered from the CG platform |
transaction_id | String | Applicable to credit line companies where multiple transactions are associated with a single loan. This field captures the specific transaction ID for which the communication is triggered |
error | String | Default value null |
status_code | Integer | Default value 200 |
success | Boolean | Default value true |
loan_id | String | Loan ID of the loan |
allocation_month | String | Month in which the loan was allocated |
author | String | Sender of the WhatsApp communication |
triggered_time | String | Time when WhatsApp communication was triggered |
to | String | Mobile number of receiver |
whatsapp_body | String | Body of the WhatsApp communication |
template_name | String | Name of the selected WhatsApp communication template |
applicant_type | String | Type of the applicant |
client_template_id | Integer | Template ID of the client |
Calling
Json response structure
{
"loan_id": "1070",
"event": "calling",
"data": {
"Campaign Name": "CN800",
"Campaign ID": "f545eaac-d296-4831-9002-055e90f2ded1",
"Loan ID": "1070",
"DPD Bucket": null,
"Allocation Month": "2023-5-01",
"call type": "manual",
"Agent Name": "prk38",
"Agent Email ID": "Agent@gmail.com",
"DID Number": "65752148",
"Shoot ID": "fe2cebdb-422b-4c25-aedd-62bd284e21fe",
"Call Start Time": "2023-05-15 17:43:08",
"Customer Leg Ringing Start Time": "2023-05-15 17:43:09",
"Customer Leg Ringing End Time": "2023-05-15 17:43:17",
"Agent Leg Ringing Start Time": "2023-05-15 17:43:09",
"Agent Leg Ringing End Time": "2023-05-15 17:43:09",
"Total Ringing Time Duration": "00:00:08",
"Customer Call Pickup Time": "2023-05-15 17:43:17",
"Agent Call Pickup Time": "2023-05-15 17:43:09",
"Call End Time": "2023-05-15 17:43:21",
"Total Talk Time Duration": "00:00:03",
"Total Call Duration": "00:00:13",
"Customer Wait Duration": "00:00:03",
"Wrapup Start Time": "2023-05-15 17:43:21",
"Wrapup End Time": "2023-05-15 17:43:25",
"Wrapup Duration": "00:00:04",
"Call Disconnected By": "customer",
"Call Disconnection Stage": "After Customer Picked",
"Call Status": "Answered",
"Disposition": "Confirmation Pending",
"Sub Disposition 1": "",
"Sub Disposition 2": "",
"Dialer Disposition": "Normal Clearing",
"Call Transfer From": null,
"Call Transfer To": null,
"Call Transfer Type": null,
"Call Response": "",
"Reminder Date": null,
"Committed Amount": 0,
"Role": "calling",
"recording_link": "https://app.credgenics.com/dialer/recording?id=fe2cebdb-422b-4c25-aedd-62bd284e21fe"
},
"event_id": "PfsySX37tyLeYrGU"
}
- Calling : Events Webhook is triggered when any Calling is done to a borrower.
KEYS | TYPE | DESCRIPTION |
---|---|---|
Loan ID | String | Loan ID to which the contacted number was associated to |
Campaign Name | String | Name of the campaign in which the call was made. |
Campaign ID | String | Unique ID of the campaign in which the call was made. |
DPD Bucket | String | Allocated DPD bucket of the loan to which the call was made. |
Allocation Month | String | Allocation month of the loan in which call was made. |
Product Type | String | The type of product for which the customer has taken a loan |
call type | String | Type of call includes the following call types: 1. autodialer 2. autodialer_dialpad 3. autodialer_dialpad_redial 4. autodialer_manual 5. autodialer_manual_redial 6. autodialer_redial 7. autodialer_tpd 8. click_to_call 9. gsm 10. manual 11. predictive 12. predictive_manual 13. reminder |
Agent Name | String | Name of the agent that attended the call. |
Agent Email ID | String | Email of the agent that attended the call. |
Agent User Id | String | User ID of the agent that attended the call. |
DID Number | String | DID number through which the call was dialed to the customer. |
Customer Contact Number | String | The phone number to which the call is initiated. |
Contact Type | String | The type of contact we are reaching out to |
Borrower Type | String | The type of Borrower we are reaching out to |
Shoot ID | String | Unique ID for the call. |
Call Start Time | String | Date/time at which call was placed/received YYYY-MM-DD HH:MM:SS |
Customer Leg Ringing Start Time | String | Time at which customer ringing started YYYY-MM-DD HH:MM:SS |
Customer Leg Ringing End Time | String | Time at which customer ringing ended YYYY-MM-DD HH:MM:SS |
Agent Leg Ringing Start Time | String | Time at which agent ringing started YYYY-MM-DD HH:MM:SS |
Agent Leg Ringing End Time | String | Time at which agent ringing ended YYYY-MM-DD HH:MM:SS |
Total Ringing Time Duration | Time | Total time for which the call rang before the customer picked up the call HH:MM:SS |
Customer Call Pickup Time | Datetime | The time at which the customer picked up the call YYYY-MM-DD HH:MM:SS |
Agent Call Pickup Time | Datetime | The time at which the Agent picked up the call YYYY-MM-DD HH:MM:SS |
Call End Time | String | Time at which customer/agent cut the call or ring timeout happened YYYY-MM-DD HH:MM:SS |
Total Talk Time Duration | String | Total time for which the customer and the agent were connected over call HH:MM:SS |
Total Call Duration | String | Customer leg ring start time - Call end time HH:MM:SS |
Customer Wait Duration | String | Customer leg ring end time - Agent leg ring end time HH:MM:SS |
Total Hold Time Duration | Time | Total time for which the call is on Hold. HH:MM:SS |
Wrapup Start Time | String | Call end time YYYY-MM-DD HH:MM:SS |
Wrapup End Time | String | Timestamp at which the disposition was submitted YYYY-MM-DD HH:MM:SS |
Wrapup Duration | String | Wrapup Start Time - Wrapup End Time HH:MM:SS |
Call Disconnected By | String | Reason due to which the call was disconnected: 1. agent 2. agent_refresh 3. conference 4. customer 5. network 6. send_cancel 7. system |
Call Disconnection Stage | String | Call stage when the call was disconnected. It contains the following values: 1. Before customer picked the call 2. After customer picked the call 3. After agent picked the call |
Call Status | String | Call status defines what happened with that call. It contains the following values: 1. Failed Calls - Calls where the customer side ring did not happen, number was switched off or invalid number, etc. 2. Connected Calls - Calls where customer side ring happened 3. Answered Calls - When a customer pick up the call and it is redirected back to the agent, if the agent also picks the call and both parties are connected then it is an answered call. 4. Missed Calls - When a customer is already online and they disconnect the call before the agent picks it up, then it is missed call. 5. Abandoned Calls - If Customer is already on line and no agent is available to take the call and the customer disconnects, then it is an abandoned call. |
Disposition | String | Disposition submitted by the agent user. |
Sub Disposition 1 | String | Sub Disposition 1 if any submitted by the agent user. |
Sub Disposition 2 | String | Sub Disposition 2 if any submitted by the agent user. |
Dialer Disposition | String | Dialer disposition is received from telco that tells the further bifurcation after the call status. Values and explanations can be accessed at the link attached. https://developer.signalwire.com/freeswitch/FreeSWITCH-Explained/Troubleshooting-Debugging/Hangup-Cause-Code-Table_3964945/ |
Call Transfer From | String | If Call transfer was triggered, then the user from which the call was transferred. |
Call Transfer To | String | If Call transfer was triggered, then the user to which call was transferred. |
Call Transfer Type | String | Call transfer type includes transfer or conference option selected while transferring the call. |
Call Response | String | Call response submitted by the agent in the disposition form. |
Reminder Date | String | Reminder timestamp submitted by the agent in the disposition form. YYYY-MM-DD HH:MM:SS |
Committed Amount | Integer | The committed amount submitted by the agent in the disposition form. |
Role | String | Role of the agent who took the call. |
recording_link | String | CG link to access the call recording. |
Payments
Json response structure for payments
{
"event": "payment",
"data": {
"loan_id": "2954",
"amount_recovered": 2000,
"recovery_status": "Partially Recovered",
"source": "manual",
"recovery_method": "Field collection",
"payment_method": "Online",
"payment_mode": "Paytm",
"reference_number": "RIO2390",
"closure_with": "",
"recovery_date": "2021-09-12 00:59:51",
"allocation_month": "2021-6-01",
"author": "demo.admin@credgenics.com"
},
"created": "2021-05-15 18:44:15"
}
Payment event webhook is triggered when any amount gets recovered against a loan.
KEYS | TYPE | DESCRIPTION |
---|---|---|
loan_id | string | Loan ID of the loan |
amount_recovered | integer | Amount recovered from the customer. |
recovery_status | string | The recovery status is calculated automatically on the basis of ‘total_claim_amount’ and ‘total_recovered_amount’. It can have 3 values, which can be either 'Not Recovered', 'Partially Recovered' or 'Fully Recovered'. |
recovery_method | string | Recovery method of the loan. |
source | string | Used to identify which all sources the payment came from i.e. 'api' , 'manual' or 'excel'. |
payment_method | string | Method by which the payment has been made. |
payment_mode | string | Mode of payment used. |
closure_with | string | Choice of closure - NOC, Settlement |
recovery_date | date | Date of recovery |
allocation_month | date | Month in which loan was uploaded Eg : "2021-7-01" |
reference_number | string | Reference number of the payment |
author | string | Email of the Author of the payment |
Json response structure for Loan Allocation and Deallocation
{
"data": {
"company_id": "ad8b5a88-637f-49a3-b8af-f341dd9db5fd",
"company_name": "Analog Fintech",
"event_name": "allocation",
"loan_id": "MH3061TW0035625",
"source": "portfolio",
"timestamp": "2024-05-24 16:43:50",
"user_email": "aa001_007@yopmail.com",
"user_mobile": null,
"user_name": "Aa001",
"user_profession": "other",
"user_role": "national head",
"user_team": null,
"workflow_id": ""
},
"event": "allocation",
"event_id": "6PMcW97u9YVLyS3K"
}
Allocation/Deallocation event webhook is triggered when the loan gets allocated or deallocated.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | Unique id for company on CG platform |
company_name | String | Name of the company on CG platform |
event_name | String | Name of the event i.e. allocation or deallocation |
loan_id | String | Loan id of the loan |
source | String | Source of the event |
timestamp | String | Timestamp at which the event happened |
user_email | String | Email id of the user |
user_mobile | String | Mobile no of the user |
user_name | String | Name of the user |
user_profession | String | Profession of the user |
user_role | String | Role of the user |
user_team | String | Team of the user |
workflow_id | String | Workflow id is generated when allocation or deallocation happens through workflow |
FOS
Json response structure for collections
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_collection",
"data": {
"loan_id": "ek67",
"allocation_month": "2025-4-01",
"visit_id": "6WivcxFQICRb",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"user_employee_id": "213",
"visit_date": "2025-04-28 15:38:11",
"visit_purpose": "Surprise Visit",
"is_visit_done": true,
"is_customer_met": true,
"is_recovery_done": true,
"agent_marked_status": "Closed by Agent",
"sub_disposition_1": "Testing Subdisposition",
"sub_disposition_2": "Test 3",
"visit_coordinates": {
"latitude": 28.5769136,
"longitude": 77.3171069
},
"borrower_address": "Bl*********************da, Me***********on, Uttar Pradesh, 201301",
"comment": "Comment",
"source_app": "CG_Collect",
"form_input_field": {
"Test2": "Test",
"Test3": "Test",
"test": "56789"
},
"address_type": "Residence",
"committed_amount": 5000,
"next_step": "Visit",
"reminder_date": "2025-05-27 10:00:00",
"amount_recovered": 4000,
"payment_method": "Cash",
"payment_reference_number": "fos_FyKhK1JOEGHW_1745834891",
"payment_proof_url": "https://app.credgenics.com/app/document-upload?company_id=8b137682-51e7-4c8e-97f4-a55801c00a2e&company_type=loan&loan_id=ek67&module=fos&document_id_search=680f538a8dee9877f3a25f5d",
"amount_bifurcation": {
"recovered_late_fee": 0,
"recovered_settlement_amount": 0,
"recovered_expected_emi": 0,
"recovered_total_claim_amount": 4000,
"recovered_advance_payment": 0
},
"is_manual": true,
"payment_details": {
"pan_card_number": "LXYMK5446E",
"pan_number_available": "yes"
}
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:38:11",
"event_id": "RrELd4ISiU7PhOe7"
}
- Cash Collection fos collection events webhook is triggered when cash collection is done by a field agent
KEY | TYPE | DESCRIPTION |
---|---|---|
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
visit_id | String | Unique id of the visit |
agent_email | String | Email id of the agent |
agent_name | String | Name of the agent |
agent_mobile | String | Contact number of the agent |
user_employee_id | String | User Employee ID of the agent |
visit_date | String | Date of visit |
visit_purpose | String | Purpose of the visit (Surprise or Promise to Pay) |
is_visit_done | Boolean | True if visit was completed. Else, false. |
is_customer_met | Boolean | True if customer was met. Else, false. |
is_recovery_done | Boolean | True if recovery was done. Else, false. |
agent_marked_status | String | Status of loan marked by agent |
sub_disposition_1 | String | First sub-disposition of the loan marked by the agent |
sub_disposition_2 | String | Second sub-disposition of the loan marked by the agent |
visit_coordinates | Object | Coordinates of the visit location |
borrower_address | String | Address of the borrower |
comment | String | Comment added by the agent |
source_app | String | Source application for the Web-hook event ("CG_Collect") |
form_input_field | Object | Dynamic form inputs configured for Collection. |
address_type | String | Address type of the borrower |
committed_amount | Float | Amount the customer committed to pay in a follow-up |
reminder_date | String | The scheduled date and time for the follow-up reminder |
next_step | String | The action or plan decided for the follow-up (visit/call) |
amount_recovered | Float | Amount recovered during the visit |
payment_method | String | Mode of payment used for collection |
payment_reference_number | String | Unique id of the payment |
payment_proof_url | String | URL of the payment proof |
amount_bifurcation | Object | Bifurcation of the amount recovered |
is_manual | Boolean | Flag indicating whether the bifurcation was done manually |
payment_details | Object | Extra details of the payment |
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_collection",
"data": {
"loan_id": "ek67",
"allocation_month": "2025-4-01",
"visit_id": "gFee1wLsBGJN",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"user_employee_id": "213",
"visit_date": "2025-04-28 15:36:54",
"visit_purpose": "Surprise Visit",
"is_visit_done": true,
"is_customer_met": true,
"is_recovery_done": true,
"agent_marked_status": "Closed by Agent",
"sub_disposition_1": "Testing Subdisposition",
"sub_disposition_2": "Test 3",
"visit_coordinates": {
"latitude": 28.576903,
"longitude": 77.3171151
},
"borrower_address": "Bl*********************da, Me***********on, Uttar Pradesh, 201301",
"comment": "Comment",
"source_app": "CG_Collect",
"form_input_field": {
"Test3": "Test",
"test": "123456",
"Test2": "Test"
},
"address_type": "Residence",
"committed_amount": 5000,
"next_step": "Visit",
"reminder_date": "2025-05-27 10:00:00",
"amount_recovered": 500,
"payment_method": "Cheque",
"payment_reference_number": "fos_gUsMQjGR3EMq_1745834814",
"payment_proof_url": "https://app.credgenics.com/app/document-upload?company_id=8b137682-51e7-4c8e-97f4-a55801c00a2e&company_type=loan&loan_id=ek67&module=fos&document_id_search=680f533de0f94c0ebe238b54",
"amount_bifurcation": {
"recovered_late_fee": 0,
"recovered_settlement_amount": 0,
"recovered_expected_emi": 0,
"recovered_total_claim_amount": 500,
"recovered_advance_payment": 0
},
"is_manual": true,
"payment_details": {
"cheque_number": "123456789",
"cheque_date": "2025-04-29",
"account_number": "9000900900",
"ifsc_code": "BARB0STAKOT",
"bank_name": "Bank of Baroda",
"branch_name": "STATION ROAD,KOTA,RAJASTHAN",
"cheque_holder_name": "Aditya",
"relation_with_applicant": "Brother"
}
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:36:54",
"event_id": "23v1CUgZwtx4Ozhe"
}
- Cheque Collection fos collection events webhook is triggered when cheque collection is done by a field agent
KEY | TYPE | DESCRIPTION |
---|---|---|
loan_id | String | Loan ID of the loan |
allocation_month | String | Month in which loan was allocated |
visit_id | String | Unique ID of the visit |
agent_email | String | Email ID of the agent |
agent_name | String | Name of the agent |
agent_mobile | String | Contact number of the agent |
user_employee_id | String | User Employee ID of the agent |
visit_date | String | Date of visit |
visit_purpose | String | Purpose of the visit (Surprise or Promise to Pay) |
is_visit_done | Boolean | True if visit was completed, else false |
is_customer_met | Boolean | True if customer was met, else false |
is_recovery_done | Boolean | True if recovery was done, else false |
agent_marked_status | String | Status of loan marked by agent |
sub_disposition_1 | String | First sub-disposition of the loan marked by the agent |
sub_disposition_2 | String | Second sub-disposition of the loan marked by the agent |
visit_coordinates | Object | Coordinates of the visit location |
borrower_address | String | Address of the borrower |
comment | String | Comment added by the agent |
source_app | String | Source application for the Web-hook event ("CG_Collect") |
form_input_field | Object | Dynamic form inputs configured for collection |
address_type | String | Address type of the borrower |
committed_amount | Float | Amount the customer committed to pay in a follow-up |
reminder_date | String | The scheduled date and time for the follow-up reminder |
next_step | String | The action or plan decided for the follow-up (visit/call) |
amount_recovered | Float | Amount recovered during the visit |
payment_method | String | Mode of payment used for collection(Cheque) |
payment_reference_number | String | Unique ID of the payment |
payment_proof_url | String | URL of the payment proof |
amount_bifurcation | Object | Bifurcation of the amount recovered |
is_manual | Boolean | Flag indicating whether the bifurcation was done manually |
payment_details | Object | Extra details of the payment |
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_collection",
"data": {
"loan_id": "ek67",
"allocation_month": "2025-4-01",
"visit_id": "VAA1BQDiDPHm",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"user_employee_id": "213",
"visit_date": "2025-04-28 15:39:29",
"visit_purpose": "Surprise Visit",
"is_visit_done": true,
"is_customer_met": true,
"is_recovery_done": true,
"agent_marked_status": "Closed by Agent",
"sub_disposition_1": "Testing Subdisposition",
"sub_disposition_2": "Test 3",
"visit_coordinates": {
"latitude": 28.5769356,
"longitude": 77.3170875
},
"borrower_address": "Bl*********************da, Me***********on, Uttar Pradesh, 201301",
"comment": "Comment",
"source_app": "CG_Collect",
"form_input_field": {
"Test2": "Test",
"Test3": "Test ",
"test": "456789"
},
"address_type": "Residence",
"committed_amount": 5000,
"next_step": "Visit",
"reminder_date": "2025-05-27 10:00:00",
"amount_recovered": 900,
"payment_method": "Online",
"payment_reference_number": "fos_8V4hAEqBFC3X_1745834969",
"payment_proof_url": "https://app.credgenics.com/app/document-upload?company_id=8b137682-51e7-4c8e-97f4-a55801c00a2e&company_type=loan&loan_id=ek67&module=fos&document_id_search=680f53d8597e1dda76532690",
"amount_bifurcation": {
"recovered_late_fee": 0,
"recovered_settlement_amount": 0,
"recovered_expected_emi": 0,
"recovered_total_claim_amount": 900,
"recovered_advance_payment": 0
},
"is_manual": true,
"payment_details": {
"utr_number": "123456789",
"mode": "other_modes",
"payment_date": "2025-04-28"
}
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:39:29",
"event_id": "v3MdOOjRNLrdPajc"
}
- Online Collection fos collection events webhook is triggered when online collection is done by a field agent
KEY | TYPE | DESCRIPTION |
---|---|---|
loan_id | String | Loan ID of the loan |
allocation_month | String | Month in which loan was allocated |
visit_id | String | Unique ID of the visit |
agent_email | String | Email ID of the agent |
agent_name | String | Name of the agent |
agent_mobile | String | Contact number of the agent |
user_employee_id | String | User Employee ID of the agent |
visit_date | String | Date of visit |
visit_purpose | String | Purpose of the visit (Surprise or Promise to Pay) |
is_visit_done | Boolean | True if visit was completed, else false |
is_customer_met | Boolean | True if customer was met, else false |
is_recovery_done | Boolean | True if recovery was done, else false |
agent_marked_status | String | Status of loan marked by agent |
sub_disposition_1 | String | First sub-disposition of the loan marked by the agent |
sub_disposition_2 | String | Second sub-disposition of the loan marked by the agent |
visit_coordinates | Object | Coordinates of the visit location |
borrower_address | String | Address of the borrower |
comment | String | Comment added by the agent |
source_app | String | Source application for the Web-hook event ("CG_Collect") |
form_input_field | Object | Dynamic form inputs configured for collection |
address_type | String | Address type of the borrower |
committed_amount | Float | Amount the customer committed to pay in a follow-up |
reminder_date | String | The scheduled date and time for the follow-up reminder |
next_step | String | The action or plan decided for the follow-up (visit/call) |
amount_recovered | Float | Amount recovered during the visit |
payment_method | String | Mode of payment used for collection(Online) |
payment_reference_number | String | Unique ID of the payment |
payment_proof_url | String | URL of the payment proof |
amount_bifurcation | Object | Bifurcation of the amount recovered |
is_manual | Boolean | Flag indicating whether the bifurcation was done manually |
payment_details | Object | Extra details of the payment |
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_collection_no_recovery",
"data": {
"loan_id": "ek67",
"allocation_month": "2025-4-01",
"visit_id": "gFhuXboAmpZU",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"user_employee_id": "213",
"visit_date": "2025-04-28 15:34:50",
"visit_purpose": "Surprise Visit",
"is_visit_done": true,
"is_customer_met": false,
"is_recovery_done": false,
"agent_marked_status": "abc",
"sub_disposition_1": "Sub 2",
"sub_disposition_2": "sub2-2",
"visit_coordinates": {
"latitude": 28.5769087,
"longitude": 77.3170894
},
"borrower_address": "Bl*********************da, Me***********on, Uttar Pradesh, 201301",
"comment": "Comment",
"source_app": "CG_Collect",
"form_input_field": {
"test": "1234",
"Test3": "Test3",
"Test2": "Test2"
},
"address_type": "Residence",
"committed_amount": 5000,
"next_step": "Visit",
"reminder_date": "2025-05-27 10:00:00"
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:34:50",
"event_id": "8jvm0unWZgrqYe3U"
}
- FOS Collection No Recovery fos collection events webhook is triggered when no recovery is done
KEY | TYPE | DESCRIPTION |
---|---|---|
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
visit_id | String | Unique id of the visit |
agent_email | String | Email id of the agent |
agent_name | String | Name of the agent |
agent_mobile | String | Contact number of the agent |
user_employee_id | String | User Employee ID of the agent |
visit_date | String | Date of visit |
visit_purpose | String | Purpose of the visit (Surprise or Promise to Pay) |
is_visit_done | Boolean | True if visit was completed. Else, false. |
is_customer_met | Boolean | True if customer was met. Else, false. |
is_recovery_done | Boolean | True if recovery was done. Else, false. |
agent_marked_status | String | Status of loan marked by agent |
sub_disposition_1 | String | First sub-disposition of the loan marked by the agent |
sub_disposition_2 | String | Second sub-disposition of the loan marked by the agent |
visit_coordinates | Object | Coordinates of the visit location |
borrower_address | String | Address of the borrower |
comment | String | Comment added by the agent |
source_app | String | Source application for the Web-hook event ("CG_Collect") |
form_input_field | Object | Dynamic form inputs configured for Collection. |
address_type | String | Address type of the borrower |
committed_amount | Float | Amount the customer committed to pay in a follow-up |
reminder_date | String | The scheduled date and time for the follow-up reminder |
next_step | String | The action or plan decided for the follow-up (visit/call) |
Json response structure for FOS deposits where Branch Type is 'bank'
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_deposit",
"data": {
"deposit_id": "gfmBtvVhkCKF",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"total_amount": 4000,
"deposit_method": "cash",
"recovery_method": "cash",
"user_employee_id": "213",
"branch_type": "bank",
"branch_details": {
"bank_code": "001",
"bank_name": "Anmol Bank",
"ifsc_code": "12736265352",
"branch_name": "Noida",
"account_name": "Anmol Pradha",
"account_type": "Saving",
"account_number": "38276323234"
},
"deposit_receipt_no": "MyDep123",
"deposit_proof_url": "https://credgenics-cases.s3.ap-south-1.amazonaws.com/fos_deposit_proofs/Gn2DBn7dS3rz.jpeg",
"loan_data": [
{
"loan_id": "ek67",
"amount": 4000,
"visit_id": "6WivcxFQICRb",
"payment_reference_number": "fos_FyKhK1JOEGHW_1745834891",
"amount_bifurcation": {
"recovered_late_fee": 0,
"recovered_expected_emi": 0,
"recovered_advance_payment": 0,
"recovered_settlement_amount": 0,
"recovered_total_claim_amount": 4000
},
"payment_details": {
"pan_card_number": "LXYMK5446E",
"pan_number_available": "yes"
}
}
],
"branch_manager_details": {}
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:40:29",
"event_id": "Pn9nDYqgn7cj9jnh"
}
Json response structure for FOS deposits where Branch Type is 'company'
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_deposit",
"data": {
"deposit_id": "pt1VPxQA76rd",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"total_amount": 3000,
"deposit_method": "cash",
"recovery_method": "cash",
"user_employee_id": "213",
"branch_type": "company",
"branch_details": {
"branch_code": "009",
"branch_name": "Noida",
"branch_address": "Sector 16",
"branch_contact_number": "9876543210",
"branch_manager_id": "P5gBhE3Z"
},
"deposit_receipt_no": "MyDep567",
"deposit_proof_url": "https://credgenics-cases.s3.ap-south-1.amazonaws.com/fos_deposit_proofs/NDXDjEqSMfEr.jpeg",
"loan_data": [
{
"loan_id": "November003",
"amount": 3000,
"visit_id": "xBI1jgjZYGnn",
"payment_reference_number": "fos_m9XZLN4oAdxd_1745834574",
"amount_bifurcation": {
"recovered_late_fee": 3000,
"recovered_advance_payment": 0
},
"payment_details": {
"pan_card_number": "LXYPK5664E",
"pan_number_available": "yes"
}
}
],
"branch_manager_details": {
"branch_code": "009",
"client_employee_id": "",
"name": "ekanki",
"email": "ekanki.jain@credgenics.com",
"mobile": "9896883977",
"department": ""
}
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:55:55",
"event_id": "iVoxOH9nyx3ckuHi"
}
Json response structure for FOS deposits where Branch Type is 'Airtel'
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_deposit",
"data": {
"deposit_id": "koC66Bc0X80T",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"total_amount": 200,
"deposit_method": "cash",
"recovery_method": "cash",
"user_employee_id": "213",
"branch_type": "airtel",
"branch_details": {},
"deposit_receipt_no": "MyDep12356",
"deposit_proof_url": "",
"loan_data": [
{
"loan_id": "ek67",
"amount": 200,
"visit_id": "A3608NnloE69",
"payment_reference_number": "fos_bhGjeS7yK9pC_1744910529",
"amount_bifurcation": {
"recovered_total_claim_amount": 200
},
"payment_details": null
}
],
"branch_manager_details": {},
"reference_deposit_number": "LAIA1745836027"
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:57:07",
"event_id": "77jedcLjsDDmuUOt"
}
Json response structure for FOS deposits where Branch Type is 'I-sure'
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_deposit",
"data": {
"deposit_id": "d0d7nn8okGYw",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"agent_mobile": "8898989898",
"total_amount": 300,
"deposit_method": "cash",
"recovery_method": "cash",
"user_employee_id": "213",
"branch_type": "I-sure",
"branch_details": {},
"deposit_receipt_no": "MyDep56789",
"deposit_proof_url": "",
"loan_data": [
{
"loan_id": "November003",
"amount": 300,
"visit_id": "xSoa8UDeyBZe",
"payment_reference_number": "fos_zgXtAO0Lr160_1744910479",
"amount_bifurcation": {
"recovered_total_claim_amount": 300
},
"payment_details": null
}
],
"branch_manager_details": {},
"reference_deposit_number": "SWDF1745836089"
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:58:09",
"event_id": "O8T5P84Ly1mtlMXq"
}
- Deposit events webhook is triggered when any Deposit is made by a field agent
KEY | TYPE | DESCRIPTION |
---|---|---|
deposit_id | String | Unique id of the deposit |
agent_email | String | Email id of the agent |
agent_name | String | Name of the agent |
agent_mobile | String | Contact number of the agent |
total_amount | Float | Amount deposited by agent |
deposit_method | String | Method used for deposit (e.g., Cash, Cheque, Online) |
recovery_method | String | Method used for recovering the deposit (e.g., Cash, Cheque, Online) |
user_employee_id | String | User Employee ID of the agent |
branch_type | String | Type of branch where deposit was made (e.g., airtel, company, bank) |
branch_details | Object | Details of branch in which deposit was made |
deposit_receipt_no | String | Unique id of the deposit receipt |
deposit_proof_url | String | Link to deposit proof |
loan_data | Object | Details of loans on which deposit was made |
branch_manager_details | Object | Details of the branch manager (if applicable) |
Json response structure for FOS Deposit Verification
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_deposit_verification",
"data": {
"deposit_id": "pt1VPxQA76rd",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"user_employee_id": "213",
"total_amount": 3000,
"deposit_method": "cash",
"recovery_method": "cash",
"branch_type": "company",
"branch_details": {
"branch_code": "009",
"branch_name": "Noida",
"branch_address": "Sector 16",
"branch_manager_id": "P5gBhE3Z",
"branch_contact_number": "9876543210"
},
"deposit_receipt_no": "MyDep567",
"deposit_proof_url": "https://credgenics-cases.s3.ap-south-1.amazonaws.com/fos_deposit_proofs/NDXDjEqSMfEr.jpeg",
"loan_data": [
{
"loan_id": "November003",
"allocation_month": "2025-4-01",
"amount_recovered": 3000,
"payment_method": "Cash",
"payment_reference_number": "fos_m9XZLN4oAdxd_1745834574",
"visit_id": "xBI1jgjZYGnn",
"recovery_date": "2025-04-28 15:32:54",
"agent_marked_status": "Partially Recovered by Agent",
"amount_bifurcation": {
"recovered_late_fee": 3000,
"recovered_advance_payment": 0
},
"payment_details": {
"pan_card_number": "LXYPK5664E",
"pan_number_available": "yes"
}
}
],
"verification_remark": "Approved",
"verification_status": "approved",
"verified_by": "emp123"
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:59:17",
"event_id": "lf9yzSpbFsBszsrn"
}
- Deposit Verification (cash/cheque recoveries) events webhook is triggered when Deposit verificiation is done
KEY | TYPE | DESCRIPTION |
---|---|---|
deposit_id | String | Unique id of the deposit |
agent_email | String | Email id of the agent |
agent_name | String | Name of the agent |
user_employee_id | String | User Employee ID of the agent |
total_amount | Float | Amount deposited by agent |
deposit_method | String | Method used for deposit (e.g., Cash, Cheque, Online) |
recovery_method | String | Method used for recovering the deposit (e.g., Cash, Cheque, Online) |
branch_type | String | Type of branch where deposit was made (e.g., airtel, company, bank) |
branch_details | Object | Details of branch in which deposit was made |
deposit_receipt_no | String | Unique id of the deposit receipt |
deposit_proof_url | String | Link to deposit proof |
loan_data | Object | Details of loans on which deposit was made |
verification_remark | String | Remarks added for verification |
verification_status | String | Status of Verification (approved, rejected) |
verified_by | String | User id of the verifier |
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_deposit_verification_visit_level",
"data": {
"deposit_id": "pt1VPxQA76rd",
"agent_email": "agent006@yopmail.com",
"agent_name": "Agent006",
"user_employee_id": "213",
"total_amount": 3000,
"deposit_method": "cash",
"recovery_method": "cash",
"branch_type": "company",
"branch_details": {
"branch_code": "009",
"branch_name": "Noida",
"branch_address": "Sector 16",
"branch_manager_id": "P5gBhE3Z",
"branch_contact_number": "9876543210"
},
"deposit_receipt_no": "MyDep567",
"deposit_proof_url": "https://credgenics-cases.s3.ap-south-1.amazonaws.com/fos_deposit_proofs/NDXDjEqSMfEr.jpeg",
"verification_remark": "Approved",
"verification_status": "approved",
"verified_by": "emp123",
"loan_id": "November003",
"allocation_month": "2025-4-01",
"amount_recovered": 3000,
"payment_method": "Cash",
"payment_reference_number": "fos_m9XZLN4oAdxd_1745834574",
"visit_id": "xBI1jgjZYGnn",
"recovery_date": "2025-04-28 15:32:54",
"agent_marked_status": "Partially Recovered by Agent",
"amount_bifurcation": {
"recovered_late_fee": 3000,
"recovered_advance_payment": 0
},
"payment_details": {
"pan_card_number": "LXYPK5664E",
"pan_number_available": "yes"
},
"applicant_mobile_number": "",
"reference_deposit_number": ""
},
"company_trademark": "fos test 4",
"created": "2025-04-28 15:59:17",
"event_id": "CagBzlUdhJNI5pIw"
}
- Deposit Verifications (Cash/Cheque Recoveries) - Visit Level events webhook is triggered when Deposit verificiation at visit level is done
KEY | TYPE | DESCRIPTION |
---|---|---|
deposit_id | String | Unique id of the deposit |
agent_email | String | Email id of the agent |
agent_name | String | Name of the agent |
user_employee_id | String | User Employee ID of the agent |
total_amount | Float | Amount deposited by agent |
deposit_method | String | Method used for deposit (e.g., Cash, Cheque, Online ) |
recovery_method | String | Method used for recovering the deposit (e.g., Cash, Cheque, Online ) |
branch_type | String | Type of branch where deposit was made (e.g., airtel, company, bank) |
branch_details | Object | Details of branch in which deposit was made |
deposit_receipt_no | String | Unique id of the deposit receipt |
deposit_proof_url | String | Link to deposit proof |
verification_remark | String | Remarks added for verification |
verification_status | String | Status of Verification (approved, rejected) |
verified_by | String | User id of the verifier |
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
amount_recovered | Float | Amount recovered during the visit |
payment_method | String | Mode of payment used for collection |
payment_reference_number | String | Unique id of the payment |
visit_id | String | Unique id of the visit |
recovery_date | String | Date when the amount was recovered. |
agent_marked_status | String | Status of loan marked by agent |
amount_bifurcation | Object | Bifurcation of the amount recovered |
payment_details | Object | Extra details of the payment |
applicant_mobile_number | String | Contact number of the applicant |
reference_deposit_number | String | Unique id of the deposit |
Json response structure for FOS Online Deposit Verification
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_online_deposit_verification",
"data": {
"agent_name": "agent006",
"loan_id": "Jan2025015",
"visit_id": "lXiGMmejEHCM",
"amount_recovered": 900,
"allocation_month": "2025-4-01",
"verification_status": "approved",
"verification_remark": "approve",
"payment_reference_number": "fos_tHxPOAc5GVoI_1746032103",
"payment_date": "2025-04-30",
"recovery_date": "2025-04-30 22:25:03",
"utr_number": "646481",
"amount_bifurcation": {
"recovered_expected_emi": 600,
"recovered_advance_payment": 300
},
"verified_by": "emp123"
},
"company_trademark": "fos test 4",
"created": "2025-04-30 22:25:19",
"event_id": "9W2xIRfC94MoOIas"
}
- Online Deposit Verification events webhook is triggered when online Deposit verificiation is done
KEY | TYPE | DESCRIPTION |
---|---|---|
agent_name | String | Name of the agent |
loan_id | String | Loan id of the loan |
visit_id | String | Unique id of the visit |
amount_recovered | Float | Amount recovered during the visit |
allocation_month | String | Month in which loan was allocated |
verification_status | String | Status of Verification (approved, rejected) |
verification_remark | String | Remarks added for verification |
payment_reference_number | String | Payment reference number |
verified_by | String | Name of person who has verified |
payment_date | String | Date of payment |
recovery_date | String | Date when the amount was recovered |
utr_number | String | UTR Number of the transaction |
amount_bifurcation | Object | Bifurcation of the amount recovered |
Json response structure for FOS Edit Verification
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_edit_verification",
"data": {
"verification_status": "approved",
"verification_remark": "",
"request_id": "ys0t7EZ57Ext",
"agent_mobile": "8898989898",
"agent_name": "agent006",
"agent_email": "agent006@yopmail.com",
"user_employee_id": "213",
"loan_id": "TAT-4",
"agent_id": "2u6cgxdlki47k3bn",
"allocation_month": "2025-3-01",
"applicant_name": "Amit",
"payment_method": "Cash",
"verification_type": "edit",
"old_visit_id": "FrBtBQWueHKt",
"original_amount_recovered": 12,
"old_short_collection_receipt_url": "https://crdg.in/4hmVEHcG",
"updated_collection_proof": "https://app.credgenics.com/app/document-upload?company_id=8b137682-51e7-4c8e-97f4-a55801c00a2e&company_type=loan&loan_id=TAT-4&module=fos&document_id_search=67e0fde1ca6ba28baf64a491",
"new_visit_id": "DHNe7iyZ5rLR",
"new_amount_recovered": 13,
"new_short_collection_receipt_url": "https://crdg.in/3azQb5Cp"
},
"company_trademark": "fos test 4",
"created": "2025-03-24 12:09:06",
"event_id": "awSWYfem3Zu53lPc"
}
- FOS Edit Verification events webhook is triggered when an Deposit verificiation is edited
KEY | TYPE | DESCRIPTION |
---|---|---|
verification_status | String | Status of Verification (approved, rejected) |
verification_remark | String | Remarks added for verification |
request_id | String | Unique id of the edit request |
agent_mobile | String | Contact number of the agent |
agent_name | String | Name of the agent |
agent_email | String | Email id of the agent |
user_employee_id | String | User Employee ID of the agent |
loan_id | String | Loan id of the loan |
agent_id | String | Unique id of the agent |
allocation_month | String | Month in which loan was allocated |
applicant_name | String | Name of the applicant |
payment_method | String | Mode of payment used for collection |
verification_type | String | Type of verification request |
old_visit_id | String | Unique ID of the visit before the visit edit |
original_amount_recovered | Float | Amount recovered during the visit before the visit edit |
old_short_collection_receipt_url | String | Link to the collection receipt before the visit edit |
updated_collection_proof | String | Link to the updated collection proof after the visit edit |
new_visit_id | String | Unique id of the visit after the visit edit |
new_amount_recovered | Float | Amount recovered during the visit after the visit edit |
new_short_collection_receipt_url | String | Link to the collection receipt after the visit edit |
Json response structure for FOS Cancel Verification
{
"company_id": "8b137682-51e7-4c8e-97f4-a55801c00a2e",
"event": "fos_cancel_verification",
"data": {
"verification_status": "approved",
"verification_remark": "",
"request_id": "fhCFJEFvAfYY",
"agent_mobile": "8898989898",
"agent_name": "agent006",
"agent_email": "agent006@yopmail.com",
"user_employee_id": "213",
"loan_id": "TAT-4",
"agent_id": "2u6cgxdlki47k3bn",
"allocation_month": "2025-3-01",
"applicant_name": "Amit",
"payment_method": "Cash",
"verification_type": "cancellation",
"old_visit_id": "V98RbgcsKUFD",
"original_amount_recovered": 11,
"old_short_collection_receipt_url": "https://crdg.in/2L_w-fip",
"updated_collection_proof": ""
},
"company_trademark": "fos test 4",
"created": "2025-03-24 12:07:24",
"event_id": "PDq1pxHe7QhwbRaA"
}
- FOS Cancel Verification
KEY | TYPE | DESCRIPTION |
---|---|---|
verification_status | String | Status of Verification (approved, rejected) |
verification_remark | String | Remarks added for verification |
request_id | String | Unique id of the cancellation request |
agent_mobile | String | Contact number of the agent |
agent_name | String | Name of the agent |
agent_email | String | Email id of the agent |
user_employee_id | String | User Employee ID of the agent |
loan_id | String | Loan id of the loan |
agent_id | String | Unique id of the agent |
allocation_month | String | Month in which loan was allocated |
applicant_name | String | Name of the applicant |
payment_method | String | Mode of payment used for collection |
verification_type | String | Type of verification request |
old_visit_id | String | Unique ID of the visit before the visit cancellation |
original_amount_recovered | Float | Amount recovered during the visit before the visit cancellation |
old_short_collection_receipt_url | String | Link to the collection receipt before the visit cancellation |
updated_collection_proof | String | Link to the updated collection proof after the visit cancellation |
Json response structure for Clock-In
{
"company_id": "9fa2f477-5efc-4310-b44b-ff5945c16763",
"event": "fos_clock_in",
"data": {
"user_employee_id": "int691",
"agent_name": "Agent5",
"agent_mobile": "7976174613",
"agent_email": "agent5@yopmail.com",
"status": "clock-out",
"clock_in_time": "2025-05-26 13:41:39",
"clock_out_time": "2025-05-26 13:45:56",
"duration_logged": "0:04:17",
"clock_in_location": {
"latitude": 28.5768887,
"longitude": 77.3171012
},
"clock_out_location": {
"latitude": 28.5769182,
"longitude": 77.3171009
},
"battery_percentage": 71,
"device_id": "kalama",
"app_version": "3.1.6"
},
"company_trademark": "fos ek1k",
"created": "2025-05-26 13:45:56",
"event_id": "lHrgJuv10xJNZPdW"
}
- Clock-In
KEY | TYPE | DESCRIPTION |
---|---|---|
user_employee_id | String | Employee ID of the user |
agent_name | String | Name of the user |
agent_mobile | String | Contact number of the user |
agent_email | String | Email ID of the user |
status | String | Clocked-in / Clocked-out |
clock_in_time | String | Date-time of user clock-in |
clock_out_time | String | Date-time of user clock-out |
duration_logged | String | Total duration (with hrs or mins) between clock-in and clock-out |
clock_in_location | String | {latitude, longitude} of clock-in |
clock_out_location | String | {latitude, longitude} of clock-out |
battery_percentage | Float | Battery percentage at the time of clock-in/out |
device_id | String | Identifier of the device used |
app_version | String | Version of the CG Collect App used |
Json response structure for Billzy Payments
{
"company_id": "34v1156e-750f-4d74-bebe-72e07378b17b",
"loan_id": "SL1256769",
"allocation_month": "2023-1-01",
"amount": 500,
"order_id": "ygt6FG&Rgkuygytg7er",
"pg_success_datetime":"2023-01-31 00:03:06.177185",
"payment_mode":"UPI",
"status": "success",
"event_id" : "g67tr6fd",
"trust_name": "trust_1",
"created": "2023-01-31 00:03:06.177185",
"bank_reference_no": "935415109786"
}
- Billzy Payments Notifies you about payment status along with additional loan details. Below mentioned is the standard format. Please connect with CSM for additional required fields.
KEYS | TYPE | DESCRIPTION |
---|---|---|
company_id | String | Unique id for company on CG platform |
loan_id | String | Loan id of the loan |
allocation_month | String | Month in which loan was allocated |
amount | Float | Amount paid by the customer |
order_id | String | Unique transaction ID |
pg_success_datetime | String | timestamp of payment success |
payment_mode | String | Payment reference number |
status | String | status of transaction |
event_id | String | webhook ID |
trust_name | String | Trust name (will be received when the same is configured) |
created | String | Timestamp of transaction created |
bank_reference_no | String | UTR of payment transaction |
Settlement
Json response structure
{
"data": {
"approved_by": "test@credgenics.com",
"approved_on": "2024-07-25",
"installment_details": [
{
"installment_amount": 1455000.00,
"installment_due_date": "2024-08-25"
}
],
"loan_id": "demand 1",
"original_amount": "1500000.0",
"requested_by": "test@credgenics.com",
"requested_on": "2024-07-25",
"settlement_amount": "1455000.0",
"discount_offered": 1003.0,
"discount_percentage_offered": 25.0,
"discount_limit": 3000.0,
"settlement_id": 4840,
"settlement_request_bifurcation_details": {
"settlement_amount": {
"principal_outstanding_amount": 4000.0,
"expected_emi_interest_amount": 0.0,
"accrued_additional_interest_for_the_month": 0.0,
"accrued_interest_for_the_month": 0.0,
"additional_interest": 0.0,
"late_fee": 0.0,
"other_penalty": 0.0
},
"discount_offered": {
"principal_outstanding_amount": 1000.0,
"expected_emi_interest_amount": 3.0,
"accrued_additional_interest_for_the_month": 0.0,
"accrued_interest_for_the_month": 0.0,
"additional_interest": 0.0,
"late_fee": 0.0,
"other_penalty": 0.0
},
"discount_percentage_offered": {
"principal_outstanding_amount": 25.0,
"expected_emi_interest_amount": 0.0,
"accrued_additional_interest_for_the_month": 0.0,
"accrued_interest_for_the_month": 0.0,
"additional_interest": 0.0,
"late_fee": 0.0,
"other_penalty": 0.0
},
"discount_limit": {
"principal_outstanding_amount": 3000.0,
"expected_emi_interest_amount": 0.0,
"accrued_additional_interest_for_the_month": 0.0,
"accrued_interest_for_the_month": 0.0,
"additional_interest": 0.0,
"late_fee": 0.0,
"other_penalty": 0.0
},
"amount_due": {
"principal_outstanding_amount": 3000.0,
"expected_emi_interest_amount": 0.0,
"accrued_additional_interest_for_the_month": 0.0,
"accrued_interest_for_the_month": 0.0,
"additional_interest": 0.0,
"late_fee": 0.0,
"other_penalty": 0.0
}
}
},
"event": "settlement_request_approved",
"event_id": "93b5bda5-dde0-4509-a90c-1b9319014134"
}
- Settlement Request Approved : This webhook event is triggered whenever a settlement request is approved.
KEYS | TYPE | DESCRIPTION |
---|---|---|
approved_by | String | Email of the person who approved the request |
approved_on | String | Date when the request was approved |
installment_details | Array of Objects | List of installment details for the settlement |
installment_amount | Float | Amount for the installment due |
installment_due_date | String | Due date for the installment payment |
loan_id | String | Identifier for the loan |
original_amount | Float | Original amount of the loan |
requested_by | String | Email of the person who requested the settlement |
requested_on | String | Date when the settlement request was made |
settlement_amount | Float | Agreed settlement amount |
settlement_id | Integer | Unique identifier for the settlement |
event | String | Type of event, in this case, "settlement_request_approved" |
event_id | String | Unique identifier for the event |
discount_offered | Float | Total discount offered |
discount_percentage_offered | Float | Total discount offered in percentage |
discount_limit | Float | Overall discount limit |
settlement_request_bifurcation_details | Object (Dict) | Bifurcation details of the amount components |
settlement_amount_details | Object (Dict) | Breakdown of agreed settlement amount (nested in settlement_request_bifurcation_details) |
discount_offered_details | Object (Dict) | Breakdown of total discount offered (nested in settlement_request_bifurcation_details) |
discount_percentage_offered_details | Object (Dict) | Breakdown of total discount offered in percentage (nested in settlement_request_bifurcation_details) |
discount_limit_details | Object (Dict) | Breakdown of overall discount limit (nested in settlement_request_bifurcation_details) |
amount_due_details | Object (Dict) | Breakdown of total amount due (nested in settlement_request_bifurcation_details) |
Json response structure
{
"data": {
"lapsed_by": "test@credgenics.com",
"loan_id": "demand 4",
"settlement_amount": "97000.0",
"settlement_id": 3626,
"settlement_recovered_amount": "0",
"settlement_status": "settlement_lapsed"
},
"event": "settlement_request_lapsed",
"event_id": "ee4d8b73-fa9b-4adf-81a5-ee0177d2d7c7"
}
- Settlement Request Lapsed : This webhook event is triggered whenever a settlement request is lapsed.
KEYS | TYPE | DESCRIPTION |
---|---|---|
lapsed_by | String | Email of the person who marked the settlement as lapsed |
loan_id | String | Identifier for the loan |
settlement_amount | Float | Agreed settlement amount |
settlement_id | Integer | Unique identifier for the settlement |
settlement_recovered_amount | Float | Amount recovered from the settlement |
settlement_status | String | Current status of the settlement, in this case, "settlement_lapsed" |
event | String | Type of event, in this case, "settlement_request_lapsed" |
event_id | String | Unique identifier for the event |
Json response structure
{
"data": {
"loan_id": "demand 1",
"settlement_id": 4839,
"settlement_status": "live"
},
"event": "settlement_status_change",
"event_id": "0e4502f6-22f6-47e0-b091-b456a5998bae"
}
- Settlement Status Change : This webhook event is triggered whenever a settlement request status changes to grace period, grace period lapsed, live.
KEYS | TYPE | DESCRIPTION |
---|---|---|
loan_id | String | Identifier for the loan |
settlement_id | Integer | Unique identifier for the settlement |
settlement_status | String | Current status of the settlement, in this case, "live" |
event | String | Type of event, in this case, "settlement_status_change" |
event_id | String | Unique identifier for the event |
Json response structure
{
"data": {
"loan_id": "demand 1",
"settlement_id": 125,
"settlement_status": "live",
"settlement_date": "2024-07-25",
"settlement_amount": "10000",
"settlement_recovered_amount": "20",
"payment_date": "2024-08-25",
"payment_amount":"2000"
},
"event": "settlement_payment_received",
"event_id": "ee4d8b73-fa9b-4adf-81a5-ee0177d2d7c7"
}
- Settlement Payment Received : This webhook event is triggered whenever a payment is received for a settlement.
KEYS | TYPE | DESCRIPTION |
---|---|---|
loan_id | String | Identifier for the loan |
settlement_id | Integer | Unique identifier for the settlement |
settlement_status | String | Current status of the settlement, in this case, "live" |
settlement_date | String | Date of the settlement |
settlement_amount | Float | Agreed settlement amount |
settlement_recovered_amount | Float | Amount recovered from the settlement |
payment_date | String | Date of the payment |
payment_amount | Float | Amount of the payment |
event | String | Type of event, in this case, "settlement_payment_received" |
event_id | String | Unique identifier for the event |
Notices
Json response structure
{
"created": "2024-07-26 12:48:49",
"data": {
"allocation_month": "2024-7-01",
"client_customer_id": "Testing_8",
"dispatch_date": "2024-07-22 00:00:00",
"loan_id": "demand 4",
"notice_link": "https://bucket.dev.credgenics.com/notice_links/dcU0H0XQaobv.pdf",
"notice_tracking_id": null,
"notice_type": "bht",
"pod_link": null
},
"event": "physical_notice_dispatch",
"event_id": "6b1e75a5-9e87-477c-8bf3-3962b9f552c3"
}
- Physical Notice Dispatch : This webhook event is triggered whenever a physical notice is dispatched.
KEYS | TYPE | DESCRIPTION |
---|---|---|
created | String | The timestamp indicating when the event was created |
allocation_month | String | The month and year of allocation |
client_customer_id | String | The identifier for the client customer |
dispatch_date | String | The date and time when the notice was dispatched |
loan_id | String | The identifier for the loan |
notice_link | String | The URL link to the notice document |
notice_tracking_id | String | The tracking identifier for the notice |
notice_type | String | The type of notice dispatched |
pod_link | String | The URL link to the proof of delivery document |
event | String | The type of event, in this case, "physical_notice_dispatch" |
event_id | String | The unique identifier for the event |
Json response structure
{
"created": "2024-07-26 12:48:51",
"data": {
"allocation_month": "2024-7-01",
"client_customer_id": "Testing_6",
"dispatch_date": "2024-07-22 00:00:00",
"loan_id": "demand 3",
"notice_base64_format_data": "encoded_data_in_base_64",
"notice_pod_base64_format_data": null,
"notice_tracking_id": null,
"notice_type": "bht"
},
"event": "notice_file_in_base64",
"event_id": "57e358de-926b-4a70-8feb-3eacff69ed22"
}
- Notice File In Base64 : This webhook event is triggered whenever a physical notice is dispatched.
KEYS | TYPE | DESCRIPTION |
---|---|---|
created | String | The timestamp indicating when the event was created |
allocation_month | String | The month and year of allocation |
client_customer_id | String | The identifier for the client customer |
dispatch_date | String | The date and time when the notice was dispatched |
loan_id | String | The identifier for the loan |
notice_base64_format_data | String | The notice document data encoded in Base64 format |
notice_pod_base64_format_data | String | The proof of delivery document data encoded in Base64 format |
notice_tracking_id | String | The tracking identifier for the notice |
notice_type | String | The type of notice dispatched |
event | String | The type of event, in this case, "notice_file_in_base64" |
event_id | String | The unique identifier for the event |
Json response structure
{
"created": "2024-07-29 13:31:43",
"data": {
"allocation_month": "2024-7-01",
"channel": "email",
"client_customer_id": "Sprint62_client69",
"communication_shoot_id": "fe01bc268302468b87e60610da6eb425",
"loan_id": "Loan_J183",
"notice_link": "https://staging-credgenics-cases.s3.ap-south-1.amazonaws.com/notice_links/Kw2OSZ0n8nKz.pdf",
"notice_type": "lrn",
"triggered_time": "2024-07-29 13:31:43"
},
"event": "digital_notice_dispatch",
"event_id": "9ea7dd47-0abd-42f4-9e7b-451f70edc0dc"
}
- Digital Notice Dispatch : This webhook event is triggered whenever a digital notice is dispatched.
KEYS | TYPE | DESCRIPTION |
---|---|---|
created | String | The timestamp indicating when the event was created |
allocation_month | String | The month and year of allocation |
channel | String | The communication channel used for the notice dispatch (e.g., email) |
client_customer_id | String | The identifier for the client customer |
communication_shoot_id | String | The identifier for the communication process |
loan_id | String | The identifier for the loan |
notice_link | String | The URL link to the notice document |
notice_type | String | The type of notice dispatched |
triggered_time | String | The time when the notice dispatch was triggered |
event | String | The type of event, in this case, "digital_notice_dispatch" |
event_id | String | The unique identifier for the event |
Json response structure
{
"created": "2024-07-29 13:31:44",
"data": {
"allocation_month": "2024-7-01",
"channel": "email",
"client_customer_id": "Sprint62_client69",
"communication_shoot_id": "fe01bc268302468b87e60610da6eb425",
"loan_id": "Loan_J183",
"notice_base64_format_data": "notice_data_in_base64",
"notice_type": "lrn",
"triggered_time": "2024-07-29 13:31:43"
},
"event": "digital_notice_dispatch_base64",
"event_id": "8d384317-47f9-4cc1-86e1-bdfbbbb30ef7"
}
- Digital Notice Dispatch (Base64) : This webhook event is triggered whenever a digital notice is dispatched.
KEYS | TYPE | DESCRIPTION |
---|---|---|
created | String | The timestamp indicating when the event was created |
allocation_month | String | The month and year of allocation |
channel | String | The communication channel used for the notice dispatch (e.g., email) |
client_customer_id | String | The identifier for the client customer |
communication_shoot_id | String | The identifier for the communication process |
loan_id | String | The identifier for the loan |
notice_base64_format_data | String | The notice document data encoded in Base64 format |
notice_type | String | The type of notice dispatched |
triggered_time | String | The time when the notice dispatch was triggered |
event | String | The type of event, in this case, "digital_notice_dispatch_base64" |
event_id | String | The unique identifier for the event |
Json response structure
{
"created": "2024-07-29 13:48:39",
"data": {
"allocation_month": "2024-7-01",
"channel": "email",
"clicked_time": "2024-07-29 13:48:39",
"client_customer_id": "Testing_4",
"communication_shoot_id": "1b28541a4192444195243c1b73fcf8d8",
"loan_id": "genius 2",
"notice_link": "https://staging-credgenics-cases.s3.ap-south-1.amazonaws.com/notice_links/TQD6Nqr1zAHQ.pdf",
"notice_type": "lrn"
},
"event": "notice_link_clicked",
"event_id": "fcbad49e-0106-406e-9cff-695846287869"
}
- Notice Link Clicked : This webhook event is triggered whenever a notice link is clicked.
KEYS | TYPE | DESCRIPTION |
---|---|---|
created | String | The timestamp indicating when the event was created |
allocation_month | String | The month and year of allocation |
channel | String | The communication channel used for the notice dispatch (e.g., email) |
clicked_time | String | The time when the notice link was clicked |
client_customer_id | String | The identifier for the client customer |
communication_shoot_id | String | The identifier for the communication shoot |
loan_id | String | The identifier for the loan |
notice_link | String | The URL link to the notice document |
notice_type | String | The type of notice dispatched |
event | String | The type of event, in this case, "notice_link_clicked" |
event_id | String | The unique identifier for the event |
Json response structure
{
"created": "2024-08-01 13:38:39",
"data": {
"notice_details": {
"case_type": null,
"created": "2024-07-31 13:46:31",
"document_type": "Notice",
"notice_id": "1004",
"notice_link": "https://staging-credgenics-cases.s3.ap-south-1.amazonaws.com/notice_links/oJtD90P8tBMs.pdf",
"notice_type": "add_notice_type_1"
},
"tracking_details": {
"data": {
"applicant_type": "(Guarantor)",
"article_type": "Registered Letter",
"booked_at": "BPC Malviya Nagar",
"delivery_location": "B6, sector 20 ",
"events": [
{
"date": "12/06/2024",
"description": "Item Delivered(Addressee)",
"office": "Pangdour BO",
"time": "16:08:30"
},
{
"date": "12/06/2024",
"description": "Dispatched to BO",
"office": "Samba SO",
"time": "10:39:02"
}
],
"speedpost_booked_on": "05/06/2024 12:33:51",
"speedpost_delivery_confirmed_on": "12/06/2024 16:08:30",
"speedpost_delivery_status": "In-transit",
"speedpost_destination_pincode": "700001",
"speedpost_id": "RA889321102IN",
"speedpost_tarrif": "26.00",
"speedpost_undelivered_reason": "RAHUL"
},
"document_type": "Speedpost"
}
},
"event": "notice_tracking_event_update",
"event_id": "f9729f7e-548c-41ce-a13b-c4824f8e2f02"
}
- Tracking Event Update : This webhook event is triggered whenever a tracking event is updated.
KEYS | TYPE | DESCRIPTION |
---|---|---|
created | String | The timestamp indicating when the event was created |
notice_details | Object | An object containing the details of the notice |
case_type | Null | The type of case, if any |
document_type | String | The type of document, in this case, "Notice" |
notice_id | String | The identifier for the notice |
notice_link | String | The URL link to the notice document |
notice_type | String | The type of notice |
tracking_details | Object | An object containing the tracking details of the notice |
data | Object | An object containing the detailed tracking information |
applicant_type | String | The type of applicant, e.g., "Guarantor" |
article_type | String | The type of article, e.g., "Registered Letter" |
booked_at | String | The location where the article was booked |
delivery_location | String | The delivery address |
events | Array | An array of events tracking the article's journey |
date | String | The date of the event |
description | String | The description of the event |
office | String | The office where the event occurred |
time | String | The time of the event |
speedpost_booked_on | String | The timestamp when the Speedpost was booked |
speedpost_delivery_confirmed_on | String | The timestamp when the Speedpost delivery was confirmed |
speedpost_delivery_status | String | The delivery status of the Speedpost, e.g., "In-transit" |
speedpost_destination_pincode | String | The destination pincode for the Speedpost |
speedpost_id | String | The identifier for the Speedpost article |
speedpost_tarrif | String | The tariff for the Speedpost service |
speedpost_undelivered_reason | String | The reason for the Speedpost being undelivered |
document_type | String | The type of document, in this case, "Speedpost" |
event | String | The type of event, in this case, "notice_tracking_event_update" |
event_id | String | The unique identifier for the event |
Json response structure
{
"created": "2024-08-01 13:40:54",
"data": {
"notice_details": {
"case_type": null,
"created": "2024-07-31 13:46:31",
"notice_id": "1004",
"notice_link": "https://staging-credgenics-cases.s3.ap-south-1.amazonaws.com/notice_links/oJtD90P8tBMs.pdf",
"notice_type": "add_notice_type_1"
},
"tracking_status_details": {
"applicant_type": "(Guarantor)",
"article_type": "Registered Letter",
"booked_at": "BPC Malviya Nagar",
"delivery_location": "B6, sector 20 ",
"speedpost_booked_on": "05/06/2024 12:33:51",
"speedpost_delivery_confirmed_on": "12/06/2024 16:08:30",
"speedpost_delivery_status": "Undelivered",
"speedpost_destination_pincode": "700001",
"speedpost_id": "RA889321102IN",
"speedpost_tarrif": "26.00",
"speedpost_undelivered_reason": "RAHUL"
}
},
"event": "notice_tracking_status_update",
"event_id": "2f840de2-6951-4064-a35d-f8acdd2391d3"
}
- Tracking Status Update : This webhook event is triggered whenever a tracking event is updated.
KEYS | Type | Description |
---|---|---|
created | String | The timestamp indicating when the event was created |
notice_details | Object | An object containing the details of the notice |
case_type | String | The type of case, if any |
notice_id | String | The identifier for the notice |
notice_link | String | The URL link to the notice document |
notice_type | String | The type of notice |
tracking_status_details | Object | An object containing the tracking status details of the notice |
applicant_type | String | The type of applicant, e.g., "Guarantor" |
article_type | String | The type of article, e.g., "Registered Letter" |
booked_at | String | The location where the article was booked |
delivery_location | String | The location of the last event |
speedpost_booked_on | String | The timestamp when the Speedpost was booked |
speedpost_delivery_confirmed_on | String | The timestamp when the Speedpost delivery was confirmed |
speedpost_delivery_status | String | The delivery status of the Speedpost, e.g., "Undelivered" |
speedpost_destination_pincode | String | The destination pincode for the Speedpost |
speedpost_id | String | The identifier for the Speedpost article |
speedpost_tarrif | String | The tariff for the Speedpost service |
speedpost_undelivered_reason | String | The reason for the Speedpost being undelivered |
event | String | The type of event, in this case, "notice_tracking_status_update" |
event_id | String | The unique identifier for the event |
Litigation
Json response structure
{
"company_id": "CGX123",
"case_id": "CASE456",
"loan_ids": "LOAN789",
"event_type": "Case Creation",
"case_level_data": {
"case_type": "criminal_proceedings",
"case_status": "Active",
"reason": "Payment Dispute",
"proceeding": "Cheque Bounce u/s 138 (NI)",
"last_stage_creation_date": "2024-08-01",
"last_completed_step": 100,
"next_stage_code": 101,
"next_hearing_preparation": "Prepare documents",
"last_hearing_summary": "Adjourned to next date",
"last_hearing_date": "2024-08-01",
"recovered_amount": 500000,
"recovery_date": null,
"disposition": "Under Review",
"payment_method": "Online",
"cases_data": {},
"created": "2024-07-01",
"updated": "2024-08-20",
"author": "JohnDoe@credgenics.com",
"is_tracking_enabled": true,
"litigation_data": {
"disposed_date": "2024-08-10",
"case_year": "2023",
"next_hearing_date": "2024-09-15",
"first_hearing_date": "2024-01-20",
"filing_date": "2023-12-15",
"registration_date": "2024-01-05",
"fetched_on_date": "2024-08-21",
"side": "Plaintiff",
"stamp_register": "STAMPREG2024",
"judgement": "In favor of the plaintiff",
"court_name": "Supreme Court",
"case_number": "CN789456",
"case_type": "Civil",
"cause_title": "John Doe vs XYZ Corporation",
"case_status": "Disposed",
"diary_number": "D123456",
"court_judge": "Hon. Judge Smith",
"registration_number": "REG2024001",
"cnr_number": "CNR789123",
"orders_data": [{
"Order Date": "2024-02-26",
"Order copy link": "https://litigation-ecourts.credgenics.com/litigation-orders/example.pdf"
},
{
"Order Date": "2024-02-26",
"Order copy link": "https://litigation-ecourts.credgenics.com/litigation-orders/example.pdf"
}]
}
},
"stage_level_data": {
"stage_code": "SC001",
"iteration": 1,
"status": "Pending Approval",
"is_special": false,
"hearing_date": "2024-09-01",
"hearing_summary": "Hearing summary details",
"deadline_date": "2024-09-15",
"next_stage_code": "101",
"vendor_activity": ["Stage Update"],
"stage_updation_date": "2024-08-20",
"author": "JohnDoe@credgenics.com",
"editor": "JohnDoe@credgenics.com",
"created": "2024-07-01",
"updated": "2024-08-20",
"stages_data": {},
"billing_data": {
"litigation_cost": 50000,
"vendor_fees": 10000,
"court_fees": 15000,
"additional_cost": 5000,
"arbitration_fees": 20000,
"forum": "Arbitration Forum",
"notice_count": 3,
"billing_remark": "Payment for litigation services",
"notice_mode_for_billing": "Electronic",
"court_type_for_billing": "High Court",
"invoice_number": "",
"billing_date": "2024-08-15",
"billing_type": "Fixed",
"payment_date": "2024-08-21",
"payment_amount": 100000,
"payment_mode": "Cash",
"utr_number": "",
"payment_remark": "Payment received successfully"
},
"allocation_data": [
{
"vendor_type": "arbitrator",
"vendor_email": "vendor@example.com",
"allocation_instruction": "remarks",
"reporting_manager_emails":[
"xyx@cg.com","tyx@cg.com"
]
}]
}
}
- Litigation Case Creation : This webhook event is triggered whenever a litigation case creation is done.
Root-Level Keys
KEYS | Type | Description |
---|---|---|
company_id | String | Unique identifier for the company associated with the case. |
case_id | String | Unique identifier for the case in the system. |
loan_ids | String | List of loans (comma-separated string) related to the case. |
event_type | String | The type of event that triggered the webhook, such as "Case Creation", "Stage Creation", or "Stage Updation". |
case_level_data Object
Key | Type | Description |
---|---|---|
case_type | String | The type of the case, e.g., "criminal_proceedings", "arbitration". |
case_status | String | The current status of the case, e.g., "active" |
reason | String | The reason for the case, such as "Payment Dispute". |
proceeding | String | Legal proceeding type, e.g., "Cheque Bounce u/s 138 (NI)". |
last_stage_creation_date | String (Date) | The date when the last stage was created. |
last_completed_step | Number | The last completed step number in the case workflow. |
next_stage_code | Number | The identifier for the next stage in the case workflow. |
next_hearing_preparation | String | Instructions or preparations required for the next hearing. |
last_hearing_summary | String | Summary of the previous hearing, e.g., "Adjourned to next date". |
last_hearing_date | String (Date) | Date of the last hearing. |
recovered_amount | Number | Amount recovered through the case proceedings. |
recovery_date | String (Date) | Date when the amount was recovered, or null if not recovered. |
disposition | String | The current disposition of the case, e.g., "Under Review". |
payment_method | String | Payment method used, e.g., "Online", "Cash". |
cases_data | Object (Dict) | Additional nested data about related cases. Variables set in data fields of level case |
created | String (Date) | The timestamp when the case was created in the system. |
updated | String (Date) | The timestamp of the most recent update to the case. |
author | String | Email of the user who created the case. |
is_tracking_enabled | Boolean | Indicates whether tracking is enabled for the case. |
litigation_data Object (Nested in case_level_data)
Key | Type | Description |
---|---|---|
disposed_date | String (Date) | Date when the case was disposed of. |
case_year | String | The year in which the case was filed. |
next_hearing_date | String (Date) | Scheduled date for the next hearing. |
first_hearing_date | String (Date) | The date of the first hearing. |
filing_date | String (Date) | The date when the case was filed in the court. |
registration_date | String (Date) | The registration date of the case. |
fetched_on_date | String (Date) | Date when the case data was last fetched. |
side | String | The side involved, e.g.,"Plaintiff". |
stamp_register | String | The stamp register number for the case. |
judgement | String | Summary of the judgment, e.g., "In favor of the plaintiff". |
court_name | String | Name of the court handling the case, e.g., "Supreme Court". |
case_number | String | The official case number in court records. |
cause_title | String | The title of the case, e.g., "John Doe vs XYZ Corporation". |
case_status | String | The final or current status of the case, e.g., "Disposed". |
diary_number | String | The diary number associated with the case. |
court_judge | String | Name of the judge presiding over the case. |
registration_number | String | The registration number for the case in court records. |
cnr_number | String | Case reference number (CNR), unique across courts. |
orders_data | Array of Objects (list of Dicts) | Details of court orders issued during the case. |
stage_level_data Object
This object contains details related to the specific stage of the case workflow.
Key | Type | Description |
---|---|---|
stage_code | String | Code or identifier for the current stage of the case. |
iteration | Number | The number of iterations for the current stage. |
status | String | The status of the current stage, e.g., "Pending Approval". |
is_special | Boolean | Indicates if the current stage is marked as special. |
hearing_date | String (Date) | The date of the next hearing for this stage. |
hearing_summary | String | Summary of the hearing related to this stage. |
deadline_date | String (Date) | The deadline for completing this stage. |
next_stage_code | String or Number | Code or identifier for the next stage in the workflow. |
vendor_activity | Array of Strings | List of activities performed by vendors at this stage. |
stage_updation_date | String (Date) | The date when this stage was last updated. |
author | String | Email of the person who created this stage entry. |
editor | String | Email of the person who last edited this stage entry. |
created | String (Date) | The date when this stage was created. |
updated | String (Date) | The date when this stage was last updated. |
stages_data | Object (Dict) | Nested object with additional stage-related data. |
billing_data Object (Nested in stage_level_data)
This object includes billing-related information for the specific stage of the case.
Key | Type | Description |
---|---|---|
litigation_cost | Number | Total litigation costs incurred. |
vendor_fees | Number | Fees charged by vendors for their services. |
court_fees | Number | Fees charged by the court. |
additional_cost | Number | Any additional costs incurred. |
arbitration_fees | Number | Fees for arbitration services. |
forum | String | Forum name related to arbitration or billing. |
notice_count | Number | The number of notices sent for billing purposes. |
billing_remark | String | Additional remarks related to billing. |
notice_mode_for_billing | String | The mode of notice used for billing, e.g., "Electronic". |
court_type_for_billing | String | Type of court billed, e.g., "High Court". |
invoice_number | String | Invoice number associated with the billing. |
billing_date | String (Date) | Date when the billing was processed. |
billing_type | String | Type of billing, e.g., "Fixed". |
payment_date | String (Date) | Date when the payment was made. |
payment_amount | Number | Amount paid for this stage's billing. |
payment_mode | String | Mode of payment, e.g., "Cash", "Online". |
utr_number | String | Unique Transaction Reference number for payment tracking. |
payment_remark | String | Additional remarks related to the payment. |
allocation_data Object (Nested in stage_level_data)
This object contains details about vendor allocations.
Key | Type | Description |
---|---|---|
vendor_type | String | The type of vendor, e.g., "arbitrator". |
vendor_email | String | Email address of the allocated vendor. |
allocation_instruction | String | Additional remarks or instructions for the allocation. |
reporting_manager_emails | Array of Strings | List of email addresses of reporting managers related to this allocation. |
Nested Object Relationships
Hierarchy Overview:
Root-Level
company_id
,case_id
,loan_ids
,event_type
.
case_level_data
litigation_data
(nested withincase_level_data
).
stage_level_data
billing_data
(nested withinstage_level_data
).allocation_data
(nested withinstage_level_data
).
Integration Points:
- case_level_data: Focuses on case-wide details, including legal and orders data.
- stage_level_data: Focuses on workflow-specific details, including current status, deadlines, and vendor activities.
- billing_data: A subset of
stage_level_data
, detailing costs and payment information. - allocation_data: Provides vendor assignment details related to specific stages.
Universal communication API
Use this API to trigger communication event for a particular loan.
API authentication
Universal communication API is authenticated via a combination of authentication token and the role of that particular user who is trying to access the API.
You can request Credgenics for an authentication token. You need to replace {auth_token} in every request with the authentication token that you get from Credgenics.
API Base URL
For Production: https://apiprod.credgenics.com
For Testing: https://apiuat.credgenics.com
API HTTP Request - POST
POST {API_BASE_URL}/communication/trigger/event
API Request Headers
Parameter | Description |
---|---|
authenticationtoken | Auth token assigned by Credgenics |
role | Role of the user |
API Request Body Parameters
import requests
url = "{API_BASE_URL}/communication/trigger/event"
payload = "{\n \"allocation_month\": {allocation_month},\n \"loan_id\": {loan_id},\n \"company_id\": {company_id},\n \"communication_level\": {communication_level},\n \"source\" : {source},\n \"event_name\": {event_name},\n \"inbound_bot_id\": {inbound_bot_id},\n \"send_to\" : {send_to},\n “co_app_upto” : {co_app_upto} //optional field\n “send_to_closed_acc” : {send_to_closed_acc} //optional field\n}"
headers = {
'authenticationtoken': '{auth_token}',
'role': '{role}',
'content-type': 'application/json',
'accept': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
curl --location --request POST '{API_BASE_URL}/communication/trigger/event' \
--header 'authenticationtoken: {auth_token}' \
--header 'role: {role}' \
--header 'content-type: application/json' \
--header 'accept: application/json' \
--data-raw '{
"allocation_month": {allocation_month},
"loan_id": {loan_id},
"company_id": {company_id},
"communication_level": {communication_level},
"source" : {source},
"event_name": {event_name},
"inbound_bot_id": {inbound_bot_id},
"send_to" : {send_to},
“co_app_upto” : {co_app_upto} //optional field
“send_to_closed_acc” : {send_to_closed_acc} //optional field
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("role", "{role}");
myHeaders.append("content-type", "application/json");
myHeaders.append("accept", "application/json");
var raw = "{\n \"allocation_month\": {allocation_month},\n \"loan_id\": {loan_id},\n \"company_id\": {company_id},\n \"communication_level\": {communication_level},\n \"source\" : {source},\n \"event_name\": {event_name},\n \"inbound_bot_id\": {inbound_bot_id},\n \"send_to\" : {send_to},\n “co_app_upto” : {co_app_upto} //optional field\n “send_to_closed_acc” : {send_to_closed_acc} //optional field\n}";
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("{API_BASE_URL}/communication/trigger/event", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
The above code returns JSON structured like this:
{
"message": "success",
"output": "Successfully triggered communication for event Test",
"data": {
"sms": "Successfully created sms communication",
"email": "Successfully created email communication",
"whatsapp": "Successfully created whatsapp communication"
}
}
Key name | Type | Required | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
loan_id | string | True | Loan id of the loan to which communication will be sent. | ||||||||
company_id | string | True | Company_id of the loan corresponding to which communication will be sent. | ||||||||
inbound_bot_id | string | True | Unique ID of the Bot from which the event is triggered. | ||||||||
allocation_month | string | True | Date information of the loan where date is fixed to be “01”. Default value is “current_year -current_month-01” eg: "2021-8-01" | ||||||||
source | string | True | Source of event. | ||||||||
event_name | string | True | Name of event corresponding to which communication to be sent | ||||||||
send_to | string | True | To whom communication needs to be sent. Values Available:
|
||||||||
communication_level | String | True | “customer” for loan companies and “transaction” for creditline companies | ||||||||
co_app_upto | integer | False | Used to define to how many co_applicants we need to send communication | ||||||||
send_to_closed_acc | boolean | False | value can be either true or false. Used to define whether to send communication on closed loans or not. |
API Response Status Code
201 OK
for a successful request.
401 Unauthorized
if authentication failed. API credentials are incorrect.
400 Bad Request
if the request payload had some error. Specific error is provided in the response.
Credgenics Platform: Azure AD SSO Configuration Guide
Objective
This guide will walk you through the steps to configure Azure Active Directory (Azure AD) as your Identity Provider (IdP) for Single Sign-On (SSO) using the SAML protocol within the Credgenics platform.
Prerequisites
- Azure AD Subscription: Ensure you have an active Azure AD subscription with admin access.
- Credgenics Admin Access: Access to the admin settings in the Credgenics platform.
Steps to Configure Azure AD SSO in Credgenics
Step 1: Prepare Azure AD for SSO
- Sign in to Azure Portal:
Visit https://portal.azure.com and log in with your Azure AD admin credentials. - Navigate to Azure AD:
From the left-hand menu, select Azure Active Directory. - Enterprise Applications:
Click on Enterprise applications under Manage. - New Application:
Select + New application. - Create Application:
Choose Create your own application. Enter a name for your application (e.g., "Credgenics SSO") and select Integrate any other application you don't find in the gallery.
Step 2: Configure SAML-based SSO in Azure AD
- Single Sign-On:
In the Azure AD application settings, navigate to Single sign-on and select SAML. - Basic SAML Configuration:
- Identifier (Entity ID): Enter the Entity ID provided by Credgenics in the platform settings.
- Reply URL (Assertion Consumer Service URL): Enter the Assertion Consumer Service (ACS) URL provided by Credgenics.
- Sign-on URL: Optionally, you can enter a specific URL where users will log in to Credgenics.
- User Attributes & Claims:
- Ensure that Azure AD sends the correct user attributes required by Credgenics, such as email, employee_id, or mobile.
- SAML Signing Certificate:
- Download Certificate (Base64): Download the Azure AD SAML Signing Certificate. This will be uploaded to the Credgenics platform.
- Metadata XML: Optionally, download the Federation Metadata XML file.
Step 3: Configure Azure AD SSO in Credgenics Platform
- Log in to Credgenics:
Access the Credgenics platform with your admin credentials. - Navigate to SSO Settings:
Go to Settings > Security > Single Sign-On. - Upload Azure AD Metadata:
- Upload the SAML Signing Certificate downloaded from Azure AD.
- Enter the Entity ID and ACS URL as provided by Azure AD.
- Save Configuration: Click Save to apply the SSO settings.
Step 4: Test the SSO Configuration
- Testing SSO:
- Use the "Test SSO" option within the Credgenics platform to verify that users can successfully authenticate via Azure AD.
- Troubleshoot if Necessary:
- If there are issues, double-check the configurations in both Azure AD and Credgenics for accuracy.
Step 5: Assign Users to the Credgenics Application
- User Assignment in Azure AD:
- Return to the Azure AD portal, and under Enterprise applications, select your newly created application (e.g., "Credgenics SSO").
- Go to Users and Groups and assign the users or groups who need access to Credgenics.
- Testing by Users:
- Ensure that assigned users can log in to the Credgenics platform using their Azure AD credentials.
Step 6: Enable and Enforce SSO
- Enforce SSO:
Within the Credgenics platform, you can enforce SSO to ensure all users authenticate via Azure AD. - Communicate Changes:
Notify your users about the new SSO process, and provide them with any necessary instructions for logging in.
Need Help?
If you encounter any issues during the setup, please reach out to the Credgenics support team for assistance at customersupport@credgenics.com.
Errors
The Credgenics API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request -- Your request is invalid. |
401 | Unauthorized -- Authentication failed. API credentials are incorrect. |
403 | Forbidden -- You do not have permission to perform this action. |
404 | Not Found |
405 | Method Not Allowed -- You tried to access an endpoint with an invalid method. |
406 | Not Acceptable -- You requested a format that isn't json. |
500 | Internal Server Error -- We had a problem with our server. Try again later. |
503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. |