Skip to main content
All CollectionsDashboardSupplier Settings
How to Use Webhook Registries
How to Use Webhook Registries

Send orders to 3rd party accounting systems using webhook registries

Lucia Burin Sestakova avatar
Written by Lucia Burin Sestakova
Updated over a month ago

πŸ” 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

  1. In the Ventrata dashboard, go to Supplier Settings > Registries.

  2. Press the + New Registry button.

  3. Select Webhook Registry.

  4. Enter a name for the registry.

  5. Select the destinations where the registry will be used.

  6. Enter the destination URL for the webhook where the orders will be sent.

  7. Select the types of ledger entries to be included.

  8. Select the columns by which ledger entries will be grouped.

  9. Select the total columns, which are SUM(X) of the appropriate column.

  10. 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

order_id

a unique ID that identifies the order (UUID)

registry_data

this key was removed

idempotency_key

a unique key for this request; if the request fails it will be retried with the same idempotency_key

ledger_entries

a list of ledger entries for this order

Each ledger entry is defined as:

Ledger Parameter

Description

ledger_code

the ledger code for the entry

currency

this field and any other columns included in Order Ledger Columns; in this example we just included currency

quantity

a positive integer for revenue ledger entries

debit

increase the value of asset, expense and loss accounts

credit

increase the value of liability, equity, revenue and gain accounts

description

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",
},
{

Did this answer your question?