This object allows you to add or create documents related to a borrower. There are multiple ways to use document object:
- Render a document from a Peach template. For example, loan terms or Autopay agreement.
- Upload any type of file. For example, a PDF copy of borrower's driver license.
- Documents can also be used to render a legal disclosure from Peach template.
To create a new document there are two steps:
- Create a document descriptor.
- Upload document content/file.
When a new document is rendered from the template you just need to complete step #1.
The doc upload link key. Used to perform document upload operations without logging into Peach system. This should be treated as secret, because anyone in possession of this key can upload on behalf the borrower for which it was created. Not to be confused with the documentUploadLinkId.
The new document descriptor
A lender's identifier for an object.
After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.
To fetch the object using externalId you need to add ext- to the URL.
Note: Don't add ext- to the identifier value. For example: if the external identifier is ABCDE, then pass externalId=ABCDE and NOT ext-ABCDE when creating the object.
true if this document is generated automatically by a Peach system, false if this document is created and uploaded manually by a human. If left blank then this value is guessed from the document type.
The evidence document identifier. For example: when a borrower enables Autopay, the evidence document will be the snapshot of UI page.
The file name of the document. If the document is rendered from a template by the Peach system, the file name will be generated automatically. If the document is created from a file, it will be the name of the file that was uploaded. Normally displayed in UI.
The reason why the document was rejected. This is a free text. Normally displayed in UI.
Set this flag to true if this document has sensitive information, such as PII. The flag is used for proper authorization of access to the information.
The document status. The status can be displayed in UI.
draft - the document was rendered or created but has not accepted or rejected yet.
accepted - the document was determined to be valid and was accepted.
rejected - the document was determined to be invalid and was rejected.
Peach internal template identifier that was used to render the document.
curl -i -X POST \
'https://sandboxapi.peach.finance/api/document-uploads/{documentUploadLinkKey}/documents' \
-H 'Content-Type: application/json' \
-d '{
"externalId": "string",
"archived": false,
"autogenerated": true,
"description": "string",
"evidenceId": "string",
"fileName": "string",
"loanId": "string",
"metaData": {},
"rejectionReason": "string",
"sensitiveData": true,
"status": "draft",
"templateVersionId": "string",
"type": "loanTermsAgreementOnly"
}'OK
A lender's identifier for an object.
After the object is successfully created, a lender can use ID or externalId identifiers to fetch the object.
To fetch the object using externalId you need to add ext- to the URL.
Note: Don't add ext- to the identifier value. For example: if the external identifier is ABCDE, then pass externalId=ABCDE and NOT ext-ABCDE when creating the object.
true if this document is generated automatically by a Peach system, false if this document is created and uploaded manually by a human. If left blank then this value is guessed from the document type.
The document content identifier. Use this identifier to get the document content.
The original document identifier that was used as a source for conversion to a specific format.
The evidence document identifier. For example: when a borrower enables Autopay, the evidence document will be the snapshot of UI page.
The file name of the document. If the document is rendered from a template by the Peach system, the file name will be generated automatically. If the document is created from a file, it will be the name of the file that was uploaded. Normally displayed in UI.
true if this document was uploaded by a human borrower--meaning that a borrower (or their representative) used a browser to upload this document directly. To put this another way, this document was not uploaded by an agent and was not uploaded by any automated system.
The reason why the document was rejected. This is a free text. Normally displayed in UI.
Set this flag to true if this document has sensitive information, such as PII. The flag is used for proper authorization of access to the information.
The document status. The status can be displayed in UI.
draft - the document was rendered or created but has not accepted or rejected yet.
accepted - the document was determined to be valid and was accepted.
rejected - the document was determined to be invalid and was rejected.
Peach internal template identifier that was used to render the document.
Details of the user who last updated the document. Can be an borrower, agent, or automated system process.
Details of the user responsible for uploading the document. Can be an borrower, agent, or automated system process.
Details of the user responsible for verifing the document. Can be an agent or automated system process.
{ "createdAt": "2019-08-24T14:15:22Z", "deletedAt": "2019-08-24T14:15:22Z", "id": "string", "updatedAt": "2019-08-24T14:15:22Z", "externalId": "string", "archived": false, "autogenerated": true, "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b", "contentLength": 0, "contentType": "string", "conversionSourceId": "string", "description": "string", "evidenceId": "string", "fileName": "string", "isHumanBorrowerUpload": true, "loanId": "string", "metaData": {}, "personId": "string", "rejectionReason": "string", "sensitiveData": true, "status": "draft", "templateVersionId": "string", "updatedBy": { "descriptor": "Agent bob@acme.com", "employee": { … }, "id": "string", "name": "string", "userType": "agent" }, "uploadedAt": "2019-08-24T14:15:22Z", "uploadedBy": { "descriptor": "Agent bob@acme.com", "employee": { … }, "id": "string", "name": "string", "userType": "agent" }, "verifiedAt": "2019-08-24T14:15:22Z", "verifiedBy": { "descriptor": "Agent bob@acme.com", "employee": { … }, "id": "string", "name": "string", "userType": "agent" }, "type": "loanTermsAgreementOnly" }