The following sections will show you how to export loan data and borrower information out of Blend using the Blend public API. This will also include knowing when to export a loan, how to export the loan, and how to update the Blend loan status during/after the export has taken place.
Note: Refer to the Export Documents reference for instructions on Document retrieval from Blend.
Endpoints
There will be two primary endpoints and methods used during the export process. The exact information and how it will be retrieved will be specified in the endpoint.
- GET /loans - Loan endpoint
- POST /export-status - Loan export status
Know when to Export a loan
Blend will update the status of a loan whenever it's exportable. We recommend you use the GET /loans endpoint to see which loans meet your criteria for being exported.
What does Blend consider an 'exportable' loan in this case?
- The borrower(s) submits their application in Blend
- A user in Blend clicks 'Export' in the loan's Overview page
- TRID triggered (if applicable)
Examples:
- /loans?exportable=true&losId-exists=false
- Provides a list of loans that are exportable from Blend and do not have a returned LOS key/id
- /loans?exportable=true&losId=false&cursor=biwxNTIzMDI3NzIxNzY2LDBiZTg3ZWU0LTZkODAtNDViNi04YjNhLWVkMTg0NmNlZjYzZA
- Allows you to paginate to next list of loans. There is a limit of 50 results per page.
Export Loan Data From Blend
Blend facilitates getting a borrower's application in two formats. Primarily, the loan information will be contained in the Fannie Mae v3.2 but we also have additional fields populated in Blend's interpretation of the MISMO v3.3.1 in XML.
The endpoints for these files are as follows:
- Fannie Mae 3.2 endpoint
- MISMO 3.3.1
- https://api.beta.blendlabs.com/loans/{{Blend_UUID_Here}}format=mismo&version=3.3.1
Note: Send your request to Blend's API for your desired file type (Fannie Mae or MISMO)
How to retrieve loan data from Blend:
- Example:
curl -X GET \
'https://api.beta.blendlabs.com/loans/8b290fb0-2ce9-4fda-bb81-4c2ae5099980?format=fannie&version=3.2' \
-H 'authorization: {{YOUR AUTH TOKEN}}' \
-H 'blend-api-version: 1.3.0' \
-H 'cache-control: no-cache' \
-H 'x-blend-deployment: {{YOUR BLEND DEPLOYMENT}}' \
-H 'x-blend-special-instance-id: {{SPECIAL DEPLOYMENT ID IF NEEDED}}'
-
The file sent to you will be encoded in raw Base64
- Decode the response
- Sample in JavaScript:
-
var fannieMae = {{insert encoded Base64 Fannie Mae response from Blend}};
var decoded = window.atob(fannieMae);console.log('decoded');
- Parse the file into your LOS
- For Fannie Mae 3.2
- Blend recommends that you use any parsing utility that may come with your LOS since most of them will accommodate the Fannie Mae 3.2 file. We also recommend that you rely on the Fannie Mae 3.2 spec for full guidance.
- For Mismo 3.3.1
- We follow the standard MISMO 3.3.1 version
- You will need to convert the XML file into a format that you can use to access Blend-specific fields
- Blend uses an amalgamation of the original 3.3.1 spec & Blend's own interpretation & custom fields - so refer to Blend's description as the final source of truth for MISMO 3.3.1
- In the future, Blend will be producing documentation specifically for the MISMO. Specific Blend/MISMO questions should be directed to support@blend.com
- For Fannie Mae 3.2
Update a loan's export status in Blend
The Blend API allows for loan export statuses to be updated in Blend. This will be done by using the /loans/id/export-status endpoint.
What statuses are supported?
- FAILED, IN_PROGRESS, SUCCESS
Why is this important?
Updating an application's export status helps a few things depending on the status issued.
- FAILED - lets the user know their application didn't export as expected and to try again
- IN_PROGRESS - halts any changes made to the loan in Blend until the export attempted as finished
- SUCCESS - lets the user know that their loan has been exported successfully to the LOS and can be viewed
Request Example:
curl -X POST \
https://api.beta.blendlabs.com/loans/8b290fb0-2ce9-4fda-bb81-4c2ae5099980/export-status \
-H 'Authorization: Basic {{AUTH}}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-Blend-Deployment: {{Deployment}}' \
-H 'X-blend-special-instance-id: {{Special Instance}}' \
-H 'blend-api-version: 1.3.0' \
-d '{
"status":"FAILED",
"reason":"I wanted it to fail!"
}'
Response example:
{
"status": "FAILED",
"reason": "I wanted it to fail!"
}
Upon response, the status in Blend will update in the loan's Application page.
Should any export 'reason' be provided, it will appear under the status.
What should you do when a loan export succeeds?
We recommend that you return a LOS primary key to Blend after a successful loan export. This can be accomplished by PATCHing the /loan/id endpoint.
Example request:
curl -X PATCH \
https://api.beta.blendlabs.com/loans/8b290fb0-2ce9-4fda-bb81-4c2ae5099980 \
-H 'Authorization: Basic {{AUTH TOKEN}}' \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-H 'X-Blend-Deployment: {{DEPLOYMENT}}' \
-H 'X-blend-special-instance-id: {{SPECIAL INSTANCE ID}}' \
-H 'blend-api-version: 1.3.0' \
-d '{
"losId": "test"
}'
The successful response will return a 200, and update the losId in Blend. This is visible in the loan's Application page along with the Activity page.
Application tab
Activity
DISCLAIMER: All mentioned features on this page may not be applicable to your institution, please reach out to (support@blend.com) for more information on what features are enabled for your use.
Comments
0 comments
Please sign in to leave a comment.