Skip to content

Convert document to the specified format

Request

Security
oauth2(Required scopes: document:create) or bearerAuth or apiKeyHeader
Path
personIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

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

documentDescriptorIdstring(AnyId)^ext-|^[A-Z][A-Z0-9]-[A-Z0-9]+-[A-Z0-9]+|^\d+$write-onlyrequired

The document descriptor identifier.

Query
formatstringrequired

The document output format.

Value:"pdf"
signboolean

Sign after conversion.

deleteSourceboolean

When true, set deletedAt on the source document to the current time. This prevents it from appearing in future get documents requests.

Default:false
POST
/people/{personId}/documents/{documentDescriptorId}/convert
curl -i -X POST \
  'https://sandboxapi.peach.finance/api/people/{personId}/documents/{documentDescriptorId}/convert?format=pdf&sign=true&deleteSource=false' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
createdAtstring, (date-time)read-only
deletedAtstring or null, (date-time)read-only
idstringread-only
updatedAtstring or null, (date-time)read-only
externalIdstring or null, [ 1 .. 200 ] 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=ABCDE and NOT ext-ABCDE when creating the object.

archivedboolean

Set to true if the document has been archived.

Default:false
autogeneratedboolean 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.

contentIdstring, (uuid)read-only

The document content identifier. Use this identifier to get the document content.

contentLengthinteger, >= 0read-only

The document content length in bytes.

contentTypestringread-only

The document content type. For example, PDF or JPEG.

conversionSourceIdstringread-only

The original document identifier that was used as a source for conversion to a specific format.

descriptionstring

The description for the document. Normally displayed in UI.

evidenceIdstring or null

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

fileNamestring

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.

isHumanBorrowerUploadbooleanread-only

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.

loanIdstring or null

The loan identifier that the documents belongs to.

metaDataobject or null(MetaData)

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

personIdstringread-only

The borrower's identifier that the documents belongs to.

rejectionReasonstring

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

sensitiveDataboolean

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.

statusstring(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"
templateVersionIdstring or null

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

updatedByobject or null(UserActionInfo)read-only

Details of the user who last updated the document. Can be an borrower, agent, or automated system process.

uploadedAtstring or null, (date-time)read-only
uploadedByobject or null(UserActionInfo)read-only

Details of the user responsible for uploading the document. Can be an borrower, agent, or automated system process.

verifiedAtstring or null, (date-time)read-only
verifiedByobject or null(UserActionInfo)read-only

Details of the user responsible for verifing the document. Can be an agent or automated system process.

typestring(DocumentType)

The document type.

Enum:"loanTermsAgreementOnly""loanTILDisclosureOnly""loanTermsAndTILCombined""loanTermsChangeAgreement""loanAutopayAgreement""loanStatement""loanSettlementAgreement""privacyPolicyLender""privacyPolicyServicer""termsOfServiceLender"
Response
{ "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" }