OCR failed

Implement the forms.ocr_failed webhook to know when OCR fails for uploaded documents.

The forms.ocr_failed webhook notifies your system when data retrieval through OCR has failed for uploaded documents.

📘

This webhook triggers when OCR has failed for all documents within an upload form. This refers to documents manually uploaded by your user through the Document upload flow. The metadata field of each failed document returns an ocr_data.error object with the specific type of error. Consult the OCR data fields page for more information about possible error types.

Event

forms.ocr_completed

Payload


account string uuid

ID of the account for which OCR was attempted on a form.


user string uuid

ID of the user the account belongs to.


form string uuid

ID of the form for which OCR has failed.


curl -X POST https://api.argyle.com/v1/webhooks \
  -u api_key_id:api_key_secret \
  -H "Content-Type: application/json" \
  -d '{"events": ["forms.ocr_failed"],
       "secret": "<secret for signature verification>",
         "name": "OCR has failed",
          "url": "https://webhook.site/url"}'
{
  "event": "forms.ocr_failed",
  "name": "OCR has failed",
  "data": {
    "account": "ada143be-3c90-4534-b7ea-9899674dc6e0",
    "user": "3823026e-a964-45f6-b201-6b8c096b30d3",
    "document": "4334r6e-a964-45eef6-b201-64464"
  }
}