Webhook Service Tutorials

The Emporix Webhook Event Publishing works in the following way:

  1. When an event takes place and you subscribed to receiving notifications about this event, a message is sent to the Webhook Service.
  2. The Webhook Service forwards the message to the Event Gateway.
  3. The Event Gateway passes the event to your earlier configured endpoint for this particular event.
info


For example, if you create a catalog in the Emporix environment, a notification is sent to the Webhook service. The service passes the message to the Event Gateway. If you configured the "Create a new catalog" endpoint beforehand, you will receive the notification that a new catalog has been created.

How to configure webhook notifications

To receive notifications from Emporix API services, you need to subscribe to specific events by following the process below:

  1. Retrieve all subscriptions to the Emporix API events.
  2. Subscribe to specific events generated in the Emporix API.
  3. Connect the tenant with their consumer application by following the link to the Event Gateway.
  4. Configure endpoints in the Event Gateway.
attention

By default, the maximum number of events per tenant is limited to 10,000/month. The limit resets on the first day of each month. If you want to publish more events, contact Emporix Support.

Retrieve all subscriptions

Before you subscribe to events, you need to check for any active subscriptions by sending a request to the Retrieving all subscriptions endpoint.
attention
If the subscription to the event of your choice already exists and you want to update it, note down the metadata.version value. You will need it to call the Subscribing and unsubscribing from events endpoint further in the tutorial.If there is no prior subscription to the event of your choice, the metadata.version is empty. It is automatically set to 1 when you send a request to the Subscribing and unsubscribing from events endpoint.
Loading...

Subscribe to events

To receive notifications about events, for example creating or updating a catalog in the Catalog Service, you need to subscribe to them by using the Webhook Service.

To subscribe to an event, you need to send a request to the Subscribing and unsubscribing from events endpoint.In this example, you will subscribe to the following events: catalog.created and catalog.updated.
Loading...

Connect to the Event Gateway

You need to have access to the Event Gateway to connect the tenant with their consumer application.

When you subscribe to events, you will receive an email with an automatically generated link to the application portal.

To generate the login link with the authentication token needed to connect a tenant to their consumer application portal, you need to send a request to the Retrieving a dashboard access URL endpoint.
Loading...
info

You can use your Emporix tenant ID as application ID in Svix.

Configure your endpoints

To receive notifications about the events you subscribed to in Subscribe to events, on the Event Gateway, you need to configure endpoints that relate to those events.

To configure endpoints by using the APIs, since we are currently using the Svix platform for this purpose, check out the "Add webhook endpoints/Using the API" section in the official Svix documentation.