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

L
Written by Lucia Burin Sestakova
Updated over a week ago

The webhook registry enables seamless integration with third-party accounting systems by automatically sending orders directly to them, ensuring accurate and efficient financial tracking and management.

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. Enter the URL each order will be posted to.

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

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

  8. Press the Create Registry button.


Webhook Request

Every time an order is confirmed, updated or cancelled the webhook endpoint will be called. The request will be an HTTP POST request, and the body will look like this:

{ 
"order_id": "2e7f2d6f-0473-4935-8cfb-c11b2caa6dab",
"registry_data": {},
"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

the last response of the webhook request

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

The data your endpoint responds with will be saved against the order, and will be sent back to you in a future request if the order is subsequently modified in the registry_data field.

Every time your endpoint is called, the response will overwrite the registry data on the order and the new value will be sent to your endpoint in the next request.

Did this answer your question?