Webhooks
This tool finishes after its response, so the result is delivered to the webhook URL registered on the key that started the run. Nothing needs to be polled.
Webhooks
| Event | Description |
|---|---|
docwise.completed | Every requested step finished on every document. |
docwise.partial | Some documents or steps finished and others didn't. Read the session for which — the results that did arrive are kept, and charged for. |
docwise.failed | Nothing could be processed. |
| Header | Description |
|---|---|
X-Kriyam-Signature |
|
Verify a delivery
import hashlib, hmac
# Hash the raw request body, never a re-serialised copy of it.
t, v1 = (p.split('=', 1)[1] for p in request.headers['X-Kriyam-Signature'].split(','))
expected = hmac.new(SECRET.encode(), f'{t}.'.encode() + raw_body, hashlib.sha256).hexdigest()
assert hmac.compare_digest(expected, v1)