π Required Role Permissions: Registries
π Optional Role Permissions: Save Searches, See Bulk Action, Data Export, Generate Reports
Webhook registries allow you to automatically send order data to third-party accounting systems, simplifying financial tracking and ensuring consistency.
Create New Registry
In the Ventrata dashboard, go to Supplier Settings > Registries.
Press the + New Registry button.
Select Webhook Registry.
Enter a name for the registry.
Select the destinations where the registry will be used.
Enter the destination URL for the webhook where the orders will be sent.
Select the types of ledger entries to be included.
Select the columns by which ledger entries will be grouped.
Select the total columns, which are
SUM(X)
of the appropriate column.Press the Create Registry button.
Webhook Ednpoints
Two endpoints are provided, both of which take the same from/to date parameters and work on the same dataset.
ledger_summary
This endpoint outputs a summary report that shows accounting cash flows.
https://api.ventrata.com/reporting/webhook_registry/ledger_summary
Whenever an order is confirmed, updated or cancelled the /ledger_summary
, the request endpoint will be sent to the webhook order URL endpoint. The request will be an HTTP POST request, and the body if formatted as follows:
{
"order_id": "2e7f2d6f-0473-4935-8cfb-c11b2caa6dab",
"idempotency_key": "5ffd8c8c-19d5-4999-8c9b-475dabeb45f5",
"ledger_entries": [
{
"ledger_code": null,
"currency": "EUR",
"quantity": 0,
"debit": "38.0",
"credit": "0.0",
"description": "Cashflow"
},
{
"ledger_code": null,
"currency": "EUR",
"quantity": 2,
"debit": "0.0",
"credit": "22.0",
"description": "Museum General Admission"
},
{
"ledger_code": null,
"currency": "EUR",
"quantity": 2,
"debit": "0.0",
"credit": "16.0",
"description": "Museum Child Ticket"
}
]
}
The object will always contain the following keys:
Key | Description |
| a unique ID that identifies the order (UUID) |
| this key was removed |
| a unique key for this request; if the request fails it will be retried with the same |
| a list of ledger entries for this order |
Each ledger entry is defined as:
Ledger Parameter | Description |
| the ledger code for the entry |
| this field and any other columns included in |
| a positive integer for revenue ledger entries |
| increase the value of asset, expense and loss accounts |
| increase the value of liability, equity, revenue and gain accounts |
| is the human readable description of each line item |
ledger_report
This endpoint outputs a report based on the Order Ledger Aggregates
field.
https://api.ventrata.com/reporting/webhook_registry/ledger_report
When the /ledger_report
webhook endpoint is called, it generates a report, which includes the columns selected in the Order Ledger Columns
and Order Ledger Aggregates
fields, see Create New Registry.
The request will be an HTTP POST, and it returns an array of objects:
[
{
"destination": "Krno",
"test": false,
"deferred": false,
"redeemed": false,
"noshow": true,
"upgraded": false,
"code": "1C",
"reseller": null,
"reseller_band": null,
"reseller_channel": null,
"reseller_tags": null,
"unit": "Adult",
"option": "24 Hours",
"product": "Krno City Loops Hop on Hop off",
"product_tags": null,
"package_product": null,
"package_option": null,
"promotion": null,
"promotion_tags": null,
"package_promotion": null,
"package_promotion_tags": null,
"ledger_code_account_type": "revenue",
"date": "2024-11-15",
"travel_date": "2024-11-13",
"redemption_date": null,
"order": "WXDAPPSQ",
"order_channel": "Terminals",
"order_source": "terminal",
"currency": "CZK",
"sale_type": "individual",
"quantity": -2,
"size": -2,
"revenue_total": "1400",
"discount_total": "0.0",
"adjustment_total": "0.0",
"commission_adjustment_total": "0.0",
"total": "1400",
"commission_total": "0.0",
"wholesale_total": "0.0",
"tax_total": "0.0",
},
{