- Document objects are added. This happens when the API finds and retrieves documents from a newly-created user account, or when it finds new documents during periodic scanning.
- Document objects are updated. Periodic scans detect when a document object is updated with new information.
- Document objects are removed. This happens when the user or their employer deletes the documents from a payroll account and the Argyle API does not find them during a periodic scan of the account, or when the user or their employer deletes the payroll account that holds the documents.
- Data extraction has completed for a payroll document scanned by Argyle from a connected account.
- Data extraction has failed for a payroll document scanned by Argyle from a connected account.
Added
POST/v1/webhooks
Implement the documents.added webhook to know when a document object is added.
- Document objects are added when the API finds and retrieves documents from a newly-created user account, or when it finds new documents during periodic scanning.
Request body
Webhook message
name(string, optional): Name used for the webhook subscription.data(object, optional)account(string (uuid), optional): ID of the account.user(string (uuid), optional): ID of the user.document(string (uuid), optional): ID of the document.
- curl
- python
Updated
POST/v1/webhooks
Implement the documents.updated webhook to know when a document object is updated.
- Document objects are updated through periodic scanning.
Request body
Webhook message
name(string, optional): Name used for the webhook subscription.data(object, optional)account(string (uuid), optional): ID of the account.user(string (uuid), optional): ID of the user.document(string (uuid), optional): ID of the document.
- curl
- python
Removed
POST/v1/webhooks
Implement the documents.removed webhook to know when a document object is removed.
Document objects are removed when:
- The user or their employer deletes the documents from a payroll account and the Argyle API does not find them during a periodic scan of the account.
- The user or their employer deletes the payroll account that holds the documents.
Request body
Webhook message
name(string, optional): Name used for the webhook subscription.data(object, optional)account(string (uuid), optional): ID of the account.user(string (uuid), optional): ID of the user.document(string (uuid), optional): ID of the document.
- curl
- python
OCR completed
POST/v1/webhooks
Implement the documents.ocr_completed webhook to know when OCR is completed for scanned documents.
- The
documents.ocr_completedwebhook notifies your system when data retrieval through OCR is completed for a document scanned by Argyle from a connected account. - Use this webhook to get updates when OCR is completed for documents that are initially scanned from a newly connected account, or when OCR is completed for documents that are added or updated through periodic scanning.
The payload provided by this webhook does not include the actual metadata contents of the document. You can request this through the
/documents endpoint, by calling GET /documents/{id} with the document ID received in the documents.ocr_completed webhook. For more information, refer to the OCR Data fields page.Request body
Webhook message
name(string, optional): Name used for the webhook subscription.data(object, optional)account(string (uuid), optional): ID of the account.user(string (uuid), optional): ID of the user.document(string (uuid), optional): ID of the document.
- curl
- python
OCR failed
POST/v1/webhooks
Implement the documents.ocr_failed webhook to know when OCR fails for a scanned document.
- The
documents.ocr_failedwebhook notifies your system when data retrieval through OCR has failed for a document scanned by Argyle from a connected account. - If OCR fails, the scanned document’s
metadatafield returns anocr_dataobject with the specific type oferror. Consult OCR data fields for more information about possible error types.
Request body
Webhook message
name(string, optional): Name used for the webhook subscription.data(object, optional)account(string (uuid), optional): ID of the account.user(string (uuid), optional): ID of the user.document(string (uuid), optional): ID of the document.
- curl
- python