HomeGuidesAPI ReferenceChangelogDiscussions
GuidesAPI ReferenceDiscussions

Export Documents

Overview

The following sections will cover document retrieval from a loan in Blend through our Public API.

For instructions on loan data retrieval from Blend, please refer to the Export a Home Loan reference.

Endpoints

Blend users access loan documents and application packages via the "Docs" tab of Blend's user interface. They can download individual documents or complete application packages.
These loans/id/documents and documents/documentId endpoints allow your integration to perform the same actions programmatically.

loans/id/documents returns a list of available documents for a particular loan. documents/documentsId allow you to fetch an individual loan document.

  • GET loans/id/documents - Used to get a JSON object of all documents associated with a Blend loan
  • GET documents/documentId - Used to fetch a single document from a Blend loan by its ID
1015

1. Get the list of documents associated with the loan

This request generates a list of documents associated with a Blend loan file. The action is similar to a user viewing the available documents in the "Docs" tab of the Blend user interface.

Example request:

curl -X GET \
https://api.beta.blendlabs.com/loans/{{LOANID}}/documents \
-H 'authorization: {{YOUR AUTH TOKEN}}' \
-H 'blend-api-version: 1.3.0' \
-H 'cache-control: no-cache' \
-H 'blend-target-instance: {{YOUR BLEND DEPLOYMENT}}~{{YOUR SPECIAL ID}}' \

Example response:

{
  "documents": [
    {
      "id": "6243ab35-6d78-41bd-8264-a1a050fc6907",
      "losLoanId": "test",
      "type": "HMDA_REPORT",
      "loanId": "8b290fb0-2ce9-4fda-bb81-4c2ae5099980",
      "name": "Andrews, Hansen - HMDA Report - hmda_report - 061318 52623pm ",
      "downloadUrl": "https://blend-borrower-   elliemae.beta.blendlabs.com/v1/documents/6243ab35-6d78-41bd-8264-a1a050fc6907",
      "created": 1528910785440,
      "borrowerIds": [
        "2c4b7ad1-8e6b-4cc2-bff9-331ac818969f",
        "9b4b81b7-3228-403c-a5c6-34407cef6b15"
      ],
      "losExportedAt": 1529692839539
    },
    {
      "id": "edf4f862-2189-43ab-8ea8-49ee94222cbf",
      "losType": "Blend Compliance Report",
      "losLoanId": "test",
      "type": "COMPLIANCE_REPORT",
      "loanId": "8b290fb0-2ce9-4fda-bb81-4c2ae5099980",
      "name": "Andrews, Hansen - Compliance Report - 061318 52624pm ",
      "downloadUrl": "https://blend-borrower-elliemae.beta.blendlabs.com/v1/documents/edf4f862-2189-43ab-8ea8-49ee94222cbf",
      "created": 1528910786635,
      "borrowerIds": [
        "2c4b7ad1-8e6b-4cc2-bff9-331ac818969f",
        "9b4b81b7-3228-403c-a5c6-34407cef6b15"
      ],
      "losExportedAt": null
    }
  ]
}

Considerations for already downloaded documents:

In the GET loans/id/documents request, Blend will return a "losExportedAt" value. This "losExportedAt" value can be queried in your response since the endpoint will have one of the following values:

  • null - the document was never exported
  • timestamp - this will indicate when the document was last fetched

Example: https://api.beta.blendlabs.com/loans/[LOANID]/documents?losExportedAt=null

To further filter your results:

losExportedAt=true: only includes documents exported by any API user such as a Public API user or Encompass Partnership API user

losExportedAt=false: only includes documents exported by any basic auth user

2. Download a document file

This request will allow you to fetch a individual document by a single documentId value.

Example request:

curl -X GET \
https://api.beta.blendlabs.com/documents/{{documentId}} \
-H 'authorization: {{YOUR AUTH TOKEN}}' \
-H 'blend-api-version: 2.0.0' \
-H 'cache-control: no-cache' \
-H 'Content-Type: application/json' \
-H 'blend-target-instance: {{YOUR BLEND DEPLOYMENT}}~{{YOUR SPECIAL ID}}' \

Response:

The document file will be returned to your server.

FAQS

What types of documents are available in Blend?

Download CSV of Doc Type Definitions

What formats of documents 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. Currently, The Blend API accepts documents in PDF format. Please convert all docs before programmatically sending them to Blend.