Webhooks
Qvalia delivers platform events to your server through HTTPS POST requests.
Partners can configure webhooks for their own accounts. They can also configure child accounts using /partner/{partnerRegNo}/account/{accountRegNo}/webhook/... which scopes the subscription to a single account.
A partner can thus have a single webhook subscription on their Partner account, or multiple per child accounts.
The first PUT creates it and returns a generated webhook id (a UUID v4); subsequent PUT requests update the same subscription (its url and/or types). Use the returned id with the /partner/{partnerRegNo}/webhook/{webhookId}/auth endpoints to attach outbound authentication.
Event types
new_document— sent when a new inbound document is received or created for an account.document_delivery— sent when an outbound document's delivery status changes.document_error— sent when a document's delivery fails, or an error occurs during processing.
Scope
This subscription receives events for every account your partner account can receive. Use /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure to scope the subscription to a single account.
Delivery (webhook usage)
Events are delivered as HTTP POST requests with JSON bodies to the configured url.
Delivery is at-least-once: on an internal retry (or if the same document is published by more than one upstream producer) you may occasionally receive the same event more than once. Design your endpoint to be idempotent. Deliveries for the same underlying event are identical except for status.updatedAt, so dedupe on the combination of eventType + globalTransactionId + status.status.
If configured, outbound authentication is applied as request headers or token body on every delivery. See /partner/{partnerRegNo}/webhook/{webhookId}/auth.
Each delivery is a single flat JSON object — the top-level event fields (eventType, accountRegNo, documentType, direction, integrationId, occurredAt) plus document-specific detail (documentId, globalTransactionId, status, error, peppol_metadata) on the same level.
status.event reflects the internal event that triggered the webhook and is always one of message-log/create / message-log/update / message-log/error — a 1:1 mapping onto the top-level eventType. status.status, by contrast, is a free-text delivery status reported by the upstream delivery channel (Peppol, email, print, …) and is not a fixed enum and may change.
Delivered payload
Each delivery is a JSON object. Samples provided below:
new_document:
document_delivery — a status transition on a document already announced via new_document; documentId is often absent at this stage:
ERROR events may be recoverable!
Depending on your account configuration, Peppol or another document retry mechanism may deliver the document after an error event.
An error event is triggered on the first error occurrence. In a delivery retry scheme, the document may be delivered later. You then receive a document_delivery event for the same transaction.
Do not retry a delivery error until the retry period is exhausted (24 hours by default).
document_error — delivery failed; error carries a human-readable reason:
Last updated
Was this helpful?

