Borrow API

Handling the Memorandum of deposit of title deeds to retrieve the information regarding the MODT document.

API Details

Request

POST
https://g99.in/api/pdf/barrow
Copied!

Request Body Parameters

Type Name Optional Description
File file Required Upload the MODT PDF document

Request Header Parameters

Type Name Value / Description Optional
String Content-Type multipart/form-data Required

Sample Code

request.php
Copied!
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://g99.in/api/pdf/barrow',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => array('file'=> new CURLFILE('" --Uploaded File Path-- "')),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
request.py
Copied!
import requests

url = "https://g99.in/api/pdf/barrow"

payload = {}
files=[
  ('file',(' --Uploaded File Name-- ',open('" --Uploaded File Path-- "','rb'),'application/pdf'))
]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
request.cs
Copied!
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://g99.in/api/pdf/barrow");
var content = new MultipartFormDataContent();
content.Add(new StreamContent(File.OpenRead(" --Uploaded File Path-- ")), "file", "  --Uploaded File Path--  ");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

Response

HTTP status code 200

Key Type Description
regNumber String The unique registration number as available from uploaded document
borrower_name String Name of the mortgagor
borrower_father_name String Name of mortgagor father
borrower_amount Number The total money taken as a loan that must be repaid, usually with interest, over time.
borrower_address String Address of the mortgagor

Sample Response

Sample response for valid document

response.json
Copied!
{
    "regNumber": "20201218001877",
    "borrower_name": "Bheru Chouhan",
    "borrower_father_name": "Prahalad Chouhan",
    "borrower_amount": 550000,
    "borrower_address": "3-72, Gowrigudem, Welcome Street, Khammam, Siddaram, Sathupalle, Khammam, Telangana, 507303"
}

Error Response

Parameter Type Description
status Number Unique error codes for different errors. Always available.
message String Error message describing the error. Always Available.
error Boolean True / False for different errors. Always available.

Error Codes

HTTP Status Error Code Error Message
415 415 Only PDF files are allowed.
413 413 Please upload a file smaller than 50MB.
422 422 Unable to extract data from the PDF file.
503 503 Document processing service is currently unavailable. Please try again later.

Sample Error Response

response.json
Copied!
{
  "message": "Unable to extract data from the PDF file.",
  "status": 422,
  "error": True
}