Integrate with Borrower Preview Events

When documents for a closing are ready for borrowers to preview, Snapdocs Connect broadcasts a message to the webhook listener that you set up for those events. After receiving the message, you can call our APIs to retrieve the borrower information and the secure token that you can use to construct and document preview link to provide to the borrower. Snapdocs Connect will send a subsequent webhook notification to inform you that the preview has been completed after the borrower previews the document.

Borrower Preview Subscription Events

Subscription EventSubscription Event Description
borrower.preview_availableClosing documents are available for a borrower to preview.
borrower.preview_completeA borrower has previewed closing documents.
borrower.redraw_preview_availableRedraw documents are available for a borrower to preview.

Step 1: Create a webhook listener
Create a webhook listener (or HTTP API) to receive the borrower.preview_available and borrower.preview_complete events from Snapdocs Connect. You’ll use the URL as the listener webhook_url in the next step.

Note: Make sure to configure the webhook to respond to events with a 200 response. Otherwise, Snapdocs will attempt to redeliver the webhook event. See Subscriptions and Webhooks for more information.

Step 2: Subscribe to the borrower preview events
Make a POST request to the Create a subscription endpoint to register the webhook URL and the borrower.preview_available and borrower.preview_complete events.
A notification will be sent to the webhook listener using this subscription when the uploaded documents for the closing are ready for borrowers to preview or when the borrower has previewed.

Step 3: Handle the event payload
Write custom application code to process the response to receiving the borrower.preview_available event, which is triggered when closing documents are ready to be previewed. For example, enable a button in the POS to allow the borrowers to access the documents for preview.

Here’s an example of a borrower.preview_available webhook message from Snapdocs Connect:

{
	"event_id": "48a2cbcb-a88b-4e8c-a867-07fb6bd5aled",
	"closing_uuid": "9262a37e-85b9-27d8-8622-da463e58b49b",
	"event_name": "borrower.preview_available",
	"created_at": 1638416525,
	"payload": {
		"external identifiers": [{
			"external_system": "other_los",
			"external_type": "loan_guid",
			"value": "1234"
		}],
		"borrower_uuid": "767542da-3b5e-628e-b9bd-284d97a3b6e9"
	}
}

After the borrower previews the document, you will receive another notification that the borrower.preview_completed event occurred.

Multiple Borrowers

When multiple borrowers are present, Snapdocs notifies you about each borrower’s preview activity. You can identify the borrower in question using the provided borrower_uuid in the message. This enables you to provide relevant updates to each borrower so they can proceed to their next steps.

Constructing the Document Preview Access Link

Call the Get a list of Borrower Document Statuses endpoint to retrieve a unique access_token to construct a URL that directs the borrower to preview their document.

After retrieving the access_token, plug it into the URLs below to create a preview link.

Demo Environment
https://app.cs-demo0.snpd.io/secure_access?secure_token=<access_token>&act=preview&redirect_url=<POS dashboard URL>

Production Environment
https://app.snapdocs.com/secure_access?secure_token=<access_token>&act=preview&redirect_url=<POS dashboard URL>

Redirect the Borrower to your Dashboard
The &redirect_url=<POS dashboard URL> at the end of the URL brings the borrower back to your dashboard, or any other desired page upon completion of their previewing of the documents. Clicking the back button in the upper left hand corner of the preview screen will send them to the redirect_url provided and log them out of Snapdocs.