Set up webhooks to get notifications when an event has occurred in Affinda.
Event Name | Description |
---|---|
document.parse.completed | Document has completed parsing, the parsing may have succeeded or failed |
document.parse.succeeded | Document parsing has succeeded |
document.parse.failed | Document parsing has failed |
document.validate.completed | Document has been validated |
document.classify.completed | Document has completed classifying, the classification may have succeeded or failed |
document.classify.succeeded | Document classification has succeeded |
document.classify.failed | Document classification has failed |
document.rejected | Document has been rejected (automatically or by a user) |
Event Name | Description |
---|---|
resume.parse.completed | Resume has completed parsing, the parsing may have succeeded or failed |
resume.parse.succeeded | Resume parsing has succeeded |
resume.parse.failed | Resume parsing has failed |
invoice.parse.completed | Invoice has completed parsing, the parsing may have succeeded or failed |
X-Hook-Secret
header. The receiver should respond to this request with a 200 status code, and then activate the subscription using the X-Hook-Secret
as below
X-Hook-Signature
of the following format: <timestamp>.<signature>
.
To verify the webhook payload, sign the request body with the Signature Key you set up in the previous step using SHA256, then compare the resulting signature with the signature found in the X-Hook-Signature header. Only process the data if the signatures match!
Confirm payload timestamp is within a short range of current time to prevent replay attacks.
Example code