Introduction
If you would like to redirect user to an upload page without integrating an API, see the Upload UI Widget. It supports upload of a variety of image types, cropping and a friendly shorturls to navigate a user to.
Adding a document using the API
The remainder of this page talks about how to upload a document using our API. It assumes you have called loanrequest and borrowerinfo already, in which case you will have a kudos_loan_id
and kudos_borrower_id
.
You can find the fileType in the Appendix on the bottom of this page.
Request
{
"kudos_loan_id" : "...",
"kudos_borrower_id" : "...",
"partner_loan_id" : "...",
"partner_borrower_id" : "...",
"base64pdfencodedfile" : "...encode pdf as base64 encoded string",
"fileType" : "See appendix below for possible values"
}
You can find the fileType in the Appendix on the bottom of this page.
Response: Success
:::success
{
"success":true,
"message: "Loan document uploaded successfully"
}
:::
Response: Failed
:::warning
{
"message: "Some warning or message"
}
:::
Document Upload Status API
At any point of time, you can also check if a specific document has been uploaded.
POST {host}/api/documents/{fileType}
eg: POST {host}/api/documents/agreement
eg: POST {host}/api/documents/pan_card
You can find the fileType in the Appendix on the bottom of this page. For the host
see URL docs.
Request
{
"kudos_loan_id" : "..."
}
Response: document exists
{
"success": true,
"data": {
"exists": true,
"updated_at": "2021-02-26T08:02:40.000Z"
}
}
Response: not yet uploaded
{
"success": false
}