Document Order Webhook
When a document order is completed or cancelled, G-BRIS sends a POST
request to the callback_url
you provided when placing the order.
This webhook allows your system to receive asynchronous updates once order processing has finished.
When It Fires
The webhook is triggered when the order transitions to a final state:
COMPLETED
CANCELLED
Payload
{
"id": "d8595ad1e63dc",
"status": "COMPLETED",
"created_at": 1713200000,
"finished_at": 1713201800,
"documents": [
{
"entity_persistent_id": "c338d773ad8595ad1e63dc4651854e50",
"product_code": "DE_GMBH_ANNUAL_REPORT_EN",
"year": 2023,
"status": "DELIVERED",
"download_url": "https://api.gbris.com/files/d8595ad1e63dc/YAzH4SwNkpgA0h.pdf"
},
{
"entity_persistent_id": "c338d773ad8595ad1e63dc4651854e50",
"product_code": "DE_ALL_FULL_OFFICIAL_EXTRACT_HISTORICAL_EN",
"status": "NOT_AVAILABLE"
}
]
}
Field | Type | Description |
---|---|---|
id | string | The ID of the submitted order. |
status | string | One of: COMPLETED or CANCELLED . |
created_at | number | Unix timestamp of when the order was placed. |
finished_at | number | Unix timestamp of when the order finished processing. |
documents | array | List of documents included in the order. |
documents[]
fields
Field | Type | Description |
---|---|---|
product_code | string | The document product code (matches original order) |
year | number | null | The year requested (if applicable) |
status | string | DELIVERED or NOT_AVAILABLE |
download_url | string | null | File URL, included only if status is DELIVERED |
Signature Verification
To ensure authenticity, webhook requests include a signature header:
X-GBRIS-Signature: sha256=abc123...
Verifying the Signature
- Capture the raw request body as a UTF-8 string.
- Generate an HMAC-SHA256 digest of that string using your Bearer token as the key.
- Compare the result with the
X-GBRIS-Signature
value.
We recommend rejecting webhook requests that do not pass signature validation.
Retry Behavior
If your webhook endpoint:
- Returns a non-
2xx
status, or - Fails to respond within 5 seconds
…the webhook will be retried up to 3 times, at 30-minute intervals.
Best Practices
- Always verify the
X-GBRIS-Signature
header - Respond with a
2xx
status immediately after receiving the payload - Handle business logic and file processing in a separate background job
- Log delivery attempts to detect failures or duplicates