> For the complete documentation index, see [llms.txt](https://api.qvalia.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://api.qvalia.io/api-documentation/apis/partner-api/webhook-api.md). Agents can also search and read this documentation through its [MCP server](https://api.qvalia.io/~gitbook/mcp).

# Webhook API

Operations related to Web hooks

## Get Webhook Configuration

> An API to fetch (GET) the webhook subscription for your Partner account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.\
> A partner-level subscription covers the partner's own account \*\*only\*\*, not its\
> children. To receive a child's events, either list the child in this subscription's\
> \`includeChildAccounts\`, which subscribes several children in one call with this\
> subscription's \`url\`, \`types\` and signing secret, or subscribe to that one child with\
> \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> A partner's subscription to a child is separate from the child's own subscription\
> (neither can see or change the other's), and an event for the child is delivered to\
> both, with the same \`eventId\`. It delivers only while the partner may act for the\
> child (the child's \`parentAccount\` is the partner and the partner holds the\
> \`webhook\` scope), which is checked on every delivery.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"responses":{"WebhookConfigureFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"authType":{"type":"string","nullable":true,"enum":["oauth","api_key","basic"]},"signing":{"type":"object","nullable":true,"description":"Signing state for this subscription, or `null` when deliveries are\nunsigned. This block carries ids and dates only, never a secret value.","properties":{"algorithm":{"type":"string","enum":["hmac-sha256"]},"secrets":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSigningSecretInfo"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"inheritedFrom":{"type":"string","description":"Present on a child account whose subscription follows its Partner's.\nAbsent once it has been configured directly, which detaches it."},"includeChildAccounts":{"type":"array","description":"The child accounts configured on this Partner subscription. Partner's\nown subscription only.","items":{"type":"string"}},"childAccounts":{"type":"array","description":"What each listed account actually looks like right now. Partner's own\nsubscription only.\n\n- `inherited` — following this subscription.\n- `detached` — configured directly since, and no longer following it.\n  Send `inheritedFrom` on that account to re-attach it.\n- `missing` — listed, but has no subscription. Send the list again to\n  put it back.","items":{"type":"object","properties":{"accountRegNo":{"type":"string"},"webhookId":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["inherited","detached","missing"]}}}}}}}}}}},"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"WebhookSigningSecretInfo":{"type":"object","description":"A signing secret on a subscription, described without its value. Secrets are\nstored encrypted and are only ever shown once, when issued.","properties":{"id":{"type":"string","description":"Identifier for the secret. Not itself a secret."},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"When this secret stops verifying. `null` for the current secret, which does\nnot expire; a date on a secret being rotated away from."},"active":{"type":"boolean","description":"Whether the secret is still used to sign deliveries."}}},"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/configure":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Configuration","description":"An API to fetch (GET) the webhook subscription for your Partner account.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.\nA partner-level subscription covers the partner's own account **only**, not its\nchildren. To receive a child's events, either list the child in this subscription's\n`includeChildAccounts`, which subscribes several children in one call with this\nsubscription's `url`, `types` and signing secret, or subscribe to that one child with\n`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nA partner's subscription to a child is separate from the child's own subscription\n(neither can see or change the other's), and an event for the child is delivered to\nboth, with the same `eventId`. It delivers only while the partner may act for the\nchild (the child's `parentAccount` is the partner and the partner holds the\n`webhook` scope), which is checked on every delivery.","operationId":"partner/get-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Configure Webhook

> An API to create or update (PUT) the webhook subscription for your Partner\
> account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.\
> A partner-level subscription covers the partner's own account \*\*only\*\*, not its\
> children. To receive a child's events, either list the child in this subscription's\
> \`includeChildAccounts\`, which subscribes several children in one call with this\
> subscription's \`url\`, \`types\` and signing secret, or subscribe to that one child with\
> \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> A partner's subscription to a child is separate from the child's own subscription\
> (neither can see or change the other's), and an event for the child is delivered to\
> both, with the same \`eventId\`. It delivers only while the partner may act for the\
> child (the child's \`parentAccount\` is the partner and the partner holds the\
> \`webhook\` scope), which is checked on every delivery.\
> \
> A partner has a single webhook subscription. 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.\
> \
> A \`PUT\` that creates the subscription returns a \`signingSecret\` in clear text in\
> that response only. Store it; see \`/partner/{partnerRegNo}/webhook/{webhookId}/secret\`\
> to rotate it or to obtain one for an older subscription.\
> \
> \### Event types\
> \
> \- \`new\_document\` — sent when a new document is received/created for an account.\
> \- \`document\_delivery\` — sent when a document's delivery status changes.\
> \- \`document\_delayed\` — sent when a delivery is being retried and has not finished.\
> \- \`document\_error\` — sent when a document's delivery fails.\
> \
> Registration events, sent to partners only (see the Webhooks page):\
> \
> \- \`peppol\_id\_registered\`, \`peppol\_id\_updated\`, \`peppol\_id\_deregistered\` — an account's Peppol ID is registered in the Peppol network, changed, or removed from it.\
> \- \`ae\_fta\_registered\`, \`ae\_fta\_updated\`, \`ae\_fta\_deregistered\` — the UAE FTA accepts an account's registration with Qvalia as its provider, a re-verification, or its offboarding.\
> \- \`sk\_fssr\_registered\` — a company that selected you in the Slovak FS SR portal is registered, with its account and Peppol ID.\
> \
> On your own subscription (\`/partner/{partnerRegNo}/webhook/configure\`) they are sent for every one of your child accounts. A subscription for one child that lists the type receives that child's events instead, so an event is never delivered twice.\
> \
> \### Delivery (webhook usage)\
> \
> Events are delivered as an HTTP \`POST\` with a JSON body to the configured \`url\`\
> (which must be \`https\`). Your endpoint should respond with a \`2xx\` status code;\
> the delivery request times out after 10 seconds. If outbound authentication is\
> configured (see \`/partner/{partnerRegNo}/webhook/{webhookId}/auth\`) it is applied\
> as request headers on every delivery. The delivered payload is described by the\
> \`webhookEvent\` callback below.\
> \
> Every delivery carries \`X-Qvalia-Event-Id\`, and \`X-Qvalia-Signature\` once the\
> subscription has a signing secret — see\
> \`/partner/{partnerRegNo}/webhook/{webhookId}/secret\`.\
> \
> \*\*Delivery is best-effort — it is neither at-least-once nor at-most-once.\*\*\
> Both duplicates and losses are possible, so plan for each:\
> \
> \- \*\*Duplicates.\*\* The same event may arrive more than once. Make your endpoint\
> &#x20; idempotent and dedupe on \`eventId\`, which is identical across redeliveries of\
> &#x20; the same event; do not dedupe on the whole body, which differs in\
> &#x20; \`status.updatedAt\`.\
> \- \*\*Losses.\*\* A failed delivery — non-2xx, timeout or unreachable — is recorded\
> &#x20; against the document but \*\*not retried\*\*. Fetch a missed event again, for up to\
> &#x20; 30 days, with \`GET /partner/{partnerRegNo}/webhook/{eventId}\`.\
> \
> Webhooks therefore cannot be your only source of truth: keep polling the\
> Transaction API as a safety net. Signing and \`eventId\` deduplication make a\
> delivery you receive trustworthy; neither makes delivery guaranteed.\
> \
> \### Delivered payload\
> \
> Each delivery is a single flat JSON object: the event fields (\`eventType\`,\
> \`accountRegNo\`, \`documentType\`, \`direction\`, \`integrationId\`, \`occurredAt\`) and\
> the document detail (\`documentId\`, \`globalTransactionId\`, \`status\`, \`error\`,\
> \`peppol\_metadata\`) on the same level. Full schema in the \`webhookEvent\` callback\
> below.\
> \
> \`new\_document\`:\
> \
> \`\`\`json\
> {\
> &#x20; "eventId": "4d1c9f84-3a2b-5c6d-9e0f-1a2b3c4d5e6f",\
> &#x20; "eventType": "new\_document",\
> &#x20; "accountRegNo": "SE5560004755",\
> &#x20; "documentType": "Invoice",\
> &#x20; "direction": "outgoing",\
> &#x20; "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "occurredAt": "2026-08-19T09:25:36.512Z",\
> &#x20; "documentId": "123456-INV",\
> &#x20; "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "status": {\
> &#x20;   "event": "message-log/create",\
> &#x20;   "deliveryMethod": "peppol",\
> &#x20;   "updatedAt": "2026-08-19T09:25:37.228Z"\
> &#x20; },\
> &#x20; "peppol\_metadata": {\
> &#x20;   "messageId": "9cab8ba5-d2a4-45d0-842d-8ede91dcac9f\@QVALIA-PSE000094",\
> &#x20;   "accessPoint": "PSE000094",\
> &#x20;   "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",\
> &#x20;   "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",\
> &#x20;   "exchangeDateTime": "2026-08-19T09:25:34.226Z"\
> &#x20; }\
> }\
> \`\`\`\
> \
> \`document\_delivery\` — a status transition on a document already announced via\
> \`new\_document\`; \`documentId\` is often absent at this stage:\
> \
> \`\`\`json\
> {\
> &#x20; "eventId": "8b3e1a07-6c5d-5e4f-9a2b-7c8d9e0f1a2b",\
> &#x20; "eventType": "document\_delivery",\
> &#x20; "accountRegNo": "SE5560004755",\
> &#x20; "documentType": "Invoice",\
> &#x20; "direction": "outgoing",\
> &#x20; "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "occurredAt": "2026-08-19T09:26:10.104Z",\
> &#x20; "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "status": {\
> &#x20;   "status": "processed",\
> &#x20;   "event": "message-log/update",\
> &#x20;   "deliveryMethod": "peppol",\
> &#x20;   "updatedAt": "2026-08-19T09:26:09.881Z"\
> &#x20; },\
> &#x20; "peppol\_metadata": {\
> &#x20;   "messageId": "9cab8ba5-d2a4-45d0-842d-8ede91dcac9f\@QVALIA-PSE000094",\
> &#x20;   "accessPoint": "PSE000094",\
> &#x20;   "docTypeId": "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1",\
> &#x20;   "processId": "urn:fdc:peppol.eu:2017:poacc:billing:01:1.0",\
> &#x20;   "exchangeDateTime": "2026-08-19T09:25:34.226Z"\
> &#x20; }\
> }\
> \`\`\`\
> \
> \`document\_error\` — delivery failed; \`error\` carries a human-readable reason:\
> \
> \`\`\`json\
> {\
> &#x20; "eventId": "c71f2d93-4e8a-5b6c-8d7e-2f3a4b5c6d7e",\
> &#x20; "eventType": "document\_error",\
> &#x20; "accountRegNo": "SE5560004755",\
> &#x20; "documentType": "Invoice",\
> &#x20; "direction": "outgoing",\
> &#x20; "integrationId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "occurredAt": "2026-08-19T09:26:10.104Z",\
> &#x20; "globalTransactionId": "6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4",\
> &#x20; "status": {\
> &#x20;   "status": "error",\
> &#x20;   "event": "message-log/error",\
> &#x20;   "deliveryMethod": "peppol",\
> &#x20;   "updatedAt": "2026-08-19T09:26:09.881Z"\
> &#x20; },\
> &#x20; "error": "Peppol validation failed: invoice does not conform to UBL 2.1",\
> &#x20; "peppol\_metadata": null\
> }\
> \`\`\`

````json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"requestBodies":{"WebhookConfigurePartner":{"description":"Request body for the Partner's OWN subscription.\n\n`includeChildAccounts` is accepted here and nowhere else — this is the\nconfiguration the children inherit.","required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","types"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive webhook events"},"types":{"type":"array","minItems":1,"items":{"type":"string","enum":["new_document","document_delivery","document_delayed","document_error","peppol_id_registered","peppol_id_updated","peppol_id_deregistered","ae_fta_registered","ae_fta_updated","ae_fta_deregistered","sk_fssr_registered"]}},"includeChildAccounts":{"type":"array","maxItems":500,"description":"Child accounts that should receive events on this same subscription,\nwithout configuring each one separately.\n\nEach account listed gets its own subscription carrying this `url`,\nthese `types`, this subscription's signing secret and its\nauthentication — so **one secret verifies every delivery**, and\nrotating it here rotates it for all of them. Each delivery names the\naccount it is about in `accountRegNo`.\n\nThe list is the complete set: an account you remove from it is\nunsubscribed, and `[]` unsubscribes every one that follows this\nsubscription. An account configured directly since (detached, see\n`inheritedFrom`) is not touched by the list and keeps receiving events:\ndelete it with `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`.\nSending the same list again is safe, and repairs anything a previous call\ndid not finish.\n\n**It is a list, not a rule.** A child account created later is not\nsubscribed until you add it here.\n\nEvery account must be a child of this Partner. One that already has a\nwebhook configured by you directly is answered `409` — delete that\nconfiguration, or leave the account out. An account's *own*\nsubscription is not a conflict: it keeps receiving its events\nalongside you.","items":{"type":"string","pattern":"^[A-Za-z]{2}[0-9A-Za-z]+$"}}}}}}}},"responses":{"WebhookConfigureCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"},"signingSecret":{"type":"string","description":"Secret used to sign deliveries to this subscription (HMAC-SHA256).\n\n**Returned only when this `PUT` created the subscription, and only in\nthis one response** — we store it encrypted and cannot show it again.\nStore it now. Lost it, or updating a subscription created before\nsigning existed? Use `POST .../webhook/{webhookId}/secret`."},"signingSecretId":{"type":"string","description":"Identifier for the secret above, for use in support and audit. Not itself a secret."},"signatureAlgorithm":{"type":"string","enum":["hmac-sha256"]},"inheritedFrom":{"type":"string","description":"Present on a child account that follows its Partner's subscription."},"childAccounts":{"type":"array","description":"Present when `includeChildAccounts` was sent: the accounts now\nsubscribed, each with the `webhookId` of its own subscription.","items":{"type":"object","properties":{"accountRegNo":{"type":"string"},"webhookId":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["inherited"]}}}},"removedChildAccounts":{"type":"array","description":"Accounts unsubscribed by this call: ones you took out of the list, and\nones that are no longer your child accounts.","items":{"type":"string"}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"WebhookChildConflict":{"description":"One of the accounts in `includeChildAccounts` already has a webhook\nconfiguration you created for it directly. Delete that configuration, or leave\nthe account out of the list.\n\nAn account's own subscription never causes this — it keeps receiving its events\nalongside yours.\n\nNothing was changed: neither your own subscription nor any child.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}},"WebhookEvent":{"description":"A webhook body, as POSTed to your endpoint, and as `data` in the response of\n`GET .../webhook/{eventId}`.\n\nA registration event (`peppol_id_*`, `ae_fta_*`, `sk_fssr_registered`) is about an\naccount, not a document: it has none of `documentType`, `direction`,\n`integrationId`, `documentId`, `globalTransactionId`, `status` or `peppol_metadata`.","type":"object","required":["eventId","eventType","accountRegNo"],"properties":{"eventId":{"type":"string","format":"uuid","description":"Identifies the event, not the delivery attempt. Derived from the\nevent content, so every redelivery of the same event carries the\nsame value — deduplicate on it. Also sent as the\n`X-Qvalia-Event-Id` header."},"eventType":{"type":"string","enum":["new_document","document_delivery","document_delayed","document_error","peppol_id_registered","peppol_id_updated","peppol_id_deregistered","ae_fta_registered","ae_fta_updated","ae_fta_deregistered","sk_fssr_registered"]},"accountRegNo":{"type":"string","description":"The account the event is about. On a registration event, the account that was registered."},"peppolId":{"type":"string","description":"Registration events only. The Peppol ID the event is about."},"country":{"type":"string","description":"Registration events only. `AE` or `SK` on the tax-authority events and on the Peppol events of an account registered through a tax portal."},"msgTypes":{"type":"array","description":"`peppol_id_registered` and `peppol_id_updated` from the Peppol registration endpoints only. The document types registered, as they were given in the registration.","items":{}},"tin":{"type":"string","description":"`ae_fta_*` only. The UAE TIN."},"entityName":{"type":"string","description":"`ae_fta_*` only. The entity's English name at the FTA."},"reason":{"type":"string","description":"`ae_fta_updated` and `ae_fta_deregistered` only. The reason given for the re-verification or the offboarding."},"dic":{"type":"string","description":"Slovak events only. The company's DIČ."},"legalName":{"type":"string","description":"Slovak events only. The legal name from FS SR."},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (Peppol,\nemail, print, …).\n\nValues currently emitted, and whether each is final:\n\n- `pending` (non-final) — logged; nothing attempted yet. Also the\n  upstream column default.\n- `warning` (non-final) — reopened by a rules-processor reset.\n- `delayed` (non-final) — being retried: a Peppol send still inside\n  its retry window. Another event **will** follow. Not a failure!\n- `processed` (final) — delivered successfully.\n- `processed_with_warning` (final) — delivered, but something about\n  the exchange is worth flagging.\n- `error` (non-final) — delivery failed; the top-level `error` carries\n  the reason. Message resend might follow.\n- *absent* — no status reported for this event. Documents entering\n  through the Public API announce themselves without one.\n\n**To tell a retry from a real failure, branch on this field rather\nthan on the text of `error`:** `delayed` means another attempt is\ncoming, `error` means the send has stopped for good."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.","enum":["message-log/create","message-log/update","message-log/delayed","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `print`, `email`,\n`api`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `postal`,\n`dynamic_routing`. Like `status`, an open set. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail recorded for the document so far — a later status report\ncarries what was stored when the document was sent or received. `null` when\n`status.deliveryMethod` is not `peppol`; `{}` when nothing is known yet, e.g. a\nretry report before any exchange succeeded.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"},"senderPeppolId":{"type":"string","description":"Sender's Peppol participant id."},"receiverPeppolId":{"type":"string","description":"Receiver's Peppol participant id."}}}}}},"callbacks":{"webhookEvent":{"{$request.body#/url}":{"post":{"operationId":"partner/webhook-event-delivery","summary":"Webhook event delivered to your endpoint","description":"Qvalia POSTs this JSON payload to your configured `url` when a subscribed\nevent occurs. Your endpoint should respond with a `2xx` status code; the\nrequest times out after 10 seconds. Any configured outbound authentication\nis applied as request headers.\n\nWhen the subscription has a signing secret, the delivery is also signed —\nsee `POST /partner/{partnerRegNo}/webhook/{webhookId}/secret`.","parameters":[{"name":"X-Qvalia-Event-Id","in":"header","required":true,"description":"Identifies the event, not the delivery attempt: redeliveries of the same\nevent carry the same value. Mirrors `eventId` in the body. Deduplicate on it.","schema":{"type":"string","format":"uuid"}},{"name":"X-Qvalia-Signature","in":"header","required":false,"description":"HMAC-SHA256 signature of the delivered body, in the form\n`t=<unix seconds>,v1=<hex>`. Recompute\n`HMAC-SHA256(secret, \"<t>.<raw body>\")` over the **raw** bytes received\nand compare in constant time. More than one `v1=` part is sent while a\nsecret rotation overlap is open — any one matching is a pass. Ignore\nparts whose prefix you do not recognise. Only sent when the subscription\nhas a signing secret.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Event acknowledged by your endpoint"},"4XX":{"description":"Event not acknowledged by your endpoint"}},"security":[{}]}}}}},"paths":{"/partner/{partnerRegNo}/webhook/configure":{"put":{"tags":["Webhook API"],"summary":"Configure Webhook","description":"An API to create or update (PUT) the webhook subscription for your Partner\naccount.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.\nA partner-level subscription covers the partner's own account **only**, not its\nchildren. To receive a child's events, either list the child in this subscription's\n`includeChildAccounts`, which subscribes several children in one call with this\nsubscription's `url`, `types` and signing secret, or subscribe to that one child with\n`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nA partner's subscription to a child is separate from the child's own subscription\n(neither can see or change the other's), and an event for the child is delivered to\nboth, with the same `eventId`. It delivers only while the partner may act for the\nchild (the child's `parentAccount` is the partner and the partner holds the\n`webhook` scope), which is checked on every delivery.\n\nA partner has a single webhook subscription. The first `PUT` creates it and\nreturns a generated webhook `id` (a UUID v4); subsequent `PUT` requests update\nthe same subscription (its `url` and/or `types`). Use the returned `id` with the\n`/partner/{partnerRegNo}/webhook/{webhookId}/auth` endpoints to attach outbound\nauthentication.\n\nA `PUT` that creates the subscription returns a `signingSecret` in clear text in\nthat response only. Store it; see `/partner/{partnerRegNo}/webhook/{webhookId}/secret`\nto rotate it or to obtain one for an older subscription.\n\n### Event types\n\n- `new_document` — sent when a new document is received/created for an account.\n- `document_delivery` — sent when a document's delivery status changes.\n- `document_delayed` — sent when a delivery is being retried and has not finished.\n- `document_error` — sent when a document's delivery fails.\n\nRegistration events, sent to partners only (see the Webhooks page):\n\n- `peppol_id_registered`, `peppol_id_updated`, `peppol_id_deregistered` — an account's Peppol ID is registered in the Peppol network, changed, or removed from it.\n- `ae_fta_registered`, `ae_fta_updated`, `ae_fta_deregistered` — the UAE FTA accepts an account's registration with Qvalia as its provider, a re-verification, or its offboarding.\n- `sk_fssr_registered` — a company that selected you in the Slovak FS SR portal is registered, with its account and Peppol ID.\n\nOn your own subscription (`/partner/{partnerRegNo}/webhook/configure`) they are sent for every one of your child accounts. A subscription for one child that lists the type receives that child's events instead, so an event is never delivered twice.\n\n### Delivery (webhook usage)\n\nEvents are delivered as an HTTP `POST` with a JSON body to the configured `url`\n(which must be `https`). Your endpoint should respond with a `2xx` status code;\nthe delivery request times out after 10 seconds. If outbound authentication is\nconfigured (see `/partner/{partnerRegNo}/webhook/{webhookId}/auth`) it is applied\nas request headers on every delivery. The delivered payload is described by the\n`webhookEvent` callback below.\n\nEvery delivery carries `X-Qvalia-Event-Id`, and `X-Qvalia-Signature` once the\nsubscription has a signing secret — see\n`/partner/{partnerRegNo}/webhook/{webhookId}/secret`.\n\n**Delivery is best-effort — it is neither at-least-once nor at-most-once.**\nBoth duplicates and losses are possible, so plan for each:\n\n- **Duplicates.** The same event may arrive more than once. Make your endpoint\n  idempotent and dedupe on `eventId`, which is identical across redeliveries of\n  the same event; do not dedupe on the whole body, which differs in\n  `status.updatedAt`.\n- **Losses.** A failed delivery — non-2xx, timeout or unreachable — is recorded\n  against the document but **not retried**. Fetch a missed event again, for up to\n  30 days, with `GET /partner/{partnerRegNo}/webhook/{eventId}`.\n\nWebhooks therefore cannot be your only source of truth: keep polling the\nTransaction API as a safety net. Signing and `eventId` deduplication make a\ndelivery you receive trustworthy; neither makes delivery guaranteed.\n\n### Delivered payload\n\nEach delivery is a single flat JSON object: the event fields (`eventType`,\n`accountRegNo`, `documentType`, `direction`, `integrationId`, `occurredAt`) and\nthe document detail (`documentId`, `globalTransactionId`, `status`, `error`,\n`peppol_metadata`) on the same level. Full schema in the `webhookEvent` callback\nbelow.\n\n`new_document`:\n\n```json\n{\n  \"eventId\": \"4d1c9f84-3a2b-5c6d-9e0f-1a2b3c4d5e6f\",\n  \"eventType\": \"new_document\",\n  \"accountRegNo\": \"SE5560004755\",\n  \"documentType\": \"Invoice\",\n  \"direction\": \"outgoing\",\n  \"integrationId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"occurredAt\": \"2026-08-19T09:25:36.512Z\",\n  \"documentId\": \"123456-INV\",\n  \"globalTransactionId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"status\": {\n    \"event\": \"message-log/create\",\n    \"deliveryMethod\": \"peppol\",\n    \"updatedAt\": \"2026-08-19T09:25:37.228Z\"\n  },\n  \"peppol_metadata\": {\n    \"messageId\": \"9cab8ba5-d2a4-45d0-842d-8ede91dcac9f@QVALIA-PSE000094\",\n    \"accessPoint\": \"PSE000094\",\n    \"docTypeId\": \"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1\",\n    \"processId\": \"urn:fdc:peppol.eu:2017:poacc:billing:01:1.0\",\n    \"exchangeDateTime\": \"2026-08-19T09:25:34.226Z\"\n  }\n}\n```\n\n`document_delivery` — a status transition on a document already announced via\n`new_document`; `documentId` is often absent at this stage:\n\n```json\n{\n  \"eventId\": \"8b3e1a07-6c5d-5e4f-9a2b-7c8d9e0f1a2b\",\n  \"eventType\": \"document_delivery\",\n  \"accountRegNo\": \"SE5560004755\",\n  \"documentType\": \"Invoice\",\n  \"direction\": \"outgoing\",\n  \"integrationId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"occurredAt\": \"2026-08-19T09:26:10.104Z\",\n  \"globalTransactionId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"status\": {\n    \"status\": \"processed\",\n    \"event\": \"message-log/update\",\n    \"deliveryMethod\": \"peppol\",\n    \"updatedAt\": \"2026-08-19T09:26:09.881Z\"\n  },\n  \"peppol_metadata\": {\n    \"messageId\": \"9cab8ba5-d2a4-45d0-842d-8ede91dcac9f@QVALIA-PSE000094\",\n    \"accessPoint\": \"PSE000094\",\n    \"docTypeId\": \"urn:oasis:names:specification:ubl:schema:xsd:Invoice-2::Invoice##urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0::2.1\",\n    \"processId\": \"urn:fdc:peppol.eu:2017:poacc:billing:01:1.0\",\n    \"exchangeDateTime\": \"2026-08-19T09:25:34.226Z\"\n  }\n}\n```\n\n`document_error` — delivery failed; `error` carries a human-readable reason:\n\n```json\n{\n  \"eventId\": \"c71f2d93-4e8a-5b6c-8d7e-2f3a4b5c6d7e\",\n  \"eventType\": \"document_error\",\n  \"accountRegNo\": \"SE5560004755\",\n  \"documentType\": \"Invoice\",\n  \"direction\": \"outgoing\",\n  \"integrationId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"occurredAt\": \"2026-08-19T09:26:10.104Z\",\n  \"globalTransactionId\": \"6b928ef1-fb0d-4b9a-a56f-b5dbca7a0fd4\",\n  \"status\": {\n    \"status\": \"error\",\n    \"event\": \"message-log/error\",\n    \"deliveryMethod\": \"peppol\",\n    \"updatedAt\": \"2026-08-19T09:26:09.881Z\"\n  },\n  \"error\": \"Peppol validation failed: invoice does not conform to UBL 2.1\",\n  \"peppol_metadata\": null\n}\n```","operationId":"partner/put-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookConfigurePartner"},"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureCreated"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"Not a Partner account, or missing the `webhook` scope needed to configure\nchild accounts."},"409":{"$ref":"#/components/responses/WebhookChildConflict"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"callbacks":{"webhookEvent":{"$ref":"#/components/callbacks/webhookEvent"}}}}}}
````

## Delete Webhook Configuration

> An API to DELETE the webhook subscription for your Partner account.\
> \
> This removes the subscription and any attached outbound authentication, and the\
> subscriptions of the child accounts that follow it through \`includeChildAccounts\`.\
> A child account configured directly (detached) keeps its subscription: delete it\
> with \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> The latter is useful if you want to scope the subscription to a single account.\
> A partner-level subscription covers the partner's own account \*\*only\*\*, not its\
> children. To receive a child's events, either list the child in this subscription's\
> \`includeChildAccounts\`, which subscribes several children in one call with this\
> subscription's \`url\`, \`types\` and signing secret, or subscribe to that one child with\
> \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> A partner's subscription to a child is separate from the child's own subscription\
> (neither can see or change the other's), and an event for the child is delivered to\
> both, with the same \`eventId\`. It delivers only while the partner may act for the\
> child (the child's \`parentAccount\` is the partner and the partner holds the\
> \`webhook\` scope), which is checked on every delivery.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"}},"responses":{"WebhookConfigureDeletedPartner":{"description":"OK. The subscription was deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"enabled":{"type":"boolean","description":"Always `false`, as the subscription is gone."},"removedChildAccounts":{"type":"array","description":"Only on `DELETE /partner/{partnerRegNo}/webhook/configure`, and only when there were any: the child\naccounts whose subscriptions came from this one's `includeChildAccounts`, deleted with it.","items":{"type":"string"}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/configure":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Configuration","description":"An API to DELETE the webhook subscription for your Partner account.\n\nThis removes the subscription and any attached outbound authentication, and the\nsubscriptions of the child accounts that follow it through `includeChildAccounts`.\nA child account configured directly (detached) keeps its subscription: delete it\nwith `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nThe latter is useful if you want to scope the subscription to a single account.\nA partner-level subscription covers the partner's own account **only**, not its\nchildren. To receive a child's events, either list the child in this subscription's\n`includeChildAccounts`, which subscribes several children in one call with this\nsubscription's `url`, `types` and signing secret, or subscribe to that one child with\n`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\nA partner's subscription to a child is separate from the child's own subscription\n(neither can see or change the other's), and an event for the child is delivered to\nboth, with the same `eventId`. It delivers only while the partner may act for the\nchild (the child's `parentAccount` is the partner and the partner holds the\n`webhook` scope), which is checked on every delivery.","operationId":"partner/delete-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"}],"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureDeletedPartner"},"204":{"description":"No Content. There is no webhook subscription, so there was nothing to delete."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Configuration for child account

> An API to fetch (GET) the webhook subscription scoped to a single child account\
> under your Partner account.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"WebhookConfigureFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"enabled":{"type":"boolean"},"authType":{"type":"string","nullable":true,"enum":["oauth","api_key","basic"]},"signing":{"type":"object","nullable":true,"description":"Signing state for this subscription, or `null` when deliveries are\nunsigned. This block carries ids and dates only, never a secret value.","properties":{"algorithm":{"type":"string","enum":["hmac-sha256"]},"secrets":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSigningSecretInfo"}}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"inheritedFrom":{"type":"string","description":"Present on a child account whose subscription follows its Partner's.\nAbsent once it has been configured directly, which detaches it."},"includeChildAccounts":{"type":"array","description":"The child accounts configured on this Partner subscription. Partner's\nown subscription only.","items":{"type":"string"}},"childAccounts":{"type":"array","description":"What each listed account actually looks like right now. Partner's own\nsubscription only.\n\n- `inherited` — following this subscription.\n- `detached` — configured directly since, and no longer following it.\n  Send `inheritedFrom` on that account to re-attach it.\n- `missing` — listed, but has no subscription. Send the list again to\n  put it back.","items":{"type":"object","properties":{"accountRegNo":{"type":"string"},"webhookId":{"type":"string","format":"uuid"},"enabled":{"type":"boolean"},"state":{"type":"string","enum":["inherited","detached","missing"]}}}}}}}}}}},"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"WebhookSigningSecretInfo":{"type":"object","description":"A signing secret on a subscription, described without its value. Secrets are\nstored encrypted and are only ever shown once, when issued.","properties":{"id":{"type":"string","description":"Identifier for the secret. Not itself a secret."},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"When this secret stops verifying. `null` for the current secret, which does\nnot expire; a date on a secret being rotated away from."},"active":{"type":"boolean","description":"Whether the secret is still used to sign deliveries."}}},"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Configuration for child account","description":"An API to fetch (GET) the webhook subscription scoped to a single child account\nunder your Partner account.","operationId":"partner/get-account-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Configure Webhook for child account

> An API to create or update (PUT) the webhook subscription scoped to a single\
> child account under your Partner account.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through \`/partner/{partnerRegNo}/webhook/...\`,\
> or their child accounts using this endpoint (scoped to a single account).\
> \
> A partner has a single webhook subscription per account. 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}/account/{accountRegNo}/webhook/{webhookId}/auth\` endpoints\
> to attach outbound authentication.\
> \
> \### Event types\
> \
> \- \`new\_document\` — sent when a new document is received/created for an account.\
> \- \`document\_delivery\` — sent when a document's delivery status changes.\
> \- \`document\_delayed\` — sent when a delivery is being retried and has not finished.\
> \- \`document\_error\` — sent when a document's delivery fails.\
> \
> Registration events, sent to partners only (see the Webhooks page):\
> \
> \- \`peppol\_id\_registered\`, \`peppol\_id\_updated\`, \`peppol\_id\_deregistered\` — an account's Peppol ID is registered in the Peppol network, changed, or removed from it.\
> \- \`ae\_fta\_registered\`, \`ae\_fta\_updated\`, \`ae\_fta\_deregistered\` — the UAE FTA accepts an account's registration with Qvalia as its provider, a re-verification, or its offboarding.\
> \- \`sk\_fssr\_registered\` — a company that selected you in the Slovak FS SR portal is registered, with its account and Peppol ID.\
> \
> On your own subscription (\`/partner/{partnerRegNo}/webhook/configure\`) they are sent for every one of your child accounts. A subscription for one child that lists the type receives that child's events instead, so an event is never delivered twice.\
> \
> \### Delivery (webhook usage)\
> \
> Events are delivered as an HTTP \`POST\` with a JSON body to the configured \`url\`\
> (which must be \`https\`). Your endpoint should respond with a \`2xx\` status code;\
> the delivery request times out after 10 seconds. If outbound authentication is\
> configured (see \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth\`)\
> it is applied as request headers on every delivery. The delivered payload is a\
> single flat JSON object — see the \`webhookEvent\` callback below for the full\
> schema, and \`/partner/{partnerRegNo}/webhook/configure\` above for worked\
> examples of all three event types.\
> \
> Every delivery carries \`X-Qvalia-Event-Id\`, and \`X-Qvalia-Signature\` once the\
> subscription has a signing secret — see\
> \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret\`.\
> \
> Delivery is best-effort: duplicates are possible, and a failed delivery is not\
> retried. A missed event can be fetched again for 30 days with \`GET .../webhook/{eventId}\`,\
> but keep polling the Transaction API\
> as a safety net — see \`/partner/{partnerRegNo}/webhook/configure\` above for details.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"requestBodies":{"WebhookConfigureChild":{"description":"Request body for a child account's subscription, managed by its Partner.","required":true,"content":{"application/json":{"schema":{"type":"object","required":["url","types"],"properties":{"url":{"type":"string","format":"uri","description":"HTTPS endpoint that will receive webhook events"},"types":{"type":"array","minItems":1,"items":{"type":"string","enum":["new_document","document_delivery","document_delayed","document_error","peppol_id_registered","peppol_id_updated","peppol_id_deregistered","ae_fta_registered","ae_fta_updated","ae_fta_deregistered","sk_fssr_registered"]}},"inheritedFrom":{"type":"string","description":"Put this account back under the Partner subscription's configuration.\n\nConfiguring an account here normally **detaches** it: it keeps what you\ngive it and stops following the Partner subscription, so a later change\nto `includeChildAccounts` leaves it alone. Send `inheritedFrom` with\nyour own Partner reg-no to undo that and have it track the Partner\nsubscription again.\n\nIt may only name the Partner that manages this subscription.","pattern":"^[A-Za-z]{2}[0-9A-Za-z]+$"}}}}}}},"responses":{"WebhookConfigureCreated":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"url":{"type":"string"},"types":{"type":"array","items":{"type":"string"}},"accountRegNo":{"type":"string"},"signingSecret":{"type":"string","description":"Secret used to sign deliveries to this subscription (HMAC-SHA256).\n\n**Returned only when this `PUT` created the subscription, and only in\nthis one response** — we store it encrypted and cannot show it again.\nStore it now. Lost it, or updating a subscription created before\nsigning existed? Use `POST .../webhook/{webhookId}/secret`."},"signingSecretId":{"type":"string","description":"Identifier for the secret above, for use in support and audit. Not itself a secret."},"signatureAlgorithm":{"type":"string","enum":["hmac-sha256"]},"inheritedFrom":{"type":"string","description":"Present on a child account that follows its Partner's subscription."},"childAccounts":{"type":"array","description":"Present when `includeChildAccounts` was sent: the accounts now\nsubscribed, each with the `webhookId` of its own subscription.","items":{"type":"object","properties":{"accountRegNo":{"type":"string"},"webhookId":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["inherited"]}}}},"removedChildAccounts":{"type":"array","description":"Accounts unsubscribed by this call: ones you took out of the list, and\nones that are no longer your child accounts.","items":{"type":"string"}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}},"WebhookEvent":{"description":"A webhook body, as POSTed to your endpoint, and as `data` in the response of\n`GET .../webhook/{eventId}`.\n\nA registration event (`peppol_id_*`, `ae_fta_*`, `sk_fssr_registered`) is about an\naccount, not a document: it has none of `documentType`, `direction`,\n`integrationId`, `documentId`, `globalTransactionId`, `status` or `peppol_metadata`.","type":"object","required":["eventId","eventType","accountRegNo"],"properties":{"eventId":{"type":"string","format":"uuid","description":"Identifies the event, not the delivery attempt. Derived from the\nevent content, so every redelivery of the same event carries the\nsame value — deduplicate on it. Also sent as the\n`X-Qvalia-Event-Id` header."},"eventType":{"type":"string","enum":["new_document","document_delivery","document_delayed","document_error","peppol_id_registered","peppol_id_updated","peppol_id_deregistered","ae_fta_registered","ae_fta_updated","ae_fta_deregistered","sk_fssr_registered"]},"accountRegNo":{"type":"string","description":"The account the event is about. On a registration event, the account that was registered."},"peppolId":{"type":"string","description":"Registration events only. The Peppol ID the event is about."},"country":{"type":"string","description":"Registration events only. `AE` or `SK` on the tax-authority events and on the Peppol events of an account registered through a tax portal."},"msgTypes":{"type":"array","description":"`peppol_id_registered` and `peppol_id_updated` from the Peppol registration endpoints only. The document types registered, as they were given in the registration.","items":{}},"tin":{"type":"string","description":"`ae_fta_*` only. The UAE TIN."},"entityName":{"type":"string","description":"`ae_fta_*` only. The entity's English name at the FTA."},"reason":{"type":"string","description":"`ae_fta_updated` and `ae_fta_deregistered` only. The reason given for the re-verification or the offboarding."},"dic":{"type":"string","description":"Slovak events only. The company's DIČ."},"legalName":{"type":"string","description":"Slovak events only. The legal name from FS SR."},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (Peppol,\nemail, print, …).\n\nValues currently emitted, and whether each is final:\n\n- `pending` (non-final) — logged; nothing attempted yet. Also the\n  upstream column default.\n- `warning` (non-final) — reopened by a rules-processor reset.\n- `delayed` (non-final) — being retried: a Peppol send still inside\n  its retry window. Another event **will** follow. Not a failure!\n- `processed` (final) — delivered successfully.\n- `processed_with_warning` (final) — delivered, but something about\n  the exchange is worth flagging.\n- `error` (non-final) — delivery failed; the top-level `error` carries\n  the reason. Message resend might follow.\n- *absent* — no status reported for this event. Documents entering\n  through the Public API announce themselves without one.\n\n**To tell a retry from a real failure, branch on this field rather\nthan on the text of `error`:** `delayed` means another attempt is\ncoming, `error` means the send has stopped for good."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.","enum":["message-log/create","message-log/update","message-log/delayed","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `print`, `email`,\n`api`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `postal`,\n`dynamic_routing`. Like `status`, an open set. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail recorded for the document so far — a later status report\ncarries what was stored when the document was sent or received. `null` when\n`status.deliveryMethod` is not `peppol`; `{}` when nothing is known yet, e.g. a\nretry report before any exchange succeeded.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"},"senderPeppolId":{"type":"string","description":"Sender's Peppol participant id."},"receiverPeppolId":{"type":"string","description":"Receiver's Peppol participant id."}}}}}},"callbacks":{"webhookEvent":{"{$request.body#/url}":{"post":{"operationId":"partner/webhook-event-delivery","summary":"Webhook event delivered to your endpoint","description":"Qvalia POSTs this JSON payload to your configured `url` when a subscribed\nevent occurs. Your endpoint should respond with a `2xx` status code; the\nrequest times out after 10 seconds. Any configured outbound authentication\nis applied as request headers.\n\nWhen the subscription has a signing secret, the delivery is also signed —\nsee `POST /partner/{partnerRegNo}/webhook/{webhookId}/secret`.","parameters":[{"name":"X-Qvalia-Event-Id","in":"header","required":true,"description":"Identifies the event, not the delivery attempt: redeliveries of the same\nevent carry the same value. Mirrors `eventId` in the body. Deduplicate on it.","schema":{"type":"string","format":"uuid"}},{"name":"X-Qvalia-Signature","in":"header","required":false,"description":"HMAC-SHA256 signature of the delivered body, in the form\n`t=<unix seconds>,v1=<hex>`. Recompute\n`HMAC-SHA256(secret, \"<t>.<raw body>\")` over the **raw** bytes received\nand compare in constant time. More than one `v1=` part is sent while a\nsecret rotation overlap is open — any one matching is a pass. Ignore\nparts whose prefix you do not recognise. Only sent when the subscription\nhas a signing secret.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Event acknowledged by your endpoint"},"4XX":{"description":"Event not acknowledged by your endpoint"}},"security":[{}]}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure":{"put":{"tags":["Webhook API"],"summary":"Configure Webhook for child account","description":"An API to create or update (PUT) the webhook subscription scoped to a single\nchild account under your Partner account.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through `/partner/{partnerRegNo}/webhook/...`,\nor their child accounts using this endpoint (scoped to a single account).\n\nA partner has a single webhook subscription per account. The first `PUT` creates it\nand returns a generated webhook `id` (a UUID v4); subsequent `PUT` requests update\nthe same subscription (its `url` and/or `types`). Use the returned `id` with the\n`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth` endpoints\nto attach outbound authentication.\n\n### Event types\n\n- `new_document` — sent when a new document is received/created for an account.\n- `document_delivery` — sent when a document's delivery status changes.\n- `document_delayed` — sent when a delivery is being retried and has not finished.\n- `document_error` — sent when a document's delivery fails.\n\nRegistration events, sent to partners only (see the Webhooks page):\n\n- `peppol_id_registered`, `peppol_id_updated`, `peppol_id_deregistered` — an account's Peppol ID is registered in the Peppol network, changed, or removed from it.\n- `ae_fta_registered`, `ae_fta_updated`, `ae_fta_deregistered` — the UAE FTA accepts an account's registration with Qvalia as its provider, a re-verification, or its offboarding.\n- `sk_fssr_registered` — a company that selected you in the Slovak FS SR portal is registered, with its account and Peppol ID.\n\nOn your own subscription (`/partner/{partnerRegNo}/webhook/configure`) they are sent for every one of your child accounts. A subscription for one child that lists the type receives that child's events instead, so an event is never delivered twice.\n\n### Delivery (webhook usage)\n\nEvents are delivered as an HTTP `POST` with a JSON body to the configured `url`\n(which must be `https`). Your endpoint should respond with a `2xx` status code;\nthe delivery request times out after 10 seconds. If outbound authentication is\nconfigured (see `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth`)\nit is applied as request headers on every delivery. The delivered payload is a\nsingle flat JSON object — see the `webhookEvent` callback below for the full\nschema, and `/partner/{partnerRegNo}/webhook/configure` above for worked\nexamples of all three event types.\n\nEvery delivery carries `X-Qvalia-Event-Id`, and `X-Qvalia-Signature` once the\nsubscription has a signing secret — see\n`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret`.\n\nDelivery is best-effort: duplicates are possible, and a failed delivery is not\nretried. A missed event can be fetched again for 30 days with `GET .../webhook/{eventId}`,\nbut keep polling the Transaction API\nas a safety net — see `/partner/{partnerRegNo}/webhook/configure` above for details.","operationId":"partner/put-account-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookConfigureChild"},"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureCreated"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}},"callbacks":{"webhookEvent":{"$ref":"#/components/callbacks/webhookEvent"}}}}}}
```

## Delete Webhook Configuration for child account

> An API to DELETE the webhook subscription scoped to a single child account\
> under your Partner account.\
> \
> This removes the subscription and any attached outbound authentication.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"}},"responses":{"WebhookConfigureDeleted":{"description":"OK. The subscription was deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"accountRegNo":{"type":"string"},"enabled":{"type":"boolean","description":"Always `false`, as the subscription is gone."}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Configuration for child account","description":"An API to DELETE the webhook subscription scoped to a single child account\nunder your Partner account.\n\nThis removes the subscription and any attached outbound authentication.","operationId":"partner/delete-account-webhook-config","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"}],"responses":{"200":{"$ref":"#/components/responses/WebhookConfigureDeleted"},"204":{"description":"No Content. There is no webhook subscription, so there was nothing to delete."},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Authentication

> An API to fetch (GET) the outbound authentication type configured for your\
> Partner account's webhook subscription. Which fields are returned depends on the type. Secret values never are:\
> \`clientSecret\`, \`value\` and \`password\` come back as \`--==\[REDACTED]==--\`.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"WebhookAuthFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","description":"Which fields are returned depends on `type`.","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]},"clientId":{"type":"string","description":"`oauth`: the client id."},"tokenUrl":{"type":"string","description":"`oauth`: the token endpoint the token is fetched from."},"scope":{"type":"string","description":"`oauth`, only when one was set: the scope asked for with the token."},"clientSecret":{"type":"string","description":"`oauth`: never the secret itself, only that one is set."},"header":{"type":"string","description":"`api_key`: the header the key is sent in."},"value":{"type":"string","description":"`api_key`: never the key itself, only that one is set."},"password":{"type":"string","description":"`basic`: never the password itself, only that one is set. The username is not returned."}}}}}}}},"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/auth":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Authentication","description":"An API to fetch (GET) the outbound authentication type configured for your\nPartner account's webhook subscription. Which fields are returned depends on the type. Secret values never are:\n`clientSecret`, `value` and `password` come back as `--==[REDACTED]==--`.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/get-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"$ref":"#/components/responses/WebhookAuthFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Set Webhook Authentication

> An API to set (POST) the outbound authentication applied to webhook deliveries\
> for your Partner account's subscription.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> \
> \`{webhookId}\` must match the \`id\` returned by \`PUT /partner/{partnerRegNo}/webhook/configure\`.\
> \
> Provide exactly one of the supported auth \`type\`s:\
> \
> \- \`oauth\` — client-credentials. Qvalia fetches a Bearer token from \`tokenUrl\`\
> &#x20; using \`clientId\`/\`clientSecret\` (and optional \`scope\`) at delivery time.\
> \- \`api\_key\` — sent as a request header (\`header\`, default \`X-API-Key\`) with \`value\`.\
> \- \`basic\` — HTTP Basic auth using \`username\`/\`password\`. The \`password\` must be at\
> &#x20; least 16 characters and contain an uppercase letter, a lowercase letter, a digit\
> &#x20; and a special character.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"requestBodies":{"WebhookAuth":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["type","clientId","clientSecret","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth"]},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"tokenUrl":{"type":"string","format":"uri"},"scope":{"type":"string","description":"Optional OAuth scope(s) sent with the client-credentials token request."}}},{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["api_key"]},"header":{"type":"string","default":"X-API-Key","description":"Header the API key is sent in.\n\n`X-Qvalia-*` is reserved and rejected: that prefix carries the delivery's\nevent id and HMAC signature, so claiming one would overwrite a security\nheader on your own deliveries.","pattern":"^(?![Xx]-[Qq][Vv][Aa][Ll][Ii][Aa]-).+$"},"value":{"type":"string"}}},{"type":"object","required":["type","username","password"],"properties":{"type":{"type":"string","enum":["basic"]},"username":{"type":"string"},"password":{"type":"string","description":"Minimum 16 characters; must contain uppercase, lowercase, digit and special character."}}}]}}}}},"responses":{"WebhookAuthSet":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]},"updatedChildAccounts":{"type":"array","description":"Only on `POST /partner/{partnerRegNo}/webhook/{webhookId}/auth`, and only when there were any:\nthe child accounts whose subscriptions came from this one's `includeChildAccounts`, which now\nauthenticate with the same credential.","items":{"type":"string"}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not Found. The requested resource does not exist, or is not available to this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/auth":{"post":{"tags":["Webhook API"],"summary":"Set Webhook Authentication","description":"An API to set (POST) the outbound authentication applied to webhook deliveries\nfor your Partner account's subscription.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\n\n`{webhookId}` must match the `id` returned by `PUT /partner/{partnerRegNo}/webhook/configure`.\n\nProvide exactly one of the supported auth `type`s:\n\n- `oauth` — client-credentials. Qvalia fetches a Bearer token from `tokenUrl`\n  using `clientId`/`clientSecret` (and optional `scope`) at delivery time.\n- `api_key` — sent as a request header (`header`, default `X-API-Key`) with `value`.\n- `basic` — HTTP Basic auth using `username`/`password`. The `password` must be at\n  least 16 characters and contain an uppercase letter, a lowercase letter, a digit\n  and a special character.","operationId":"partner/post-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookAuth"},"responses":{"200":{"$ref":"#/components/responses/WebhookAuthSet"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete Webhook Authentication

> An API to DELETE the outbound authentication from your Partner account's webhook\
> subscription. The subscription itself is kept; deliveries are sent without auth\
> headers afterwards.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/auth":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Authentication","description":"An API to DELETE the outbound authentication from your Partner account's webhook\nsubscription. The subscription itself is kept; deliveries are sent without auth\nheaders afterwards.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/delete-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Authentication for child account

> An API to fetch (GET) the outbound authentication type configured for a child\
> account's webhook subscription under your Partner account. Which fields are returned depends on the type. Secret values never are:\
> \`clientSecret\`, \`value\` and \`password\` come back as \`--==\[REDACTED]==--\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"WebhookAuthFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","description":"Which fields are returned depends on `type`.","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]},"clientId":{"type":"string","description":"`oauth`: the client id."},"tokenUrl":{"type":"string","description":"`oauth`: the token endpoint the token is fetched from."},"scope":{"type":"string","description":"`oauth`, only when one was set: the scope asked for with the token."},"clientSecret":{"type":"string","description":"`oauth`: never the secret itself, only that one is set."},"header":{"type":"string","description":"`api_key`: the header the key is sent in."},"value":{"type":"string","description":"`api_key`: never the key itself, only that one is set."},"password":{"type":"string","description":"`basic`: never the password itself, only that one is set. The username is not returned."}}}}}}}},"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Authentication for child account","description":"An API to fetch (GET) the outbound authentication type configured for a child\naccount's webhook subscription under your Partner account. Which fields are returned depends on the type. Secret values never are:\n`clientSecret`, `value` and `password` come back as `--==[REDACTED]==--`.","operationId":"partner/get-account-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"$ref":"#/components/responses/WebhookAuthFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Set Webhook Authentication for child account

> An API to set (POST) the outbound authentication applied to webhook deliveries\
> for a child account's subscription under your Partner account.\
> \
> \`{webhookId}\` must match the \`id\` returned by\
> \`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`.\
> \
> Provide exactly one of the supported auth \`type\`s:\
> \
> \- \`oauth\` — client-credentials. Qvalia fetches a Bearer token from \`tokenUrl\`\
> &#x20; using \`clientId\`/\`clientSecret\` (and optional \`scope\`) at delivery time.\
> \- \`api\_key\` — sent as a request header (\`header\`, default \`X-API-Key\`) with \`value\`.\
> \- \`basic\` — HTTP Basic auth using \`username\`/\`password\`. The \`password\` must be at\
> &#x20; least 16 characters and contain an uppercase letter, a lowercase letter, a digit\
> &#x20; and a special character.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"requestBodies":{"WebhookAuth":{"description":"Request body","required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","required":["type","clientId","clientSecret","tokenUrl"],"properties":{"type":{"type":"string","enum":["oauth"]},"clientId":{"type":"string"},"clientSecret":{"type":"string"},"tokenUrl":{"type":"string","format":"uri"},"scope":{"type":"string","description":"Optional OAuth scope(s) sent with the client-credentials token request."}}},{"type":"object","required":["type","value"],"properties":{"type":{"type":"string","enum":["api_key"]},"header":{"type":"string","default":"X-API-Key","description":"Header the API key is sent in.\n\n`X-Qvalia-*` is reserved and rejected: that prefix carries the delivery's\nevent id and HMAC signature, so claiming one would overwrite a security\nheader on your own deliveries.","pattern":"^(?![Xx]-[Qq][Vv][Aa][Ll][Ii][Aa]-).+$"},"value":{"type":"string"}}},{"type":"object","required":["type","username","password"],"properties":{"type":{"type":"string","enum":["basic"]},"username":{"type":"string"},"password":{"type":"string","description":"Minimum 16 characters; must contain uppercase, lowercase, digit and special character."}}}]}}}}},"responses":{"WebhookAuthSet":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"type":{"type":"string","enum":["oauth","api_key","basic"]},"updatedChildAccounts":{"type":"array","description":"Only on `POST /partner/{partnerRegNo}/webhook/{webhookId}/auth`, and only when there were any:\nthe child accounts whose subscriptions came from this one's `includeChildAccounts`, which now\nauthenticate with the same credential.","items":{"type":"string"}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not Found. The requested resource does not exist, or is not available to this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth":{"post":{"tags":["Webhook API"],"summary":"Set Webhook Authentication for child account","description":"An API to set (POST) the outbound authentication applied to webhook deliveries\nfor a child account's subscription under your Partner account.\n\n`{webhookId}` must match the `id` returned by\n`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`.\n\nProvide exactly one of the supported auth `type`s:\n\n- `oauth` — client-credentials. Qvalia fetches a Bearer token from `tokenUrl`\n  using `clientId`/`clientSecret` (and optional `scope`) at delivery time.\n- `api_key` — sent as a request header (`header`, default `X-API-Key`) with `value`.\n- `basic` — HTTP Basic auth using `username`/`password`. The `password` must be at\n  least 16 characters and contain an uppercase letter, a lowercase letter, a digit\n  and a special character.","operationId":"partner/post-account-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookAuth"},"responses":{"200":{"$ref":"#/components/responses/WebhookAuthSet"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete Webhook Authentication for child account

> An API to DELETE the outbound authentication from a child account's webhook\
> subscription under your Partner account. The subscription itself is kept;\
> deliveries are sent without auth headers afterwards.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/auth":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Authentication for child account","description":"An API to DELETE the outbound authentication from a child account's webhook\nsubscription under your Partner account. The subscription itself is kept;\ndeliveries are sent without auth headers afterwards.","operationId":"partner/delete-account-webhook-auth","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Signing Secrets

> An API to fetch (GET) which signing secrets exist on your Partner account's webhook\
> subscription and when each stops verifying.\
> \
> This endpoint returns ids and dates only, never a secret value.\
> \
> A secret is shown once, in the response that issues it: the \`PUT /partner/{partnerRegNo}/webhook/configure\`\
> that creates the subscription, or \`POST /partner/{partnerRegNo}/webhook/{webhookId}/secret\`. It is stored\
> encrypted and cannot be read back afterwards — if you have lost one, issue a new\
> one with \`POST\`.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"WebhookSecretFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"webhookId":{"type":"string","format":"uuid"},"algorithm":{"type":"string","enum":["hmac-sha256"]},"secrets":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSigningSecretInfo"}}}}}}}}},"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"WebhookSigningSecretInfo":{"type":"object","description":"A signing secret on a subscription, described without its value. Secrets are\nstored encrypted and are only ever shown once, when issued.","properties":{"id":{"type":"string","description":"Identifier for the secret. Not itself a secret."},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"When this secret stops verifying. `null` for the current secret, which does\nnot expire; a date on a secret being rotated away from."},"active":{"type":"boolean","description":"Whether the secret is still used to sign deliveries."}}},"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/secret":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Signing Secrets","description":"An API to fetch (GET) which signing secrets exist on your Partner account's webhook\nsubscription and when each stops verifying.\n\nThis endpoint returns ids and dates only, never a secret value.\n\nA secret is shown once, in the response that issues it: the `PUT /partner/{partnerRegNo}/webhook/configure`\nthat creates the subscription, or `POST /partner/{partnerRegNo}/webhook/{webhookId}/secret`. It is stored\nencrypted and cannot be read back afterwards — if you have lost one, issue a new\none with `POST`.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/get-webhook-secret","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"$ref":"#/components/responses/WebhookSecretFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Issue or Rotate Webhook Signing Secret

> Issue a signing secret for your Partner account's webhook subscription, or rotate\
> an existing one. The same endpoint does both, and the plaintext secret is returned\
> here and nowhere else.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.\
> \
> \`{webhookId}\` must match the \`id\` returned by \`PUT /partner/{partnerRegNo}/webhook/configure\`.\
> \
> Deliveries are then signed with HMAC-SHA256, so your endpoint can confirm the body\
> came from Qvalia unaltered. This is independent of the outbound credential under\
> \`.../auth\`, which authenticates Qvalia to your endpoint; use both. The secret is\
> symmetric — there is no public key to fetch — so treat it like a password.\
> \
> \### Verifying a delivery\
> \
> A signed delivery carries:\
> \
> \`\`\`\
> X-Qvalia-Event-Id: 4d1c9f84-3a2b-5c6d-9e0f-1a2b3c4d5e6f\
> X-Qvalia-Signature: t=1757846400,v1=5257a869e7ecebeda32affa62cdca3fa...\
> \`\`\`\
> \
> 1\. Parse \`t\` and every \`v1=\` value from \`X-Qvalia-Signature\`, ignoring prefixes you\
> &#x20;  do not recognise.\
> 2\. Reject the delivery if \`|now - t|\` exceeds your tolerance. 5 minutes is\
> &#x20;  recommended.\
> 3\. Compute \`HMAC-SHA256(secret, "\<t>.\<raw body>")\` and hex-encode it.\
> 4\. Compare against each \`v1=\` value in constant time. One match is enough.\
> 5\. Reject the delivery if you have already processed its \`X-Qvalia-Event-Id\`.\
> \
> Sign the exact bytes you received, not a re-serialised JSON object — key order and\
> whitespace change the hash. This is the most common cause of a failing first\
> implementation.\
> \
> Steps 2 and 5 are both needed: the timestamp caps how long a captured delivery\
> stays usable, and the event-id check is what rejects a replay inside that window.\
> The signature itself proves only origin and integrity.\
> \
> \### Rotation\
> \
> Calling this endpoint again issues a new secret and expires the previous ones\
> \`overlapHours\` (default 24) from now. While the window is open each delivery carries\
> a \`v1=\` part per active secret, so you can deploy the new one at your own pace. Use\
> \`overlapHours: 0\` if a secret has leaked. A subscription holds at most 5 secrets.\
> \
> Subscriptions created before signing existed carry no secret and stay unsigned until\
> you call this endpoint.

````json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"requestBodies":{"WebhookSecretRotate":{"description":"Request body. Optional — omit it entirely to accept the default 24-hour overlap.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"overlapHours":{"type":"integer","minimum":0,"maximum":168,"default":24,"description":"How long the secrets being replaced keep verifying, so you can deploy\nthe new one at your own pace. During the window every delivery carries\na `v1=` part for each active secret.\n\nUse `0` when a secret has leaked: the old one stops verifying at once."}}}}}}},"responses":{"WebhookSecretIssued":{"description":"OK — the new signing secret. This is the only response that contains it.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"webhookId":{"type":"string","format":"uuid"},"algorithm":{"type":"string","enum":["hmac-sha256"]},"secretId":{"type":"string","description":"Identifier for the new secret. Not itself a secret."},"secret":{"type":"string","description":"The new signing secret, in clear text. **Store it now** — it is not\nretrievable afterwards. Rotate again if you lose it."},"createdAt":{"type":"string","format":"date-time"},"previousSecrets":{"type":"array","description":"Secrets this rotation replaced and when each stops verifying. Empty when\nthe subscription had no signing secret before.","items":{"type":"object","properties":{"id":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not Found. The requested resource does not exist, or is not available to this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/secret":{"post":{"tags":["Webhook API"],"summary":"Issue or Rotate Webhook Signing Secret","description":"Issue a signing secret for your Partner account's webhook subscription, or rotate\nan existing one. The same endpoint does both, and the plaintext secret is returned\nhere and nowhere else.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.\n\n`{webhookId}` must match the `id` returned by `PUT /partner/{partnerRegNo}/webhook/configure`.\n\nDeliveries are then signed with HMAC-SHA256, so your endpoint can confirm the body\ncame from Qvalia unaltered. This is independent of the outbound credential under\n`.../auth`, which authenticates Qvalia to your endpoint; use both. The secret is\nsymmetric — there is no public key to fetch — so treat it like a password.\n\n### Verifying a delivery\n\nA signed delivery carries:\n\n```\nX-Qvalia-Event-Id: 4d1c9f84-3a2b-5c6d-9e0f-1a2b3c4d5e6f\nX-Qvalia-Signature: t=1757846400,v1=5257a869e7ecebeda32affa62cdca3fa...\n```\n\n1. Parse `t` and every `v1=` value from `X-Qvalia-Signature`, ignoring prefixes you\n   do not recognise.\n2. Reject the delivery if `|now - t|` exceeds your tolerance. 5 minutes is\n   recommended.\n3. Compute `HMAC-SHA256(secret, \"<t>.<raw body>\")` and hex-encode it.\n4. Compare against each `v1=` value in constant time. One match is enough.\n5. Reject the delivery if you have already processed its `X-Qvalia-Event-Id`.\n\nSign the exact bytes you received, not a re-serialised JSON object — key order and\nwhitespace change the hash. This is the most common cause of a failing first\nimplementation.\n\nSteps 2 and 5 are both needed: the timestamp caps how long a captured delivery\nstays usable, and the event-id check is what rejects a replay inside that window.\nThe signature itself proves only origin and integrity.\n\n### Rotation\n\nCalling this endpoint again issues a new secret and expires the previous ones\n`overlapHours` (default 24) from now. While the window is open each delivery carries\na `v1=` part per active secret, so you can deploy the new one at your own pace. Use\n`overlapHours: 0` if a secret has leaked. A subscription holds at most 5 secrets.\n\nSubscriptions created before signing existed carry no secret and stay unsigned until\nyou call this endpoint.","operationId":"partner/post-webhook-secret","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookSecretRotate"},"responses":{"200":{"$ref":"#/components/responses/WebhookSecretIssued"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
````

## Delete Webhook Signing Secret

> An API to DELETE signing from your Partner account's webhook subscription. Every secret is\
> removed and deliveries are sent \*\*unsigned\*\* from the next event onwards. The\
> subscription itself, and any outbound authentication on it, are kept.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{webhookId}/secret":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Signing Secret","description":"An API to DELETE signing from your Partner account's webhook subscription. Every secret is\nremoved and deliveries are sent **unsigned** from the next event onwards. The\nsubscription itself, and any outbound authentication on it, are kept.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/delete-webhook-secret","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get Webhook Signing Secrets

> An API to fetch (GET) which signing secrets exist on your child account webhook\
> subscription and when each stops verifying.\
> \
> This endpoint returns ids and dates only, never a secret value.\
> \
> A secret is shown once, in the response that issues it: the \`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`\
> that creates the subscription, or \`POST /partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret\`. It is stored\
> encrypted and cannot be read back afterwards — if you have lost one, issue a new\
> one with \`POST\`.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"WebhookSecretFetched":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"webhookId":{"type":"string","format":"uuid"},"algorithm":{"type":"string","enum":["hmac-sha256"]},"secrets":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSigningSecretInfo"}}}}}}}}},"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"WebhookSigningSecretInfo":{"type":"object","description":"A signing secret on a subscription, described without its value. Secrets are\nstored encrypted and are only ever shown once, when issued.","properties":{"id":{"type":"string","description":"Identifier for the secret. Not itself a secret."},"createdAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time","nullable":true,"description":"When this secret stops verifying. `null` for the current secret, which does\nnot expire; a date on a secret being rotated away from."},"active":{"type":"boolean","description":"Whether the secret is still used to sign deliveries."}}},"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret":{"get":{"tags":["Webhook API"],"summary":"Get Webhook Signing Secrets","description":"An API to fetch (GET) which signing secrets exist on your child account webhook\nsubscription and when each stops verifying.\n\nThis endpoint returns ids and dates only, never a secret value.\n\nA secret is shown once, in the response that issues it: the `PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`\nthat creates the subscription, or `POST /partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret`. It is stored\nencrypted and cannot be read back afterwards — if you have lost one, issue a new\none with `POST`.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/get-webhook-account-secret","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"200":{"$ref":"#/components/responses/WebhookSecretFetched"},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Issue or Rotate Webhook Signing Secret

> Issue a signing secret for a child account's webhook subscription, or rotate an existing one.\
> The same endpoint does both, and the plaintext secret is returned here and nowhere\
> else.\
> \
> \`{webhookId}\` must match the \`id\` returned by \`PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure\`.\
> \
> Deliveries are then signed with HMAC-SHA256 (\`X-Qvalia-Signature\`). See\
> \`POST /partner/{partnerRegNo}/webhook/{webhookId}/secret\` for how to verify a\
> delivery, the rotation rules and the \`overlapHours\` window.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"requestBodies":{"WebhookSecretRotate":{"description":"Request body. Optional — omit it entirely to accept the default 24-hour overlap.","required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"overlapHours":{"type":"integer","minimum":0,"maximum":168,"default":24,"description":"How long the secrets being replaced keep verifying, so you can deploy\nthe new one at your own pace. During the window every delivery carries\na `v1=` part for each active secret.\n\nUse `0` when a secret has leaked: the old one stops verifying at once."}}}}}}},"responses":{"WebhookSecretIssued":{"description":"OK — the new signing secret. This is the only response that contains it.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"webhookId":{"type":"string","format":"uuid"},"algorithm":{"type":"string","enum":["hmac-sha256"]},"secretId":{"type":"string","description":"Identifier for the new secret. Not itself a secret."},"secret":{"type":"string","description":"The new signing secret, in clear text. **Store it now** — it is not\nretrievable afterwards. Rotate again if you lose it."},"createdAt":{"type":"string","format":"date-time"},"previousSecrets":{"type":"array","description":"Secrets this rotation replaced and when each stops verifying. Empty when\nthe subscription had no signing secret before.","items":{"type":"object","properties":{"id":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}}}}}}}}}},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"Not Found. The requested resource does not exist, or is not available to this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret":{"post":{"tags":["Webhook API"],"summary":"Issue or Rotate Webhook Signing Secret","description":"Issue a signing secret for a child account's webhook subscription, or rotate an existing one.\nThe same endpoint does both, and the plaintext secret is returned here and nowhere\nelse.\n\n`{webhookId}` must match the `id` returned by `PUT /partner/{partnerRegNo}/account/{accountRegNo}/webhook/configure`.\n\nDeliveries are then signed with HMAC-SHA256 (`X-Qvalia-Signature`). See\n`POST /partner/{partnerRegNo}/webhook/{webhookId}/secret` for how to verify a\ndelivery, the rotation rules and the `overlapHours` window.","operationId":"partner/post-webhook-account-secret","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"requestBody":{"$ref":"#/components/requestBodies/WebhookSecretRotate"},"responses":{"200":{"$ref":"#/components/responses/WebhookSecretIssued"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Delete Webhook Signing Secret

> An API to DELETE signing from your child account webhook subscription. Every secret is\
> removed and deliveries are sent \*\*unsigned\*\* from the next event onwards. The\
> subscription itself, and any outbound authentication on it, are kept.\
> \
> \### Partner or Partners Account\
> Partners can configure their own web hooks through this endpoint, or their\
> child accounts using \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"webhookId":{"name":"webhookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Webhook identifier returned by PUT /webhook/configure, e.g. \"a1b2c3d4-5678-90ab-cdef-1234567890ab\""}},"responses":{"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}},"schemas":{"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{webhookId}/secret":{"delete":{"tags":["Webhook API"],"summary":"Delete Webhook Signing Secret","description":"An API to DELETE signing from your child account webhook subscription. Every secret is\nremoved and deliveries are sent **unsigned** from the next event onwards. The\nsubscription itself, and any outbound authentication on it, are kept.\n\n### Partner or Partners Account\nPartners can configure their own web hooks through this endpoint, or their\nchild accounts using `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/...`.","operationId":"partner/delete-webhook-account-secret","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/webhookId"}],"responses":{"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get a Delivered Webhook

> Fetch a delivered webhook again by its \`eventId\`, e.g. one your endpoint missed.\
> Every delivered body is kept for \*\*30 days\*\*.\
> \
> The response's \`data\` is the body exactly as it was POSTed to your \`url\`, in the\
> \`{"status": "success", "data": {…}}\` envelope every response has. Its \`data.eventId\`\
> is the delivery's \`eventId\`, so it deduplicates against a delivery you did receive.\
> It is not signed: this request is authenticated like the rest of the API instead.\
> \
> The \`eventId\`s of failed deliveries are listed on the document's\
> \`GET /transaction/{accountRegNo}/{documents}/{direction}/status\`, under\
> \`metadata.webhooks\_dispatched\`, with the HTTP \`status\`/\`statusText\` your endpoint\
> returned.\
> \
> This route serves the partner's own events only (\`accountRegNo\` in the body is the\
> partner). A child account's event — even one delivered to your subscription to that\
> child — is fetched over \`/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{eventId}\`,\
> which checks the child is still yours. An unknown or expired \`eventId\`, or another\
> account's, answers \`204\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"eventId":{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The `eventId` of a delivered webhook, as sent in the body and the `X-Qvalia-Event-Id` header, e.g. \"4d1c9f84-3a2b-5c6d-9e0f-1a2b3c4d5e6f\""}},"schemas":{"WebhookEvent":{"description":"A webhook body, as POSTed to your endpoint, and as `data` in the response of\n`GET .../webhook/{eventId}`.\n\nA registration event (`peppol_id_*`, `ae_fta_*`, `sk_fssr_registered`) is about an\naccount, not a document: it has none of `documentType`, `direction`,\n`integrationId`, `documentId`, `globalTransactionId`, `status` or `peppol_metadata`.","type":"object","required":["eventId","eventType","accountRegNo"],"properties":{"eventId":{"type":"string","format":"uuid","description":"Identifies the event, not the delivery attempt. Derived from the\nevent content, so every redelivery of the same event carries the\nsame value — deduplicate on it. Also sent as the\n`X-Qvalia-Event-Id` header."},"eventType":{"type":"string","enum":["new_document","document_delivery","document_delayed","document_error","peppol_id_registered","peppol_id_updated","peppol_id_deregistered","ae_fta_registered","ae_fta_updated","ae_fta_deregistered","sk_fssr_registered"]},"accountRegNo":{"type":"string","description":"The account the event is about. On a registration event, the account that was registered."},"peppolId":{"type":"string","description":"Registration events only. The Peppol ID the event is about."},"country":{"type":"string","description":"Registration events only. `AE` or `SK` on the tax-authority events and on the Peppol events of an account registered through a tax portal."},"msgTypes":{"type":"array","description":"`peppol_id_registered` and `peppol_id_updated` from the Peppol registration endpoints only. The document types registered, as they were given in the registration.","items":{}},"tin":{"type":"string","description":"`ae_fta_*` only. The UAE TIN."},"entityName":{"type":"string","description":"`ae_fta_*` only. The entity's English name at the FTA."},"reason":{"type":"string","description":"`ae_fta_updated` and `ae_fta_deregistered` only. The reason given for the re-verification or the offboarding."},"dic":{"type":"string","description":"Slovak events only. The company's DIČ."},"legalName":{"type":"string","description":"Slovak events only. The legal name from FS SR."},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (Peppol,\nemail, print, …).\n\nValues currently emitted, and whether each is final:\n\n- `pending` (non-final) — logged; nothing attempted yet. Also the\n  upstream column default.\n- `warning` (non-final) — reopened by a rules-processor reset.\n- `delayed` (non-final) — being retried: a Peppol send still inside\n  its retry window. Another event **will** follow. Not a failure!\n- `processed` (final) — delivered successfully.\n- `processed_with_warning` (final) — delivered, but something about\n  the exchange is worth flagging.\n- `error` (non-final) — delivery failed; the top-level `error` carries\n  the reason. Message resend might follow.\n- *absent* — no status reported for this event. Documents entering\n  through the Public API announce themselves without one.\n\n**To tell a retry from a real failure, branch on this field rather\nthan on the text of `error`:** `delayed` means another attempt is\ncoming, `error` means the send has stopped for good."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.","enum":["message-log/create","message-log/update","message-log/delayed","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `print`, `email`,\n`api`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `postal`,\n`dynamic_routing`. Like `status`, an open set. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail recorded for the document so far — a later status report\ncarries what was stored when the document was sent or received. `null` when\n`status.deliveryMethod` is not `peppol`; `{}` when nothing is known yet, e.g. a\nretry report before any exchange succeeded.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"},"senderPeppolId":{"type":"string","description":"Sender's Peppol participant id."},"receiverPeppolId":{"type":"string","description":"Receiver's Peppol participant id."}}}}},"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}},"responses":{"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/webhook/{eventId}":{"get":{"tags":["Webhook API"],"summary":"Get a Delivered Webhook","description":"Fetch a delivered webhook again by its `eventId`, e.g. one your endpoint missed.\nEvery delivered body is kept for **30 days**.\n\nThe response's `data` is the body exactly as it was POSTed to your `url`, in the\n`{\"status\": \"success\", \"data\": {…}}` envelope every response has. Its `data.eventId`\nis the delivery's `eventId`, so it deduplicates against a delivery you did receive.\nIt is not signed: this request is authenticated like the rest of the API instead.\n\nThe `eventId`s of failed deliveries are listed on the document's\n`GET /transaction/{accountRegNo}/{documents}/{direction}/status`, under\n`metadata.webhooks_dispatched`, with the HTTP `status`/`statusText` your endpoint\nreturned.\n\nThis route serves the partner's own events only (`accountRegNo` in the body is the\npartner). A child account's event — even one delivered to your subscription to that\nchild — is fetched over `/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{eventId}`,\nwhich checks the child is still yours. An unknown or expired `eventId`, or another\naccount's, answers `204`.","operationId":"partner/get-webhook-event","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/eventId"}],"responses":{"200":{"description":"OK — the webhook body as it was delivered.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"$ref":"#/components/schemas/WebhookEvent"}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```

## Get a Delivered Webhook

> Fetch a delivered webhook again by its \`eventId\`, e.g. one your endpoint missed.\
> Every delivered body is kept for \*\*30 days\*\*.\
> \
> The response's \`data\` is the body exactly as it was POSTed to your \`url\`, in the\
> \`{"status": "success", "data": {…}}\` envelope every response has. Its \`data.eventId\`\
> is the delivery's \`eventId\`, so it deduplicates against a delivery you did receive.\
> It is not signed: this request is authenticated like the rest of the API instead.\
> \
> The \`eventId\`s of failed deliveries are listed on the document's\
> \`GET /transaction/{accountRegNo}/{documents}/{direction}/status\`, under\
> \`metadata.webhooks\_dispatched\`, with the HTTP \`status\`/\`statusText\` your endpoint\
> returned.\
> \
> Serves the child account's events (\`accountRegNo\` in the body is the child), including\
> those delivered to your own subscription to it. Requires the child account to be yours\
> and the \`webhook\` scope, like the other child-account webhook endpoints. An unknown or\
> expired \`eventId\`, or another account's, answers \`204\`.

```json
{"openapi":"3.0.2","info":{"title":"Qvalia Partner API","version":"1.0.0"},"tags":[{"name":"Webhook API","description":"Operations related to Web hooks"}],"servers":[{"url":"https://api-test.qvalia.com"},{"url":"https://api.qvalia.com"}],"security":[{"api_key":[]},{"jwt":[]}],"components":{"securitySchemes":{"api_key":{"type":"apiKey","name":"Authorization","in":"header"},"jwt":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"JWT-based authentication. The Authorization header must be set as:\nAuthorization: Bearer <token>\n\nObtain a token via POST /token/{accountRegNo} (see Authentication API).\n"}},"parameters":{"partnerRegNo":{"name":"partnerRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Partner registration number issued by Qvalia"},"accountRegNo":{"name":"accountRegNo","in":"path","required":true,"schema":{"type":"string"},"description":"Account registration number issued by Qvalia"},"eventId":{"name":"eventId","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"The `eventId` of a delivered webhook, as sent in the body and the `X-Qvalia-Event-Id` header, e.g. \"4d1c9f84-3a2b-5c6d-9e0f-1a2b3c4d5e6f\""}},"schemas":{"WebhookEvent":{"description":"A webhook body, as POSTed to your endpoint, and as `data` in the response of\n`GET .../webhook/{eventId}`.\n\nA registration event (`peppol_id_*`, `ae_fta_*`, `sk_fssr_registered`) is about an\naccount, not a document: it has none of `documentType`, `direction`,\n`integrationId`, `documentId`, `globalTransactionId`, `status` or `peppol_metadata`.","type":"object","required":["eventId","eventType","accountRegNo"],"properties":{"eventId":{"type":"string","format":"uuid","description":"Identifies the event, not the delivery attempt. Derived from the\nevent content, so every redelivery of the same event carries the\nsame value — deduplicate on it. Also sent as the\n`X-Qvalia-Event-Id` header."},"eventType":{"type":"string","enum":["new_document","document_delivery","document_delayed","document_error","peppol_id_registered","peppol_id_updated","peppol_id_deregistered","ae_fta_registered","ae_fta_updated","ae_fta_deregistered","sk_fssr_registered"]},"accountRegNo":{"type":"string","description":"The account the event is about. On a registration event, the account that was registered."},"peppolId":{"type":"string","description":"Registration events only. The Peppol ID the event is about."},"country":{"type":"string","description":"Registration events only. `AE` or `SK` on the tax-authority events and on the Peppol events of an account registered through a tax portal."},"msgTypes":{"type":"array","description":"`peppol_id_registered` and `peppol_id_updated` from the Peppol registration endpoints only. The document types registered, as they were given in the registration.","items":{}},"tin":{"type":"string","description":"`ae_fta_*` only. The UAE TIN."},"entityName":{"type":"string","description":"`ae_fta_*` only. The entity's English name at the FTA."},"reason":{"type":"string","description":"`ae_fta_updated` and `ae_fta_deregistered` only. The reason given for the re-verification or the offboarding."},"dic":{"type":"string","description":"Slovak events only. The company's DIČ."},"legalName":{"type":"string","description":"Slovak events only. The legal name from FS SR."},"documentType":{"type":"string","description":"e.g. Invoice, CreditNote, Order"},"integrationId":{"type":"string","format":"uuid","description":"Qvalia unique identifier for the transaction/message"},"direction":{"type":"string","enum":["incoming","outgoing"]},"occurredAt":{"type":"string","format":"date-time"},"documentId":{"type":"string","description":"Document number (e.g. invoice number). Present on `new_document`;\nmay be absent on `document_delivery`/`document_error` when the\nupstream delivery channel does not report one."},"globalTransactionId":{"type":"string","format":"uuid","description":"Qvalia's platform-wide transaction id for this document exchange. Absent if not available for this event."},"status":{"type":"object","description":"Delivery-lifecycle detail for this event. Present on all event types.","properties":{"status":{"type":"string","description":"Delivery status reported by the upstream delivery channel (Peppol,\nemail, print, …).\n\nValues currently emitted, and whether each is final:\n\n- `pending` (non-final) — logged; nothing attempted yet. Also the\n  upstream column default.\n- `warning` (non-final) — reopened by a rules-processor reset.\n- `delayed` (non-final) — being retried: a Peppol send still inside\n  its retry window. Another event **will** follow. Not a failure!\n- `processed` (final) — delivered successfully.\n- `processed_with_warning` (final) — delivered, but something about\n  the exchange is worth flagging.\n- `error` (non-final) — delivery failed; the top-level `error` carries\n  the reason. Message resend might follow.\n- *absent* — no status reported for this event. Documents entering\n  through the Public API announce themselves without one.\n\n**To tell a retry from a real failure, branch on this field rather\nthan on the text of `error`:** `delayed` means another attempt is\ncoming, `error` means the send has stopped for good."},"event":{"type":"string","description":"The internal message-log lifecycle event that triggered this webhook.","enum":["message-log/create","message-log/update","message-log/delayed","message-log/error"]},"deliveryMethod":{"type":"string","description":"Delivery method used for this document, e.g. `peppol`, `print`, `email`,\n`api`, `internetbank`, `kivra`, `billo`, `minameddelanden`, `postal`,\n`dynamic_routing`. Like `status`, an open set. May be absent."},"updatedAt":{"type":"string","format":"date-time"}}},"error":{"type":"string","description":"Error message describing the delivery failure. Only present when `eventType` is `document_error`."},"peppol_metadata":{"type":"object","nullable":true,"description":"Peppol exchange detail recorded for the document so far — a later status report\ncarries what was stored when the document was sent or received. `null` when\n`status.deliveryMethod` is not `peppol`; `{}` when nothing is known yet, e.g. a\nretry report before any exchange succeeded.","properties":{"messageId":{"type":"string"},"accessPoint":{"type":"string"},"docTypeId":{"type":"string"},"processId":{"type":"string"},"exchangeDateTime":{"type":"string","format":"date-time"},"senderPeppolId":{"type":"string","description":"Sender's Peppol participant id."},"receiverPeppolId":{"type":"string","description":"Receiver's Peppol participant id."}}}}},"Error":{"type":"object","description":"Every error returned by the Qvalia APIs uses this envelope. `type` is a\nstable machine-readable code — branch on it rather than on `data`, which is\na human-readable message whose wording may change.","properties":{"status":{"type":"string","description":"Always `error` on a failed request."},"type":{"type":"string","description":"Stable error code. One of `E_BAD_REQUEST` (400),\n`E_UNAUTHORIZED_CLIENT` / `E_CLIENT_UNSUCCESSFUL_AUTHENTICATION` (401),\n`E_MISSING_PERMISSION` (403), `E_MISSING` (404), `E_CONFLICT` (409),\n`E_PAYLOAD_TOO_LARGE` (413, a request body over 100 MB),\n`E_VALIDATION` / `E_PEPPOL_PARTICIPANT_SMP_LOOKUP` (422),\n`E_RATE_LIMITED` (429), `E_NOT_IMPLEMENTED` (501) or\n`E_INTERNAL_PROXY_ERROR` (500)."},"data":{"type":"string","description":"Human-readable description of what went wrong."},"metadata":{"type":"object","description":"Additional detail about the failure. The shape varies by error type — a `429`\ncarries `limit` and `retryAfterSeconds`, a `409` carries the colliding\n`integrationId` — and it is omitted entirely on a `500`. Treat it as an open\nmap and read only the keys you need.","additionalProperties":true,"properties":{"debug_error_message":{"type":"string","description":"Longer explanation intended for a developer reading a log."},"debug_error_code":{"type":"integer","description":"Echoes the HTTP status code."}}}}}},"responses":{"NoContent":{"description":"No Content. The request succeeded and there is no body to return."},"Unauthorized":{"description":"Unauthorized. The API key or Bearer token is missing, malformed, or not valid\nfor the account in the URI.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UnprocessableEntity":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string"},"data":{"type":"string"},"metadata":{"type":"object","properties":{}}}}}}},"TooManyRequests":{"description":"Too Many Requests. The account has exceeded its request budget, which is counted\nper account across all Qvalia APIs.\n\nRead `Retry-After` and wait at least that many seconds before retrying — retrying\nimmediately is simply rejected again. `RateLimit-Remaining` on every response tells\nyou how much of the budget is left, so a well-behaved client need not hit this at\nall. Contact [Qvalia Helpdesk](https://qvalia.com/help/) if your integration needs\na higher limit.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalServerError":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"type":{"type":"string","description":"`E_INTERNAL_PROXY_ERROR`, or `E_UNKNOWN` when the failure carried no type."},"data":{"type":"string"}}}}}}}},"paths":{"/partner/{partnerRegNo}/account/{accountRegNo}/webhook/{eventId}":{"get":{"tags":["Webhook API"],"summary":"Get a Delivered Webhook","description":"Fetch a delivered webhook again by its `eventId`, e.g. one your endpoint missed.\nEvery delivered body is kept for **30 days**.\n\nThe response's `data` is the body exactly as it was POSTed to your `url`, in the\n`{\"status\": \"success\", \"data\": {…}}` envelope every response has. Its `data.eventId`\nis the delivery's `eventId`, so it deduplicates against a delivery you did receive.\nIt is not signed: this request is authenticated like the rest of the API instead.\n\nThe `eventId`s of failed deliveries are listed on the document's\n`GET /transaction/{accountRegNo}/{documents}/{direction}/status`, under\n`metadata.webhooks_dispatched`, with the HTTP `status`/`statusText` your endpoint\nreturned.\n\nServes the child account's events (`accountRegNo` in the body is the child), including\nthose delivered to your own subscription to it. Requires the child account to be yours\nand the `webhook` scope, like the other child-account webhook endpoints. An unknown or\nexpired `eventId`, or another account's, answers `204`.","operationId":"partner/get-account-webhook-event","parameters":[{"$ref":"#/components/parameters/partnerRegNo"},{"$ref":"#/components/parameters/accountRegNo"},{"$ref":"#/components/parameters/eventId"}],"responses":{"200":{"description":"OK — the webhook body as it was delivered.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"data":{"$ref":"#/components/schemas/WebhookEvent"}}}}}},"204":{"$ref":"#/components/responses/NoContent"},"401":{"$ref":"#/components/responses/Unauthorized"},"422":{"$ref":"#/components/responses/UnprocessableEntity"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://api.qvalia.io/api-documentation/apis/partner-api/webhook-api.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
