Skip to main content

Fetch Document Details for Loan Id

Screenshot 2023-04-20 at 2.30.30 AM.png


GET Documents for Loan Id

This API is used to retrieve all the customer's documentation, which includes their profile photo, ID proof, and collateral, for the specified loan ID.

Screenshot 2023-04-20 at 2.30.30 AM.png

URL: {{base_url}}/loan-management/v1/getDocuments

RequestRun in Postman: GET Documents

Request: 

Request Type: GET
Authorization: Bearer Token
Query Parameter
Query Parameter:
identity
Key Data Type DescriptionValidationsDefault ValueRequired
loanId*loanId Integer
Unique
constraint 
* required Param

Response: 200


{
   "response": true,
   "data": [
      {
         "document_type": "string",
         "document_state": null,
         "receiving_date": null,
         "is_verified": true,
         "document_url": "string",
         "document_status": null,
         "description": null,
         "document_value": null,
         "applicant_type": "string",
         "customer_name": "string",
         "other_document_name": null,
         "document_id": integer,
         "document_owner": "string",
         "document_stage": null,
         "document_department": null,
         "disbursal_stage": null
      }
   ],
   "error": null
}


N/A - Yes

Response:

Success: 200 OK
Schema
Attribute
TypeDescriptionMandatory

response

BooleanInternal status code that denotes the status of the request

data




Array of ObjectResponse Array of Object for the given inputs
document_typeStringDocument that is submitted
document_stateString

receiving_dateDateDate the document is received
is_verifiedBooleanIs the document verified for the customer
document_urlStringLocation where the Document is stored
document_statusString

descriptionString

document_valueString

applicant_typeStringType of applicant
customer_nameStringFull name of the customer
other_document_nameString

document_idIntegerUnique Identity for the document
document_ownerStringDocuments belonging to whom
document_stageString

document_departmentString

disbursal_stageString

error

StringInternal error object for the given inputs
Body
{
   "response": true,
   "data": [
      {
         "document_type": "string",
         "document_state": null,
         "receiving_date": null,
         "is_verified": true,
         "document_url": "string",
         "document_status": null,
         "description": null,
         "document_value": null,
         "applicant_type": "string",
         "customer_name": "string",
         "other_document_name": null,
         "document_id": 0,
         "document_owner": "string",
         "document_stage": null,
         "document_department": null,
         "disbursal_stage": null
      }
   ],
   "error": null
}

 

Success (Error): 200 OK

Note: If the API is unable to retrieve data for specific fields against the relevant Loan Id, then this error will occur.

Schema
Attribute

TypeDescriptionMandatory
response
StringInternal status code that denotes the status of requestYes
data
ObjectResponse Object for the given inputsNo
errorObject DataObjectInternal error object for the given inputsYes

codeintegerInternal error code for APIYes
textStringError message for the APINo
detailStringReason / Detail for the cause of errorNo
Body
Expected messages as per Status API :
Error CodeDescription
107001An Exception occurred in saving data
{
    "response": false,
    "data": null,
    "error": {
        "code": 0,
        "text": "string",
        "detail": "string"
    }
}

Unauthorized: 401

Note: If the API is not authorized with the Token or if the authorization token has expired, this error is going to show up.

Body
{
    "code": 401,
    "message": "auth fail, you can retry!"
}