Export Documents
Overview
This guide will explain how to retrieve general documents from Blend via our Public API.
For instructions on retrieving the mortgage application files specifically, see Export a Home Lending Application
Routes
Blend Employee users access application-associated documents via the "Docs" tab in the individual loan application's view.

These the following routes allow your integration to perform the same actions programmatically.
- GET home-lending/applications/id/documents - Get a list of all documents associated with a Blend application
- GET documents/id - Download a single document from a Blend its Document ID
- PATCH documents/id - Update the status of a document
- GET documents/id/export-statuses - Retrieve a history of all exports for any individual document
Prerequisite: Determine which documents to download
Throughout the lifecycle of an application in Blend, many documents can be added from different sources and workflows -- be it a borrower party uploading a doc, a partner integration filing a report on the application, or finalized signed copies of e-sign documents being retrieved post-follow-up . completion.
There are two ways for your external integration to determine when new documents are available:
- Use the GET home-lending/applications/id/documents route to get a list of available documents on a specific application
- . Be integrated with Blend's webhook event notifications and receive a document event
GET home-lending/applications/id/documents - Request
At any time, an integration can get a list of documents that is are associated with a specific application.
curl -X GET \
'https://api.beta.blendlabs.com/home-lending/applications/id/documents' \
-H '[Required Blend Headers - See the Quick Start Guide: https://developers.blend.com/blend/docs]'\
GET home-lending/applications/id/documents - Response
Usually, the most relevant pieces of information for determining if you need to export a document are:
- created: This is the timestamp when the document was added to Blend. If this timestamp has occurred since the last time your downloaded documents for this application, you likely need to grab these docs
- type: ENUM describing the type of document. If you are a partner that only needs some documents for your integration, only credit documents or only identity documents for example, you can use the type to identify the subset of documents that are relevant to you.
- lastExportedAt: This field shows the last time any integration with Blend logged this document as having been exported. If this field is 'null', then an export has never been recorded for this document. When this field is not 'null' it can be used, along with the additional export information available via GET documents/id/export-statuses, to help reconcile between systems when something has gone wrong, or in more complicated integration scenarios. This will be discussed in more detail in later steps.
{
"documents":[
0:{
"id":"0b947fc5-91da-4cc1-b333-ead29e7df086"
"type":""
"name":""
"downloadUrl":"https://blend-borrower-2.beta.blendlabs.com/documents/0b947fc5-91da-4cc1-b333-ead29e7df086"
"created":"2019-10-30T14:52:36.591Z"
"lastExportedAt":NULL
"applicationId":"cdcdf304-de30-4b8e-bc92-453663e1a596"
"partyIds":[
0:"a0001012-64e0-4689-94d3-47d869c7d804"
]
}
]
}
GET documents/id/export-statuses - Request
If you want to specifically understand what system the document was last exported to, or when it was last exported to your system, specifically, you can use the more detailed GET documents/id/export-statuses route to retrieve additional information about exports.
curl -X GET \
'https://api.beta.blendlabs.com/document/id/export-statuses' \
-H '[Required Blend Headers - See the Quick Start Guide: https://developers.blend.com/blend/docs]'\
GET documents/id/export-statuses - Response
{
"exportStatuses":[
0:{
"exportedAt":"2019-09-19T00:24:41.927Z"
"exportedBy":"30c0df13-a9bb-4163-a96e-9be4703af945"
"partnerId":""
"exportedTo":""
}
]
}
1. Download a document file
This request will allow you to download an individual document's file.
Note that the URL you need to make this request is included directly in the GET response above as the field "downloadUrl".
GET documents/id - Request
curl -X GET \
'https://api.beta.blendlabs.com/documents/id' \
-H '[Required Blend Headers - See the Quick Start Guide: https://developers.blend.com/blend/docs]'
GET documents/id - Response
The document file will be returned to your server.
2. Mark a Document as Exported
Once you have successfully read the document file into your external system, you will want to officially mark it as exported from Blend.
PATCH documents/id - Request
curl -X PATCH \
'https://api.beta.blendlabs.com/documents/id' \
-H '[Required Blend Headers - See the Quick Start Guide: https://developers.blend.com/blend/docs]'
- d '{
"exportedTime":"2019-10-31T00:24:41.927Z",
"losId":""
}'
FAQS
What types of documents are available in Blend?
Download CSV of Doc Type Definitions
What documents file formats can I upload via the API?
The Blend user interface accepts many document file formats and will attempt to convert them to PDFs at the time of upload.
HOWEVER, please note that currently, the Blend API ONLY accepts documents in PDF format. Please convert all documents to PDF before programmatically sending them to Blend.
Updated about 2 years ago