When using the Treefort API, you will have the option of setting up a webhook, where Treefort will send real-time updates on files, clients, and ID verification requests to your webhook URL endpoint. This section describes how to configure your webhook to accept Treefort updates.
Setting up your webhook
You will need to ensure your webhook is configured with the following specifications:
Accept: application/json or text/plain
Type: HttpPost
Please Note:
-
You will need to provide Treefort with your webhook URL endpoint and media type (application/json or text/plain) once it has been set up.
-
Treefort does not check any response returned from the webhook.
-
Treefort will send the request encrypted and signed. Decrypt the request in the same way as other API methods.
-
The webhook will need to accept the request payload as a body parameter, an example of which is shown below:
{
"fileReferenceId": "string",
"clientRequestId": "string",
"requesterReferenceId": "string",
"requesterClientRequestId": "string",
"eventId": integer,
"event": "string"
}
Body Parameters
The following table details the body parameters that will be sent in the request payload to the webhook URL endpoint.
Attribute | Type | Description |
---|---|---|
fileReferenceId | String | The unique reference ID created by Treefort for internal purposes. This ID is used to track all ID verifications associated with this request (i.e. all ID verifications associated to a file), and can be provided to Treefort for troubleshooting purposes. Note: this attribute will be null if the eventId does not begin with a 1 (e.g. 1XX). Event IDs are outlined later in this section. |
clientRequestId | String | The unique reference ID created by Treefort for internal purposes. This ID is used to track the ID verification request associated with only this client, and can be provided to Treefort for troubleshooting purposes. Note: this attribute will be null if the eventId does not begin with a 2 or 3 (e.g. 2XX or 3XX). Event IDs are outlined later in this section. |
requesterReferenceId | String | The reference ID created by your organization and associated with this fileReferenceId is returned. Note: this attribute will be null if the eventId does not begin with a 1 (e.g. 1XX). Event IDs are outlined later in this section. |
requesterClientRequestId | String | The unique reference ID created by your organization is returned. This ID is used to track the ID verification associated with only this client. Note: this attribute will be null if the eventId does not begin with a 2 or 3 (e.g. 2XX or 3XX). Event IDs are outlined later in this section. |
eventId | Integer | The unique ID associated with the event returned. A list of all event IDs and their default descriptions are outlined later in this section. |
event | String | The description associated with the eventId. A list of all event IDs and their default descriptions are outlined later in this section. |
Event IDs and Descriptions
Below is a list of all event IDs and their default descriptions. Note: the description for each Event ID can be customized for your organization.
Events in the 1XX range correspond to events associated with a particular file.
Events in the 2XX and 3XX range correspond to events associated with a particular ID verification request.
Event ID | Default Description |
---|---|
101 | File has been created. |
102 | File has been cancelled. |
103 | File has been closed. |
201 | Verification request has been created. |
202 | Verification request has been updated. |
203 | Verification request has been sent. |
204 | Verification request has been cancelled. |
205 | Verification request has been completed. |
206 | Verification report has been set to review. |
207 | Verification report has been verified. |
208 | Verification report has been expired. |
209 | Verification report has been rejected. |
210 | Verification request been re-initialized. |
211 | Verification link has been resent. |
301 | Verification report has been downloaded. |