Integration of clients using webhooks

Created: 2021-10-05
Last updated: 2024-02-13

Webhooks are - besides the API interface - a mechanism that allows communication between servers. It is designed mainly for developers and advanced Users.

Using webhooks reduces the load on the application server, because the necessary information is automatically sent when a specific event occurs, so there is no need to query the API interface to see if any changes have occurred. Notifications about events are received exactly when they occur, without having to query the application too often.
You can find webhooks in the system by going to Settings> Account settings> Integration.


A webhook includes:

  • type, which determines when the webhook should be sent (after the client is created/updated/deleted)
  • URL, which is the URL to which the webhook is sent
  • API token, which is an authentication token that the user can add to the webhook and that will be visible under the key 'api_token'

Webhook to POST sent to the specified URL. The structure must match the data to be transmitted.

To communicate changes regarding clients, send an appropriate POST, for example:

client_id: <unique ID representing the client in the InvoiceOcean database>,
client: { <dictionary representing the client in InvoiceOcean> },
app_name: 'InvoiceOcean',
api_token: <api_token entered in the webhook by the user>,
locale: I18n.locale (e.g., 'pl')

Create unlimited invoices and more with InvoiceOcean. Start your 30-day free trial.

Sign up free


Add Comment