Webhooks

Overview

TProfile allows you to create webhooks to notify third parties on a number of events that occur within the platform.

Webhook management is available under Platform Settings > Webhooks

Suggested Design Pattern

TProfile webhooks are designed to be light weight so that you can use them as a notification to trigger another action. Whilst you can fill the request body with a lot of data using the template replacement we would suggest keeping them light and rely on a subsequent API call to retrieve any data. For example for a new or updated booking you may wish to use a Webhook with the example Body (Content)

{
"eventType":"[EventType]",
"bookingId":"[Booking.Id]"
}

You could then call the /api/bookings/{bookingId}/detailed endpoint to retrieve the booking data and use this to sync/update your third party platform. The API documentation for your TProfile instance can be found under Business Tools > API Documentation.

Creating/Updating Webhooks

  1. To create a new webhook select the + Add Webhook button or click edit on an existing webhook from the list.

    Webhook Manager Overview
  2. You will be presented with a form to complete to details related to the webhook

     

Webhook Fields

Field

Required

Details

Field

Required

Details

URI

Yes

This is the URI that will be called when the webhook is triggered. It should be a fully qualified URI including the protocol.

Secret

Yes

This field is sent in the headers and allows you to authenticate this request as one that has come from TProfile. You can re-generate this unique field or enter your own value

Events

Yes

This allows you to trigger a webhook on any number of events, you can select multiple of these

Content Type

Yes

This is the content type for the request and should match the content field. E.g. Content should be in a JSON format if you choose the application/json value.

You can use any of the pre-defined values or enter and select your own custom value

Headers

No

You can enter any custom headers here in the format defined.

Content

Yes

This is the content of the request, you can utilise the placeholders defined here

Execution History

You can view the execution history for a webhook by selecting the Run History button. This will show you all the executions that have been triggered for that webhook along with the option to view the request body & headers as well as the response body & headers.