External Processing API (Compliance)

Documents processed by Compliance offer an option for additional processing by a 3rd-party or custom service through a simple HTTP request.

To configure the processing for a document, create a new Compliance Group, add a requirement, and a document to check within that requirement. In the document setup panel, look for the External Processing URL at the bottom:

Then, every time a document is submitted by a worker, your endpoint will be triggered with a payload containing information about the worker, the file, the fields and their content, what has been manually edited, whether the document is about to be auto approved by the system, etc.

{
    "storedFileUuid": "4472d723-4bc3-4fc1-b201-a722652aafc8",
    "complianceCheckTypeMatches": true,
    "glareFree": true,
    "inFocus": true,
    "aiConfidenceLevel": 0.96,
    "manuallyEdited": true,
    "fields": [
        {
            "key": "name",
            "label": "Name",
            "value": "John Doe Corp",
            "dataType": "string",
            "manuallyEdited": false
        },
        {
            "key": "dateOfIssue",
            "label": "Date of Issue",
            "value": "2018-08-10",
            "dataType": "date",
            "manuallyEdited": false
        },
        {
            "key": "siren",
            "label": "SIREN",
            "value": "815983828",
            "dataType": "string",
            "manuallyEdited": true
        }
    ],
    "submittedAt": "2024-08-15T14:33:57.401Z",
    "submittedByType": "worker",
    "submittedBy": "82226cb3-4e32-4d60-b6c7-ed65d6915c9d",
    "workerUuid": "82226cb3-4e32-4d60-b6c7-ed65d6915c9d",
    "complianceGroupUuid": "91bbf6ca-2a06-44b9-b8c4-0edd9a7e0b83",
    "workerComplianceGroupUuid": "b40c6907-8270-4e88-906b-6b9f7e1a38e0",
    "isAutoApproved": false
}

Your endpoint has 3 seconds to respond with the following payload (any other value will be ignored). If your endpoint takes more than 3 secondes to respond, processing will continue as planned. Calls will not be retried. All response fields are optional: if a field is not specified, it will be ignored. If both forceAutoApprove and forceManualReview are set to true, forceManualReview will prevail.

{
	// make any update to the fields detected by the system
  "fields": [
      {
          "key": "name",
          "label": "Name",
          "value": "Uber Eats",
          "dataType": "string",
          "manuallyEdited": false
      },
      {
          "key": "dateOfIssue",
          "label": "Date of Issue",
          "value": "2018-08-10",
          "dataType": "date",
          "manuallyEdited": false
      },
      {
          "key": "siren",
          "label": "SIREN",
          "value": "841983828",
          "dataType": "string",
          "manuallyEdited": true
      }
  ],
  "forceAutoApprove": true, // override any other decision by the system and approve the document automatically
  "forceManualReview": true // override any other decision by the system (even `forceAutoApprove`) and force the file to be manually reviewed
}