NAV
Credgenics Documentation
shell python javascript

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.

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.

Base URLs

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}"

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}' \
--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}", 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,
        "final_status": "Partially Recovered",
        "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
      }
    ],
    "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": [
    {
      "communication_id": 63426,
      "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"
      }
    },
    {
      "communication_id": 2357,
      "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,
      "final_status": "Partially Recovered",
      "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,
      "final_status": "Partially Recovered",
      "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={field}

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
By default, the api will send all the fields in the response.
fieldsvalue
Show all fieldsall (Default)
loan_detailsloan
communication_detailscommunication
payment_historypayment
notice_tracking_detailsnotice
remarksremark
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

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.

Upload Loan API

import requests

url = "{BASE_URL}/loan/{loan_id}"

payload = "{\n    \"loan_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    \"allocation_month\":\"2021-7-01\",\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\": \"2019-06-23\"\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_city\": \"Jodhpur\",\n    \"applicant_landmark\": \"\",\n            \"applicant_pincode\": 342001\n        }\n    ],\n    \"defaults\": [\n        {\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/{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": "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",
  "allocation_month": "2021-7-01",
  "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": [
    {
      "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({"loan_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","allocation_month":"2021-7-01","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":[{"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/{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 added successfully",
  "message": "success",
  "headers": {
    "Content-Type": "application/json"
  }
}

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 Type Required Default Value Description
loan_id string True - Loan id of the loan
client_customer_id string False - Customer id of the applicant
loan_type string True - Loan type of the loan. Eg: Personal Loan, Business Loan, Vehicle Loan, etc.
applicant_name string True - Name of the applicant
applicant_email string False "" Email id of the applicant
applicant_contact_number string False "" Contact Number of the applicant
applicant_gender string False "" Gender of the applicant
applicant_dob date False None Date of birth of the applicant. Eg - "1998-06-22"
applicant_monthly_income integer False None Monthly income of the applicant
applicant_cibil_score integer False None Cibil score of the applicant
applicant_occupation string False "" Occupation of the applicant
applicant_aadhar_number string False "" Aadhar number of the applicant
applicant_pan_number string False "" PAN number of the applicant
applicant_language string False "" Language of the applicant. Eg - "en" - English, "hi" - Hindi, etc.
total_loan_amount integer True - Loan amount of the loan
loan_tenure integer False None Tenure of the loan in months
client_loan_sanction_date date False None Sanction date of the loan. Eg - "2020-01-23"
loan_end_date date False None End date of the loan. Eg - "2021-11-23"
interest_on_loan float False None Interest on the loan amount
tenure_finished boolean False None Is the tenure of the loan finished? Choices - True, False
security_type string False "" Is the loan secured and if yes, then what is the security type? Choices - Secured, Movable, Secured Immovable, Unsecured
backed_by_surety boolean False None Is there a guarantor for the loan? Choices - True, False
loan_nbfc_name string False "" NBFC name
loan_nbfc_cin string False "" NBFC CIN
tags string False "" Tag names of loan
agent_email string False "" Email of agents you want to allocate the loan to
allocation_month string False "" Month in which you want to upload the loan. Eg : "2021-7-01"
emi_amount integer False None Single EMI amount of the loan
product_type string False "" Further classification of the loan_type. Eg - 4-wheeler loan, 2-wheeler Loan, Overdraft loan, Term Loan etc.
credit_account_number string False "" Account number of the borrower in which he/she recieved the loan amount. Eg - "0000012835"
credit_account_holder_name string False "" Name of the account holder
credit_account_holder_type string False "" Account type of the credit bank account
credit_bank_name string False "" Bank name of the credit account
credit_bank_ifsc_code string False "" IFSC code of credit bank
business_name string False "" Applicant business name
merchant_name string False "" Merchant name
payment_link string False "" Payment link
payment_link_expiry integer False None Payment link expiry time, it is a UNIX timestamp
channel_partner string False "" Channel Partner
loan_regional_manager_name string False "" Name of the loan regional manager
loan_regional_manager_contact_number string False "" Contact number of the loan regional manager
loan_regional_manager_contact_email string False "" Contact email id of the loan regional manager
Document Keys
security_mode string False "" What is the security for the loan ? Eg - NACH, ECS, ENACH, PDC, Others (Two wheeler, Fou wheeler, house) etc.
document_number string False "" Document number of the security_mode document Eg. Cheque Number, ECS number etc.
document_bank_name string False "" security mode document bank name. Eg. Cheque bank name
document_bank_ifsc_code string False "" IFSC code of the document bank
document_amount integer False None Amount mentioned on the security_mode document. Eg. Cheque amount
document_date date False None Execution date security_mode document. Eg. Cheque date
document_dishonour_date date False None Dishonour date of the security_mode document. Eg. Cheque dishonour date
document_signature_name string False "" Name of the Signee on the security_mode document. Eg. Signee name on the Cheque
document_bounce_bank_account_number string False "" Account number of the account in which document was bounced
document_bounce_charges integer False None Document bounce charges
document_bounce_bank_name string False "" Bank name in which the security_mode document was bounced
document_bounce_bank_ifsc_code string False "" IFSC code of the bank in which document was bounced
document_bounce_bank_address string False "" Address of the bank in which document was bounced
document_bounce_memo_date date False None Date of document bounce memo
reason_of_document_bounce string False "" Reason behind the security_mode document bounce. Eg. Insufficient balance
document_micr string False "" 9 digit Document MICR Code
document_presented_in_account string False "" Account in which document is presented
document_presented_zone string False "" Zone in which document is presented
document_bounce_memo_branch_address string False "" Address of the document bounce memo branch
document_bounce_memo_reference_number string False "" Reference number of document bounce memo
document_sequence_number string False "" Sequence number of document
document_bounce_memo_return_date date None Return date of document bounce memo
Address Keys
applicant_address_type string False - Type of the address. Choice - Home, Business, Office.
applicant_address_text text False "" Address of the applicant
applicant_state string False "" State of the applicant
applicant_city string False "" City of the applicant
applicant_landmark string False "" Landmark of the applicant
applicant_pincode integer False None Pincode of the applicant
Default Keys
total_claim_amount integer True None Amount to be recovered from borrower
late_fee integer False None Late penalty on the loan
date_of_default date False None Default date of the loan
expected_emi integer False None Overdue emi amount of the loan
default_emi_number integer False None Default EMI number
settlement_amount integer False None Settlement amount of the loan
client_amount_recovered integer False None Amount recovered by the client
principal_outstanding_amount integer False None Principal outstanding amount of the loan
expected_emi_interest_amount integer False None Interest amount of the overdue EMI
expected_emi_principal_amount integer False None Principal amount of the overdue EMI
other_penalty integer False None Any other penalty amount
Reference Keys
relation_with_applicant string False "" Referenced person's relation with applicant
name string False "" Name of the referenced person
contat_number string False "" Contact number of the referenced person
Coapplicant Keys
co_applicant_name string False "" Name of the co-applicant
co_applicant_type string False "" Type of the co-applicant
co_applicant_email string False "" Email id of the applicant
co_applicant_contact_number string False "" Contact number of the co-applicant
co_applicant_gender string False "" Gender of the co-applicant
co_applicant_dob date False None Date of birth of the co-applicant
co_applicant_address list False [] Address details of co-applicant. Below are the keys for co-applicant address
co_applicant_address_text text False "" Address of the co-applicant
co_applicant_address_type string False "" Address type of co-applicant. Eg. Home, Office, etc.
co_applicant_state string False "" State of the co-applicant
co_applicant_city string False "" City of the co-applicant
co_applicant_pincode integer False None Pincode of the co-applicant

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.

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",
  "headers": {
    "Content-Type": "application/json"
  }
}

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

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.

Update Payment API

import requests

url = "{BASE_URL}/payments/{loan_id}?allocation_month={allocation_month}"

payload = "{\n  \"amount_recovered\": 3450,\n    \"date_of_default\": \"2020-01-23\",\n    \"final_status\": \"Closed\",\n  \"payment_method\": \"Online\",\n  \"payment_mode\": \"Paytm\",\n  \"reference_number\": \"RN399687\",\n  \"recovery_method\": \"Field Collection\"\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}/payments/{loan_id}?allocation_month={allocation_month}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "amount_recovered": 3450,
    "date_of_default": "2020-01-23",
    "final_status": "Closed",
    "payment_method": "Online",
    "payment_mode": "Paytm",
    "reference_number": "RN399687",
    "recovery_method": "Field Collection"
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({"amount_recovered": 3450, "date_of_default": "2020-01-23", "final_status": "Closed", "payment_method": "Online", "payment_mode": "Paytm", "reference_number": "RN399687", "recovery_method": "Field Collection"});

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",
  "message": "success",
  "headers": {
    "Content-Type": "application/json"
  }
}

Use this API to update the payment details of a customer.

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"

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
final_status string True The status of the loan. Choices - Partially Recovered, Closed
amount_recovered integer True Amount recovered from the customer
recovery_method string False Recovery method of the loan. Choices - Communications, Field Collection, Legal
payment_method string True Method by which the payment has been made. Choices - Cash, Online, Cheque, Application, Bank Account Transfer, Payment Link.
date_of_default date True Date of default of the loan ( Required only if final_status is Partially Recovered )
closure_with string False Choices for closure - NOC, Settlement
payment_reference_number string False Payment Reference Number
payment_mode string False Mode of payment

Response Status Code

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.

Credit Line APIs

Get Customer API

import requests

url = "{BASE_URL}/loan/{client_customer_id}"

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}' \
--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}",
  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": [
        {
          "final_status": "Initiated",
          "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"
                }
              ],
        },
        {
          "final_status": "Initiated",
          "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,
              "final_status": "Partially Recovered",
              "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
            }
          ],
          "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,
              "final_status": "Initiated",
              "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
            }
          ],
          "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"
        }
      },
    ],
    "payment_history": [
    {
      "payment_id": 235,
      "client_customer_id": "189004",
      "amount_recovered": 1000,
      "final_status": "Partially Recovered",
      "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,
      "final_status": "Partially Recovered",
      "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": [
    {
      "communication_id": 23,
      "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"
      }
    },
    {
      "communication_id": 23555,
      "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",
  "headers": {
    "Content-Type": "application/json"
  }
}

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.
fieldsvalue
Show all fieldsall (Default)
applicant_details and transaction_detailsloan
communication_detailscommunication
payment_historypayment
notice_tracking_detailsnotice
remarksremark
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

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.

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    \"allocation_month\":\"2021-7-01\",\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            \"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",
  "allocation_month": "2021-7-01",
  "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": [
    {
      "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","allocation_month":"2021-7-01","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":[{"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:

{
  "output": "Transaction added successfully",
  "message": "success",
  "headers": {
    "Content-Type": "application/json"
  }
}

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

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.

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:

{
  "output": "Transaction updated successfully",
  "message": "success",
  "headers": {
    "Content-Type": "application/json"
  }
}

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

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.

Update Payment API

import requests

url = "{BASE_URL}/payments/{transaction_id}?allocation_month={allocation_month}"

payload = "{\n    \"client_customer_id\": \"189004\",\n    \"final_status\": \"Partially Recovered\",\n    \"amount_recovered\": 3450,\n    \"payment_method\": \"Online\",\n    \"date_of_default\": \"2020-01-23\"\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}/payments/{transaction_id}?allocation_month={allocation_month}' \
--header 'authenticationtoken: {auth_token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "client_customer_id": "189004",
    "final_status": "Partially Recovered",
    "amount_recovered": 3450,
    "payment_method": "Online",
    "date_of_default": "2020-01-23"
}'
var myHeaders = new Headers();
myHeaders.append("authenticationtoken", "{auth_token}");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({"client_customer_id":"189004","final_status":"Partially Recovered","amount_recovered":3450,"payment_method":"Online","date_of_default":"2020-01-23"});

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",
  "message": "success",
  "headers": {
    "Content-Type": "application/json"
  }
}

Use this API to update the payment details of a customer.

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"

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.
final_status string True The status of the loan. Choices - Partially Recovered, Closed
amount_recovered integer True Amount recovered from the customer
recovery_method string False Recovery method of the loan. Choices - Communications, Field Collection, Legal
payment_method string True Method by which the payment has been made. Choices - Cash, Online, Cheque, Application, Bank Account Transfer, Payment Link.
date_of_default date True Date of default of the loan ( Required only if final_status is Partially Recovered )
closure_with string False Choices for closure - NOC, Settlement
payment_reference_number string False Payment Reference Number
payment_mode string False Mode of payment

Response Status Code

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.

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:

  1. Log in to the platform
  2. Navigate to Event webhook tab on the left sidebar.
  3. Configure the HTTP POST API and select the event on which you want to trigger the Webhook
  4. Save the details

Webhook Events

Event webhooks can be triggered by several types of events:

Digital Communications

Json response structure

{
  "event": "email",
  "data": {
    "loan_id": "2954",
    "allocation_month": "2021-6-07",
    "author": "demo.admin@credgenics.com",
    "triggered_time": "2021-10-02 12:59:13",
    "email_address_from": "Credgenics <legal@credgenics.com>",
    "email_address_to": "demo.admin@credgenics.com",
    "email_address_cc": "info@credgenics.com",
    "mention_email_cc": true,
    "email_subject": "Reminder - Your EMI payment is overdue on 2021-11-17",
    "email_body": "Hi -, <br/><br/>Your EMI of INR 5000 was due on 2021-11-17 for order 12844274. <br/><br/>Did you know, you can avoid late payment fees and keep your CIBIL score unaffected by paying your EMIs on time?<br/><br/>Pay your EMI immediately online via UPI, Wallet, Internet banking or Debit card - -<br/>Please ignore if already paid.<br/><br/>Thank you<br/><br/><br/><br/>",
    "email_reply_to": "reports@credgenics.com",
    "template_name": "Avoid late payment (3)",
    "applicant_type": "applicant",
    "delivered_time": "2021-10-02 13:00:13",
    "opened_time": "2021-10-02 13:00:15",
    "bounced_time": "2021-10-02 13:00:12"
  },
  "created": "2021-11-15 16:57:26"
}

Json response structure

{
  "event": "sms",
  "data": {
    "loan_id": "2954",
    "allocation_month": "2021-6-07",
    "author": "demo.admin@credgenics.com",
    "triggered_time": "2021-10-02 12:59:13",
    "sms_mobile": "7300190050",
    "sms_body": "Hi Rajat Lahariya,\n\nHere is the payment link: https://crdg.in/n5qrkWAio",
    "sms_language": "en",
    "character_count": 68,
    "applicant_type": "applicant",
    "message_count": 1,
    "client_template_id": "1107161519758773264",
    "template_name": "Paymentlink New",
    "delivered_time": "2021-11-11 14:08:48"
  },
  "created": "2021-11-15 16:57:2"
}

Json response structure

{
  "event": "voice",
  "data": {
    "loan_id": "2954",
    "allocation_month": "2021-6-07",
    "author": "demo.admin@credgenics.com",
    "triggered_time": "2021-10-02 12:59:13",
    "voice_mobile": "9818935098",
    "voice_body": "Hi Priyance, your ZestMoney E.M.I. of Rupees 220256 was due on 2019-11-12 for order L S B 0 0 0 0 3 0 0 V 1.  \n \nAny further delays in repayment will result in your loan account being moved to arrears, which will impact your CIBIL score.  \n \nPlease ignore if already paid.",
    "voice_language": "en-in",
    "voice_gender": "female",
    "template_name": "Cibil impact (2, 8, 10)",
    "applicant_type": "applicant",
    "answer_time": "2020-10-17 22:03:20",
    "start_time": "2020-10-17 22:03:09",
    "end_time": "2020-10-17 22:03:29",
    "call_duration": 9,
    "file_duration": 33,
    "pulse_count": 1
  },
  "created": "2021-11-15 16:57:29"
}

Json response structure

{
 "event": "whatsapp",
 "data":{
    "loan_id": "2954",
    "allocation_month": "2021-6-07",
    "author": "demo.admin@credgenics.com",
    "triggered_time": "2021-10-02 12:59:13",
    "whatsapp_mobile": "9719277072",
    "whatsapp_body": "Dear . Ramvati,\n\nPFB legal notice for the non-payment of your outstanding dues to DMI Finance Private Limited (Samsung) for loan disbursed. Ignore this notice if the payment has already been made/settled.\n\nhttps://noticee.in/i/ZAshmwSgua?t=3dAoJohthwucio\nThanks and Regards,\nDMI Finance",
    "template_name": "lrn_samsung_verified_25october2021",
    "applicant_type": "applicant",
    "delivered_time": "2021-10-02 15:59:13",
    "opened_time": "2021-10-02 16:13:47",
    "client_template_id": "6234444"
 },
 "created": "2021-11-15 13:56:29"
}

Payments

Json response structure for payments

{
 "event": "payment",
 "data": {
      "loan_id": "2954",
      "amount_recovered": 2000,
      "final_status": "Partially Recovered" ,
      "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.
final_status string The status of the loan.
recovery_method string Recovery method of the loan.
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

FOS

Json response structure for collections

{
  "event": "fos_collection",
  "data": {
    "loan_id": "318355",
    "allocation_month": "2021-9-01",
    "visit_id": "FIFVlJzCOXYb",
    "agent_email": "fostest@credgenics.com",
    "agent_name": "FOS Test",
    "visit_date": "2022-02-16",
    "visit_purpose": "Surprise Visit",
    "is_visit_done": true,
    "is_customer_met": true,
    "is_recovery_done": true,
    "agent_marked_status": "Partially Recovered by Agent",
    "amount_recovered": 4000,
    "collection_receipt_url": "https://crdg.in/CSjhLf",
    "payment_method": "Cash",
    "payment_reference_number": "JSbhXBjQr0tf"
  },
  "created": "2022-03-28 13:55:32.674091"
}
KEYS 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
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
amount_recovered Integer Amount recovered from the borrower
collection_receipt_url String Link to collection receipt
payment_method String Mode of payment used for collection
payment_reference_number String Unique id of the payment

Json response structure for FOS deposits where Branch Type is 'bank'

{
   "event":"fos_deposit",
   "data":{
      "deposit_id":"hCZ67s5Aga9Y",
      "agent_email":"fostest@credgenics.com",
      "agent_name":"FOS Test",
      "total_amount":6000,
      "deposit_method":"Cash",
      "recovery_method":"Cash",
      "branch_type":"bank",
      "branch_details":{
         "bank_name":"ABC BANK LTD",
         "ifsc_code":"ABC0003712",
         "branch_name":"XYZ Branch",
         "account_name":"Dummy Finance LTD",
         "account_type":"Current",
         "account_number":"123456789"
      },
      "deposit_receipt_no":"208828256907",
      "deposit_proof_url":"https://dev-credgenics-cases.s3.ap-south-1.amazonaws.com/fos_deposit_proofs/RZ7GO4W4pyHU.jpeg",
      "loan_data":[
         {
            "loan_id":"L1",
            "amount":4000
         },
         {
            "loan_id":"L2",
            "amount":2000
         }
      ]
   },
   "created":"2022-03-29 13:55:32.674091"
}

Json response structure for FOS deposits where Branch Type is 'company'

{
   "event":"fos_deposit",
   "data":{
      "deposit_id":"hCZ67s5P9a9Y",
      "agent_email":"fostest@credgenics.com",
      "agent_name":"FOS Test",
      "total_amount":6000,
      "deposit_method":"Cash",
      "recovery_method":"Cash",
      "branch_type":"company",
      "branch_details":{
         "branch_name":"Palam",
         "branch_address":"Manglapuri",
         "branch_contact_number":"9999999999"
      },
      "deposit_receipt_no":"208828256917",
      "deposit_proof_url":"https://dev-credgenics-cases.s3.ap-south-1.amazonaws.com/fos_deposit_proofs/RZ7GO4W4pyHU.jpeg",
      "loan_data":[
         {
            "loan_id":"L3",
            "amount":4000
         },
         {
            "loan_id":"L6",
            "amount":2000
         }
      ]
   },
   "created":"2022-03-29 13:55:32.674091"
}
KEYS 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
total_amount Integer Amount deposited by agent
deposit_method String Mode of payment used for deposit
recovery_method String Mode of payment used for recovery
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

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.