Borrower Events

The structure of the webhook events related to borrowers.

Overview of DigiFi Borrower Events

The borrower events deliver instant notifications to your external applications when specific events occur related to borrowers. These events include "borrower.created," "borrower.updated," and "borrower.deleted."

📘

Data Structure (Variables)

DigiFi enables customers to define custom variables to create a unique data structure. Therefore, the structure of the "variables" section of the events will differ by organization. The example below contains a basic set of variables for illustrative purposes.


Borrower Created

The "borrower.created" event occurs when a borrower is created, either manually on the platform or via APIs. The event data has the following structure:

{
    "eventId": "8ac656a8347f43e1b0e0707fee",
    "eventType": "borrower.created",
    "data": {
        "object": {
            "id": "061d7d7c5b6d41ea9c883e555",
            "type": "person",
            "organizationId": "b7987c0f3b5a431daca87aaa",
            "variables": {
                "borrower_first_name": "John",
                "borrower_email": "[email protected]",
                "borrower_personal_id_number": "999999999",
                "borrower_home_address": {
                    "street_number": "123",
                    "street_name": "Street",
                    "unit_number": "1",
                    "city": "San Francisco",
                    "state_or_province": "CA",
                    "zip_or_postal_code": "12345",
                    "country": "United States"
                },
                "borrower_last_name": "Doe",
                "borrower_phone": "+1234567890",
                "borrower_date_of_birth": "06/29/1991"
            },
            "testing": true,
            "createdAt": "2023-05-16T17:45:52.907Z",
            "updatedAt": "2023-05-16T17:45:52.907Z",
            "createdBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "updatedBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "locked": false
        }
    },
    "createdAt": "2023-05-16T17:45:53.160Z"
}

Borrower Updated

The "borrower.updated" event occurs when a borrower is updated, either manually on the platform or via APIs. The event data has the following structure:

{
    "eventId": "61d5ad475f34465ca8ae355175",
    "eventType": "borrower.updated",
    "data": {
        "object": {
            "id": "061d7d7c5b6d41ea9c883e555",
            "type": "person",
            "organizationId": "b7987c0f3b5a431daca87aaa",
            "variables": {
                "borrower_first_name": "John",
                "borrower_email": "[email protected]",
                "borrower_personal_id_number": "999999999",
                "borrower_home_address": {
                    "street_number": "123",
                    "street_name": "Street",
                    "unit_number": "1",
                    "city": "San Francisco",
                    "state_or_province": "CA",
                    "zip_or_postal_code": "12345",
                    "country": "United States"
                },
                "borrower_last_name": "Doe",
                "borrower_phone": "+1111111111",
                "borrower_date_of_birth": "06/29/1991"
            },
            "testing": true,
            "createdAt": "2023-05-16T17:45:52.907Z",
            "updatedAt": "2023-05-16T17:45:52.907Z",
            "createdBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "updatedBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "locked": false
        },
        "previousObject": {
            "id": "061d7d7c5b6d41ea9c883e555",
            "type": "person",
            "organizationId": "b7987c0f3b5a431daca87aaa",
            "variables": {
                "borrower_first_name": "John",
                "borrower_email": "[email protected]",
                "borrower_personal_id_number": "999999999",
                "borrower_home_address": {
                    "street_number": "123",
                    "street_name": "Street",
                    "unit_number": "1",
                    "city": "San Francisco",
                    "state_or_province": "CA",
                    "zip_or_postal_code": "12345",
                    "country": "United States"
                },
                "borrower_last_name": "Doe",
                "borrower_phone": "+1234567890",
                "borrower_date_of_birth": "06/29/1991"
            },
            "testing": true,
            "createdAt": "2023-05-16T17:45:52.907Z",
            "updatedAt": "2023-05-16T17:45:52.907Z",
            "createdBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "updatedBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "locked": false
        }
    },
    "createdAt": "2023-05-19T12:52:02.861Z"
}

Borrower Deleted

The "borrower.deleted" event occurs when a borrower is deleted, either manually on the platform or via APIs. The event data has the following structure:

{
    "eventId": "1ce474df1ce1440b8be2b675ff",
    "eventType": "borrower.deleted",
    "data": {
        "object": {
            "id": "061d7d7c5b6d41ea9c883e555",
            "type": "person",
            "organizationId": "b7987c0f3b5a431daca87aaa",
            "variables": {
                "borrower_first_name": "John",
                "borrower_email": "[email protected]",
                "borrower_personal_id_number": "999999999",
                "borrower_home_address": {
                    "street_number": "123",
                    "street_name": "Street",
                    "unit_number": "1",
                    "city": "San Francisco",
                    "state_or_province": "CA",
                    "zip_or_postal_code": "12345",
                    "country": "United States"
                },
                "borrower_last_name": "Doe",
                "borrower_phone": "+1234567890",
                "borrower_date_of_birth": "06/29/1991"
            },
            "testing": true,
            "createdAt": "2023-05-16T17:45:52.907Z",
            "updatedAt": "2023-05-16T17:45:52.907Z",
            "createdBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "updatedBy": {
                "id": "facba4a34dd144b7910aecbd",
                "firstName": "Team",
                "lastName": "Member",
                "email": "[email protected]",
                "phone": "*********0000",
                "isMfaEnabled": true,
                "isEmailVerified": true,
                "avatarParams": {
                    "originalFileName": "image.png",
                    "canvasHeight": 600,
                    "canvasWidth": 400,
                    "cropRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "imageRect": {
                        "height": 268.52367688022287,
                        "width": 268.52367688022287,
                        "x": 171.33813714582607,
                        "y": 65.73816155988857
                    },
                    "id": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
                },
                "notificationBlacklist": [],
                "avatarId": "229f293a-7nj6-78n-noma-8e095eaf9f2c-184669daa710184669daa7100010a8c0b6d-41d2e493-7nh5-6bnj-6754-7d66a64f5e36"
            },
            "locked": false
        }
    },
    "createdAt": "2023-05-16T17:45:53.160Z"
}