SmartDocumentor
  • Overview
    • SmartDocumentor
  • GETTING STARTED
    • About SmartDocumentor
    • How SmartDocumentor Works
    • Main concepts
      • Workspaces
      • Organization
    • Quickstart 101
    • Licenses
      • How to Buy?
      • Support
    • Privacy
    • Security
  • Technical
    • Initial Setup
    • Mappings
    • API Reference
      • [POST] Client Credentials Access Token
      • [GET] Task Status
      • [GET] Task Status List
      • [GET] Task Status List Paginated
      • [GET] Get Workspaces
      • [PATCH] Reprocess Task
      • [POST] Create Task
      • [POST] Create Batch
      • [GET] Get Batch
      • [GET] Get Batch Paginated
      • Transcripts
        • Speakers
          • Workspaces
            • [GET] Workspace Speakers
            • [PUT] Workspace Speakers
          • Tasks
            • [GET] Task Speakers
            • [POST] Task Speaker
            • [PUT] Task Speaker
            • [DELETE] Task Speaker
      • Invite Users
        • [GET] List Available Roles
        • Tenants
          • [GET] List All Tenant Users
          • [POST] Invite Users
        • Workspaces
          • [GET] List All Workspace Users
          • [POST] Invite Users
    • Folder Worker
    • Export
      • Webhooks
        • Webhook (Text Documents)
        • Webhook (Transcripts)
        • Webhook Url To File (Transcripts)
        • Webhook Url to File (Anonymization)
    • Changelog
  • FAQs
    • FAQs
Powered by GitBook
On this page
  1. Technical
  2. Export
  3. Webhooks

Webhook (Text Documents)

PreviousWebhooksNextWebhook (Transcripts)

Last updated 24 days ago

POST{{your_url}}/your-path

This particular configuration is available in all workspaces that deal with text documents, such as Invoices, Receipts, Custom and Layout.

The notification sends all OCR and metadata captured by SmartDocumentor, correctly reviewed and validated by your users or through automated processes.

This export configuration is not available in Anonymization workspaces, since the exported artifact there is the actual anonymized file.

The following options are available:

  • Endpoint: a publicly available URL where SmartDocumentor can send notifications to. Notifications are sent as HTTP POST requests, with a JSON body.

  • Simplified Export: when enabled, SmartDocumentor sends a simplified model that contains key information, such as detected values, QR Codes and Tables. When disabled, SmartDocumentor sends all metadata, including bounding boxes and auditing information.

Example Request

{
    "taskId": 0,
    "originalFileUrl": "string", // Nullable
    "workspaceId": 0,    
    "displayName": "string",
    "description": "string", // nullable
    "taskNumber": 1, // nullable
    "batchId": 1, // nullable
    "totalPages": 0,
    "lastCheckoutByUserName": "string", // nullable
    "lastCheckedOutBy": 0, // nullable
    "lastCheckedOutUntil": "2023-02-28T13:48:31.410Z", // nullable
    "chunks": [
        {
            "entities": [
                {
                    "addedOn": "2023-02-28T13:48:31.410Z", // nullable
                    "addedBy": 0,  // nullable
                    "addedByExternal": "string",  // nullable
                    "editedOn": "2023-02-28T13:48:31.410Z",  // nullable
                    "viewerEditedOn": "2023-02-28T13:48:31.410Z",  // nullable
                    "editedBy": 0,  // nullable
                    "editedByExternal": "string",  // nullable
                    "integratedOn": "2023-02-28T13:48:31.410Z",  // nullable
                    "integratedBy": 0,  // nullable
                    "integratedByExternal": "string",  // nullable
                    "integrationFailedReason": "string",  // nullable
                    "integrationFailedReasonDetailed": "string",  // nullable
                    "markedAsSolved": true,  // nullable
                    "notDetected": true,  // nullable
                    "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                    "type": "string",
                    "category": "string",
                    "groupName": "string",  // nullable
                    "pageNumber": 0,
                    "chunkNumber": 0,
                    "customFormValues": "object",  // nullable
                    "qrCode": {
                        "boundingBox": {  // nullable
                            "height": 0, // double
                            "width": 0, // double
                            "left": 0, // double
                            "bottom": 0, // double
                            "x": 0, // double
                            "y": 0, // double
                            "right": 0, // double
                            "top": 0 // double
                        },
                        "points": [  // nullable
                            {
                                "x": 0, // double
                                "y": 0 // double
                            }
                        ],
                        "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                        "spans": [  // nullable
                            {
                                "offset": 0, // double
                                "length": 0 // double
                            }
                        ],
                        "keyValues": [  // nullable
                            {
                                "boundingBox": {  // nullable
                                    "height": 0, // double
                                    "width": 0, // double
                                    "left": 0, // double
                                    "bottom": 0, // double
                                    "x": 0, // double
                                    "y": 0, // double
                                    "right": 0, // double
                                    "top": 0 // double
                                },
                                "points": [  // nullable
                                    {
                                        "x": 0, // double
                                        "y": 0 // double
                                    }
                                ],
                                "confidence": 0,
                                "spans": [  // nullable
                                    {
                                        "offset": 0,
                                        "length": 0
                                    }
                                ],
                                "pageNumber": 0, // nullable
                                "category": "string",
                                "categoryNormalized": "string",  // nullable
                                "content": "string",
                                "contentNormalized": "string",
                                "childTemporaryId": "string"
                            }
                        ],
                        "qrCodeContent": "raw extracted QR code content" // nullable
                    },
                    "table": {
                        "boundingBox": {  // nullable
                            "height": 0, // double
                            "width": 0, // double
                            "left": 0, // double
                            "bottom": 0, // double
                            "x": 0, // double
                            "y": 0, // double
                            "right": 0, // double
                            "top": 0 // double
                        },
                        "points": [  // nullable
                            {
                                "x": 0, // double
                                "y": 0 // double
                            }
                        ],
                        "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                        "spans": [  // nullable
                            {
                                "offset": 0,
                                "length": 0
                            }
                        ],
                        "rowCount": 0,
                        "columnCount": 0,
                        "tableHeaders": [
                            {
                                "boundingBox": {  // nullable
                                    "height": 0, // double
                                    "width": 0, // double
                                    "left": 0, // double
                                    "bottom": 0, // double
                                    "x": 0, // double
                                    "y": 0, // double
                                    "right": 0, // double
                                    "top": 0 // double
                                },
                                "points": [  // nullable
                                    {
                                        "x": 0, // double
                                        "y": 0 // double
                                    }
                                ],
                                "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                                "spans": [  // nullable
                                    {
                                        "offset": 0,
                                        "length": 0
                                    }
                                ],
                                "rowIndex": 0,
                                "columnIndex": 0,
                                "content": "string",
                                "contentNormalized": "string",
                                "category": "string",
                                "categoryNormalized": "string",  // nullable
                                "pageNumber": 0 // nullable
                            }
                        ],
                        "tableRows": { // A dictionary, where key is the row index, and value is an object as described below
                            "0": [  // The row index, as a string
                                {
                                    "boundingBox": {  // nullable
                                        "height": 0, // double
                                        "width": 0, // double
                                        "left": 0, // double
                                        "bottom": 0, // double
                                        "x": 0, // double
                                        "y": 0, // double
                                        "right": 0, // double
                                        "top": 0 // double
                                    },
                                    "points": [  // nullable
                                        {
                                            "x": 0, // double
                                            "y": 0 // double
                                        }
                                    ],
                                    "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                                    "spans": [  // nullable
                                        {
                                            "offset": 0,
                                            "length": 0
                                        }
                                    ],
                                    "rowIndex": 0,
                                    "columnIndex": 0,
                                    "content": "string",
                                    "contentNormalized": "string"
                                }
                            ]
                        },
                        "tableRowsTableContent": { // nullable. The raw string content of each table row. A dictionary where the key is the row index, as a string, and the value is the row content, also as a string
                            "0": "string"
                        },
                        "hasAlternativeHeaders": false // nullable
                    },
                    "keyValues": [ // nullable
                        {
                            "boundingBox": { // nullable
                                "height": 0, // double
                                "width": 0, // double
                                "left": 0, // double
                                "bottom": 0, // double
                                "x": 0, // double
                                "y": 0, // double
                                "right": 0, // double
                                "top": 0 // double
                            },
                            "points": [ // nullable
                                {
                                    "x": 0, // double
                                    "y": 0 // double
                                }
                            ],
                            "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                            "spans": [ // nullable
                                {
                                    "offset": 0,
                                    "length": 0
                                }
                            ],
                            "pageNumber": 0, // nullable
                            "category": "string",
                            "categoryNormalized": "string", // nullable
                            "content": "string",
                            "contentNormalized": "string"
                        }
                    ]
                }
            ],
            "version": "string",
            "retrievedOn": "2023-02-28T13:48:31.410Z", // nullable
            "lastModifiedBy": 0, // nullable
            "lastModifiedByExternal": "string", // nullable
            "lastModifiedOn": "2023-02-28T13:48:31.410Z", // nullable
            "averageConfidence": 0.95 // float, varies from 0 (0%) to 1 (100%)
        }
    ],
    "lastIntegratedBy": 0, // nullable
    "lastIntegratedByUserName": "string", // nullable
    "lastIntegratedOn": "2023-02-28T13:48:31.410Z", // nullable
    "averageConfidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
    "metadata": { // has any number of key/value pairs
        "Key_1": "Value_1" // strings non nullable, key will be unique throughout the metafields
    }
}
{
    "taskId": 0,
    "originalFileUrl": "string", // nullable
    "workspaceId": 0,
    "displayName": "string",
    "description": "string", // nullable
    "taskNumber": 1, // nullable
    "batchId": 1, // nullable
    "totalPages": 0,
    "lastCheckoutByUserName": "string", // nullable
    "lastCheckedOutBy": 0, // nullable
    "lastCheckedOutUntil": "2023-02-28T13:45:26.100Z", // nullable
    "pages": [
        {
            "entities": [
                {
                    "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                    "category": "string",
                    "content": "string",
                    "pageNumber": 0,
                    "table": { // nullable
                        "rowCount": 0,
                        "columnCount": 0,
                        "tableHeaders": [
                            {
                                "columnIndex": 0,
                                "category": "string",
                                "confidence": 0.95 // float, varies from 0 (0%) to 1 (100%)
                            }
                        ],
                        "tableRows": { // A dictionary, where key is the row index, and value is an object as described below
                            "0": [ // The row index, as a string
                                {
                                    "rowIndex": 0,
                                    "columnIndex": 0,
                                    "content": "string",
                                    "confidence": 0.95 // float, varies from 0 (0%) to 1 (100%)
                                }
                            ]
                        }
                    },
                    "qrCode": { // nullable
                        "keyValues": [ // nullable
                            {
                                "category": "string",
                                "confidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
                                "content": "string"
                            }
                        ]
                    }
                }
            ],
            "averageConfidence": 0
        }
    ],
    "lastIntegratedBy": 0, // nullable
    "lastIntegratedByUserName": "string", // nullable
    "lastIntegratedOn": "2023-02-28T13:45:26.100Z", // nullable
    "averageConfidence": 0.95, // float, varies from 0 (0%) to 1 (100%)
    "metaFields": { // has any number of key/value pairs
        "Key_1": "Value_1" // strings non nullable, key will be unique throughout the metafields
    }
}

originalFileUrl contains a SAS token secured URL, pointing to the original upload of your file. This URL has the following characteristics:

  • If the document is deleted either manually or when the maximum retention date is reached, future requests to this URL will return 404 Not Found.

  • Once the URL expires, requests will return 403 Forbidden.

When working with an automatically split document, all document properties, including taskId, originalFileUrl, displayName, taskNumber and totalPages will be set for the originally split document.

If you need positioning information, always prefer using the points array instead of the boundingBox object, as it works best with all page angles. Points are always declared counter-clockwise, from bottom left, to bottom right, top right and top left.

Note: the childTemporaryId field is a temporary, always random GUID that is not consistent across multiple exports of the same file. Keep this in mind if using this value to uniquely identify a field.

Unless otherwise stated, numeric values are integers.

It is only set if the "Delete document files after finishing review" setting is disabled in the screen, otherwise its null

The URL will expire after a default maximum of 180 days. You can configure this value by setting "Days until deletion of documents in archive" in the screen.

Workspace - Advanced Settings
Workspace - Advanced Settings