Webhooks
Webhooks are a way for applications to receive real-time notifications about events happening in your organisation. When building Rapid Logix integrations, you might want your applications to receive events as they occur, so that your backend system can execute actions automatically.
To enable webhook events, you need to register them on the dashboard. After registration, Rapid Logix can push real-time event data to your application’s webhook endpoint when events happen in your organisation. Rapid Logix uses HTTPS to send webhook events to your app as a JSON payload that includes the Event Object.
Register a Webhook
Any user with the super admin or organisation admin role can register a webhook. Webhooks can be registered on the dashboard. You can register a webhook as follows:
Only users with the super admin and organisation admin role can register webhooks.
- Log in to the Rapid Logix Dashboard using your credentials.
- Click the Create button, located on the top right of the main table.
- Fill in the form with your webhook details.
This is a list of the fields on the create webhook form and what they mean:
Fields
Name*
A short name that allows you to identify the webhook.
URL*
The HTTPS endpoint that you want to receive real-time event data from.
Description
A longer description that provides more information about the endpoint.
Status*
Describes the current behavior of the webhook.
| Status | Description |
|---|---|
| Enabled | The webhook will actively push real-time updates to the endpoint. |
| Disabled | The webhook will NOT push any real-time updates. |
Events*
A list of events you want to subscribe to. If you subscribe to multiple events, then the endpoint will receive all of them. A list of the events and what they do can be found here.
API Keys
After you register your webhook, you will be given your API Key for authentication. You should use the API key to authenticate that the request really came from us. This is your only chance to download it. You should safely store your API key and should not share it with others. You should ensure that your API key isn’t available on public git repositories like GitHub, in client-side code, and so forth. You can find more information on webhook security here.
You will only have one chance to save your API key. If you exit the page, you will not be able to view it again.
Types of Events
You receive events for all of the event types your webhook endpoint is listening for in your configuration. Use the eventType field to determine what type of event you received. The data.object field contains the corresponding resource.
This is a list of all the types of events we send. This list is not permanent and may change at any time. All events follow the pattern {resource}.{event}. For example, for the event job.completed, the resource is the job and the event is job completion.
Event
job.completed
Occurs when a job is completed.
Event Payload
The Event Payload is the JSON object you receive when a webhook triggers. The data.object contains a snapshot of the event. The following event shows a sample event for a job.completed event with the data omitted for brevity.
{
"id": "63070be0372f1e7bc77962a6",
"webhookId": "66b2e3ddb97f60b5270d5ce9",
"organisationId": "657bf08c202997ba9d127922",
"eventType": "job.completed",
"dateTime": "2024-10-05T00:00:00Z",
"data": {
"object": {
"objectType": "job"
}
},
"version": 1
}
Localisation
Currently all units are localised to the organisation. The two unit systems that are supported are METRIC and IMPERIAL. Whenever we push events to a webhook all units will be localised in the unitsystem of that organisation. More information on localisation can be found here
Updating the unit system of an organisation may cause your webhooks to break depending on how you handle the localised units.
Versions
The webhook version represents the framework that defines the behavior and structure of webhooks. This versioning system ensures that clients have a consistent and predictable experience when interacting with webhooks. To maintain backward compatibility and avoid disruptive changes, any significant updates or modifications to webhook functionality will result in the release of a new version. The current version of webhooks and these docs is 1.
Webhook events are also versioned, and the version of these events dictates the information found in the data payload. This means that whenever we make updates to RapidLogix, your webhooks won’t immediately break, allowing you to upgrade them at a more convenient time.