API ReferenceWebhooks
Document Reviewed Event
Webhook event fired when all rows in a document are accepted after human review.
The DOCUMENT_REVIEWED event fires when all rows in a document are marked as accepted, confirming that the document processing workflow is complete and the data is ready for use.
When It Triggers
- All rows accepted -- When every extracted data row for a document is marked as accepted (no pending rows remain)
- Human review complete -- Confirms that reviewers have validated and approved the extracted data
This event fires after using the submit-corrections API endpoint or accepting rows through the UI.
Payload Structure
Response200
{
"eventId": "evt_reviewed_456",
"eventType": "DOCUMENT_REVIEWED",
"timestamp": "2024-01-15T10:45:30Z",
"organizationId": "org_xyz789",
"deploymentId": "dep_123abc",
"extractionSchemaId": "schema_456def",
"fileId": "file_789ghi",
"jobId": null,
"data": {
"status": "reviewed",
"acceptedRowsCount": 15,
"totalRowsCount": 15
}
}Payload Fields
| Field | Type | Description |
|---|---|---|
eventId | string | Unique event identifier. Use for idempotency. |
eventType | string | Always "DOCUMENT_REVIEWED" |
timestamp | ISO 8601 | When the review was completed (UTC) |
organizationId | string | Your organization identifier |
deploymentId | string | The deployment that processed this document |
extractionSchemaId | string | The extraction schema used |
fileId | string | The reviewed file identifier |
jobId | null | Always null for review events |
data.status | "reviewed" | Always "reviewed" |
data.acceptedRowsCount | number | Number of accepted rows (equals totalRowsCount) |
data.totalRowsCount | number | Total number of rows in the document |
Handling the Event
function handleDocumentReviewed(event) {
const { eventId, fileId, extractionSchemaId, data } = event
console.log(`Document ${fileId} review completed`)
console.log(`Accepted rows: ${data.acceptedRowsCount}/${data.totalRowsCount}`)
fetchFileData(fileId).then(fileData => {
exportToDownstreamSystems(fileData)
notifyStakeholders(fileId, "COMPLETED")
})
}Retrieving Reviewed Data
The webhook payload contains metadata only. To get the final reviewed data, call the get-file-data endpoint using the fileId from the payload.