The structure of the webhook events related to documents.
Overview of DigiFi Document Events
The document events deliver instant notifications to your external applications when specific events occur related to documents. These events include "document.created," "document.updated," and "document.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.
Document Created
The "document.created" event occurs when a document is uploaded, either manually on the platform or via APIs. The event data has the following structure:
{
"eventId": "6e21ac551f4e4fc98016f6",
"eventType": "document.created",
"data": {
"object": {
"id": "a004e5cff00e4fabb4b9b9c82",
"type": "file",
"parentId": null,
"name": "document.pdf",
"organizationId": "f944360392f04567a84a8cf83",
"testing": true,
"extension": "pdf",
"size": 147254,
"createdBy": {
"id": "07d04a054b414eecbede139fe",
"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": "07d04a054b414eecbede139fe",
"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"
},
"createdAt": "2023-05-19T13:32:27.169Z",
"updatedAt": "2023-05-19T13:32:27.169Z",
"applicationId": "7bf7ac1c0bc941199b08b2638",
"accessPermissions": [
{
"entityId": "cd31ca31d1534ac7a0c8109b1e",
"entityType": "intermediary",
"accessGranted": false
}
]
}
},
"createdAt": "2023-05-19T13:32:27.174Z"
}
Document Updated
The "document.updated" event occurs when a document is updated, either manually on the platform or via APIs. The event data has the following structure:
{
"eventId": "64677af99907baa5ed806a10",
"eventType": "document.updated",
"data": {
"previousObject": {
"id": "a004e5cff00e4fabb4b9b9c82",
"type": "file",
"parentId": null,
"name": "document.pdf",
"organizationId": "f944360392f04567a84a8cf83",
"testing": true,
"extension": "pdf",
"size": 147254,
"createdBy": {
"id": "07d04a054b414eecbede139fe",
"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": "07d04a054b414eecbede139fe",
"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"
},
"createdAt": "2023-05-19T13:32:27.169Z",
"updatedAt": "2023-05-19T13:32:27.169Z",
"applicationId": "7bf7ac1c0bc941199b08b2638",
"accessPermissions": [
{
"entityId": "cd31ca31d1534ac7a0c8109b1e",
"entityType": "intermediary",
"accessGranted": false
}
]
},
"object": {
"id": "a004e5cff00e4fabb4b9b9c82",
"type": "file",
"parentId": null,
"name": "example.pdf",
"organizationId": "f944360392f04567a84a8cf83",
"testing": true,
"extension": "pdf",
"size": 147254,
"createdBy": {
"id": "07d04a054b414eecbede139fe",
"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": "07d04a054b414eecbede139fe",
"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"
},
"createdAt": "2023-05-19T13:32:27.169Z",
"updatedAt": "2023-05-19T13:32:27.169Z",
"applicationId": "7bf7ac1c0bc941199b08b2638",
"accessPermissions": [
{
"entityId": "cd31ca31d1534ac7a0c8109b1e",
"entityType": "intermediary",
"accessGranted": false
}
]
}
},
"createdAt": "2023-05-19T13:34:49.549Z"
}
Document Deleted
The "document.deleted" event occurs when a document is deleted, either manually on the platform or via APIs. The event data has the following structure:
{
"eventId": "08cf1a7906cb4e9faab3a8181",
"eventType": "document.deleted",
"data": {
"object": {
"object": {
"id": "a004e5cff00e4fabb4b9b9c82",
"type": "file",
"parentId": null,
"name": "document.pdf",
"organizationId": "f944360392f04567a84a8cf83",
"testing": true,
"extension": "pdf",
"size": 147254,
"createdBy": {
"id": "07d04a054b414eecbede139fe",
"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": "07d04a054b414eecbede139fe",
"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"
},
"createdAt": "2023-05-19T13:32:27.169Z",
"updatedAt": "2023-05-19T13:32:27.169Z",
"applicationId": "7bf7ac1c0bc941199b08b2638",
"accessPermissions": [
{
"entityId": "cd31ca31d1534ac7a0c8109b1e",
"entityType": "intermediary",
"accessGranted": false
}
]
}
},
"createdAt": "2023-05-19T13:32:27.174Z"
}