Documents

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:

  1. Create a document descriptor.
  2. Upload document content/file.

When a new document is rendered from the template you just need to complete step #1.

Get document descriptors

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

query Parameters
type
Array of strings (DocumentType)

The document type to select by.

Items Enum: "loanTermsAgreementOnly" "loanTILDisclosureOnly" "loanTermsAndTILCombined" "loanTermsChangeAgreement" "loanAutopayAgreement" "loanStatement" "loanSettlementAgreement" "privacyPolicyLender" "privacyPolicyServicer" "termsOfServiceLender" "termsOfServiceServicer" "caseDocument" "disclosure" "evidence" "otherStatement" "other"
loanId
string

The loan identifier to select by.

includeArchived
boolean
Default: false

Include archived documents into the result

uploadedBy
string

Show documents that were uploaded by a specific user. Use borrower to show documents uploaded only by the borrower.

autogenerated
boolean

If true only include documents which are autogenerated == true, and likewise for false.

isHumanBorrowerUpload
boolean

If true only include documents which are isHumanBorrowerUpload == true, and likewise for false.

Responses
200

OK

get/people/{personId}/documents
Response samples
application/json
[
  • {
    }
]

Create new document descriptor

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

Request Body schema: application/json
required

The new document descriptor

id
string
createdAt
string <date-time>
updatedAt
string or null <date-time>
deletedAt
string or null <date-time>
externalId
string or null [ 1 .. 50 ] characters

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=ACBCE and NOT ext-ABCDE when creating the object.

autogenerated
boolean or null

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.

description
string

The description for the document. Normally displayed in UI.

status
string (DocumentStatus)

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.

Enum: "draft" "accepted" "rejected"
rejectionReason
string

The reason why the document was rejected. This is a free text. Normally displayed in UI.

archived
boolean
Default: false

Set to true if the document has been archived.

loanId
string or null

The loan identifier that the documents belongs to.

templateVersionId
string or null

Peach internal template identifier that was used to render the document.

evidenceId
string or null

The evidence document identifier. For example: when a borrower enables Autopay, the evidence document will be the snapshot of UI page.

fileName
string

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.

sensitiveData
boolean

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.

metaData
object or null (MetaData)

Store any type of key/value pairs in the form of a JSON dictionary.

type
required
string (DocumentType)

The document type.

Enum: "loanTermsAgreementOnly" "loanTILDisclosureOnly" "loanTermsAndTILCombined" "loanTermsChangeAgreement" "loanAutopayAgreement" "loanStatement" "loanSettlementAgreement" "privacyPolicyLender" "privacyPolicyServicer" "termsOfServiceLender" "termsOfServiceServicer" "caseDocument" "disclosure" "evidence" "otherStatement" "other"
Responses
200

OK

400

Bad request

post/people/{personId}/documents
Request samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "sensitiveData": true,
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}
Response samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "isHumanBorrowerUpload": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "personId": "string",
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b",
  • "contentType": "string",
  • "contentLength": 0,
  • "sensitiveData": true,
  • "conversionSourceId": "string",
  • "uploadedBy": {
    },
  • "uploadedAt": "2019-08-24T14:15:22Z",
  • "verifiedBy": {
    },
  • "verifiedAt": "2019-08-24T14:15:22Z",
  • "updatedBy": {
    },
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}

Get document descriptor by ID

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

Responses
200

OK

get/people/{personId}/documents/{documentDescriptorId}
Response samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "isHumanBorrowerUpload": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "personId": "string",
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b",
  • "contentType": "string",
  • "contentLength": 0,
  • "sensitiveData": true,
  • "conversionSourceId": "string",
  • "uploadedBy": {
    },
  • "uploadedAt": "2019-08-24T14:15:22Z",
  • "verifiedBy": {
    },
  • "verifiedAt": "2019-08-24T14:15:22Z",
  • "updatedBy": {
    },
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}

Update document descriptor

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

Request Body schema: application/json
required

Document descriptor fields

id
string
createdAt
string <date-time>
updatedAt
string or null <date-time>
deletedAt
string or null <date-time>
externalId
string or null [ 1 .. 50 ] characters

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=ACBCE and NOT ext-ABCDE when creating the object.

autogenerated
boolean or null

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.

description
string

The description for the document. Normally displayed in UI.

status
string (DocumentStatus)

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.

Enum: "draft" "accepted" "rejected"
rejectionReason
string

The reason why the document was rejected. This is a free text. Normally displayed in UI.

archived
boolean
Default: false

Set to true if the document has been archived.

loanId
string or null

The loan identifier that the documents belongs to.

templateVersionId
string or null

Peach internal template identifier that was used to render the document.

evidenceId
string or null

The evidence document identifier. For example: when a borrower enables Autopay, the evidence document will be the snapshot of UI page.

fileName
string

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.

sensitiveData
boolean

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.

metaData
object or null (MetaData)

Store any type of key/value pairs in the form of a JSON dictionary.

type
string (DocumentType)

The document type.

Enum: "loanTermsAgreementOnly" "loanTILDisclosureOnly" "loanTermsAndTILCombined" "loanTermsChangeAgreement" "loanAutopayAgreement" "loanStatement" "loanSettlementAgreement" "privacyPolicyLender" "privacyPolicyServicer" "termsOfServiceLender" "termsOfServiceServicer" "caseDocument" "disclosure" "evidence" "otherStatement" "other"
Responses
200

OK

400

Bad request

put/people/{personId}/documents/{documentDescriptorId}
Request samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "sensitiveData": true,
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}
Response samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "isHumanBorrowerUpload": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "personId": "string",
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b",
  • "contentType": "string",
  • "contentLength": 0,
  • "sensitiveData": true,
  • "conversionSourceId": "string",
  • "uploadedBy": {
    },
  • "uploadedAt": "2019-08-24T14:15:22Z",
  • "verifiedBy": {
    },
  • "verifiedAt": "2019-08-24T14:15:22Z",
  • "updatedBy": {
    },
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}

Delete document

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

Responses
200

OK

404

Not Found

delete/people/{personId}/documents/{documentDescriptorId}

Upload document content

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

Request Body schema: multipart/form-data
required

The document content

file
string <binary>
Responses
200

OK

400

Bad request

post/people/{personId}/documents/{documentDescriptorId}/content
Response samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "isHumanBorrowerUpload": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "personId": "string",
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b",
  • "contentType": "string",
  • "contentLength": 0,
  • "sensitiveData": true,
  • "conversionSourceId": "string",
  • "uploadedBy": {
    },
  • "uploadedAt": "2019-08-24T14:15:22Z",
  • "verifiedBy": {
    },
  • "verifiedAt": "2019-08-24T14:15:22Z",
  • "updatedBy": {
    },
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}

Download document content

Securityoauth2 or bearerAuth or apiKeyHeader or bearerAuthQuery
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

query Parameters
disposition
string

The response content disposition to set.

Enum: "inline" "attachment"
token
string

Access token used to gain temporary access to the document.

returnUrl
boolean
Default: false

If true, will return a URL to the content instead of redirecting to the content.

Responses
200

The document content

get/people/{personId}/documents/{documentDescriptorId}/content

Convert document to the specified format

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

query Parameters
format
required
string

The document output format.

Value: "pdf"
sign
boolean

Sign after conversion.

Responses
200

OK

400

Bad request

post/people/{personId}/documents/{documentDescriptorId}/convert
Response samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "isHumanBorrowerUpload": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "personId": "string",
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b",
  • "contentType": "string",
  • "contentLength": 0,
  • "sensitiveData": true,
  • "conversionSourceId": "string",
  • "uploadedBy": {
    },
  • "uploadedAt": "2019-08-24T14:15:22Z",
  • "verifiedBy": {
    },
  • "verifiedAt": "2019-08-24T14:15:22Z",
  • "updatedBy": {
    },
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}

Digitally sign document

Securityoauth2 or bearerAuth or apiKeyHeader
Request
path Parameters
personId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

A Borrower's unique identifier, tied to a person or a business. Can be Peach or a lender's external identifier.

documentDescriptorId
required
string (AnyId) ^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+...

The document descriptor identifier.

Responses
200

OK

400

Bad request

500

Server misconfiguration or error

post/people/{personId}/documents/{documentDescriptorId}/sign
Response samples
application/json
{
  • "id": "string",
  • "createdAt": "2019-08-24T14:15:22Z",
  • "updatedAt": "2019-08-24T14:15:22Z",
  • "deletedAt": "2019-08-24T14:15:22Z",
  • "externalId": "string",
  • "autogenerated": true,
  • "isHumanBorrowerUpload": true,
  • "description": "string",
  • "status": "draft",
  • "rejectionReason": "string",
  • "archived": false,
  • "personId": "string",
  • "loanId": "string",
  • "templateVersionId": "string",
  • "evidenceId": "string",
  • "fileName": "string",
  • "contentId": "21aa1683-ca25-4edf-bc18-01ad04a4821b",
  • "contentType": "string",
  • "contentLength": 0,
  • "sensitiveData": true,
  • "conversionSourceId": "string",
  • "uploadedBy": {
    },
  • "uploadedAt": "2019-08-24T14:15:22Z",
  • "verifiedBy": {
    },
  • "verifiedAt": "2019-08-24T14:15:22Z",
  • "updatedBy": {
    },
  • "metaData": { },
  • "type": "loanTermsAgreementOnly"
}