Webhooks
Travelgenix provides a webhook connection that allows you to receive HTTP push notifications.

Travelgenix provides a webhook connection that allows you to receive HTTP push notifications whenever data is created or updated. This allows you to build integrations on top of Travelgenix events.
Webhook Setup
To create a new Webhook, navigate to the Suppliers Directory and set up your Webhook connection (under the CRM, Marketing & Backoffice tab) by clicking Add. All you need to provide is the Endpoint URL of your webhook server - make sure you toggle the "Specify Custom endpoint" on and select which events you want to receive.
For extra security, you can also set a Security Key (optional) which allows us to sign the webhook request to your server so that you can validate that the request came from us - see more details on security signing below if you want to use this option.
How does a webhook work?
A Webhook push is simply a HTTP POST request, sent to the URL of your choosing. The push is automatically triggered by Travelgenix in real-time when events happen in our platform.
Please note that the webhook data only includes a summary of the event, it does not contain all the data (e.g. customer or order data) in order to keep the payload small and fast. Please see "Getting More Data" below if you need the full set of event data.
Your webhook endpoint should respond within 5 seconds with a success (200) HTTP status or we will mark the request as failed. Any long-running process you may need to run on your application having received the webhook should be performed in a background/asynchronous process and respond to us as soon as possible.
Webhook Payload
The webhook HTTP payload will include information both in its HTTP headers and its request body.
HTTP headers:
Content-Type: application/json; charset=utf-8
User-Agent: Travelgenix-Webhook
The payload body has the following structure:
| Key | Description |
|---|---|
| eventtype | The type of event that took place: customer.create, customer.update, basket.create, order.complete, order.update, order.cancel |
| appid | The Travelgenix/Travelify application identifier (integer) so that you can identify the application the webhook came from, useful if your webhook can handle multiple applications |
| appidentifier | Similar to the appid, but this is an optional identifier that you can set in the webhook settings if you want to use your own identifier for the application - this will only be sent if you set it in the webhook settings |
| data | The event data |
| timestamp | The data and time (in UTC format) that the event took place |
| url | URL of the entity to obtain more information (see our API documentation for more information) |
Webhook Events
Customer Create
This action is fired when the customer creates an account on the website.
{
"eventtype": "customer.create",
"appid": 100,
"appidentifier": "demoapp",
"data": {
"id": 1,
"key": "F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"title": "Mr",
"firstname": "Demo",
"surname": "Customer",
"email": "demo@travelgenix.io",
"created": "2023-01-26T11:33:10Z"
},
"url": "/admin/customers/1/F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"timestamp": "2023-01-26T12:00:00Z"
}
Customer Update
This action is fired when the customer updates their account information on the website, or if a B2B customer is linked to a company within the administration portal.
{
"eventtype": "customer.update",
"appid": 100,
"appidentifier": "demoapp",
"data": {
"id": 1,
"key": "F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"title": "Mr",
"firstname": "Demo",
"surname": "Customer",
"email": "demo@travelgenix.io",
"companyid": 1,
"companyname": "Acme Travel Company",
"roles": ["b2b"],
"created": "2023-01-26T11:33:10Z"
},
"url": "/admin/customers/1/F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"timestamp": "2023-01-26T12:00:00Z"
}
Customer fields
| Field | Description |
|---|---|
| id | Unique id for the customer |
| key | Security key for the customer |
| title | Customer title (eg. Mr, Mrs, Miss, Ms, Dr) |
| firstname | Customer first name |
| surname | Customer surname/family name |
| Customer email address | |
| companyid | Optional company id (only for B2B customers) |
| companyname | Optional company name (only for B2B customers) |
| roles | Optional array of roles (eg. b2b) |
| created | Customer creation date & time (UTC) |
Basket Create
This event is fired when a customer creates a basket on the website (adds one or more items to their basket).
{
"eventtype": "basket.create",
"appid": 100,
"appidentifier": "demoapp",
"data": {
"id": 1,
"key": "F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"status": "Basket",
"language": "en",
"currency": "GBP",
"amount": 1125.98,
"itemscount": 2,
"customertitle": "Mr",
"customerfirstname": "Demo",
"customersurname": "Customer",
"customeremail": "demo@travelgenix.io",
"created": "2023-01-26T11:33:10Z"
},
"url": "/admin/orders/1/F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"timestamp": "2023-01-26T12:00:00Z"
}
Order Complete
This event is fired when an order is completed (paid and confirmed). This event is normally used by systems wanting to be notified of new completed orders to process.
{
"eventtype": "order.complete",
"appid": 100,
"appidentifier": "demoapp",
"data": {
"id": 1,
"key": "F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"status": "Confirmed",
"language": "en",
"currency": "GBP",
"amount": 1125.98,
"itemscount": 2,
"customertitle": "Mr",
"customerfirstname": "Demo",
"customersurname": "Customer",
"customeremail": "demo@travelgenix.io",
"created": "2023-01-26T11:33:10Z"
},
"url": "/admin/orders/1/F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"timestamp": "2023-01-26T12:00:00Z"
}
Order Update
This event is fired when an order is updated (currently not implemented, documented for future use).
{
"eventtype": "order.update",
"appid": 100,
"appidentifier": "demoapp",
"data": {
"id": 1,
"key": "F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"status": "Confirmed",
"language": "en",
"currency": "GBP",
"amount": 1125.98,
"itemscount": 2,
"customertitle": "Mr",
"customerfirstname": "Demo",
"customersurname": "Customer",
"customeremail": "demo@travelgenix.io",
"created": "2023-01-26T11:33:10Z"
},
"url": "/admin/orders/1/F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"timestamp": "2023-01-26T12:00:00Z"
}
Order Cancel
This event is fired when an order is cancelled or partially cancelled (when not all items are cancelled).
{
"eventtype": "order.cancel",
"appid": 100,
"appidentifier": "demoapp",
"data": {
"id": 1,
"key": "F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"status": "Cancelled",
"language": "en",
"currency": "GBP",
"amount": 1125.98,
"itemscount": 2,
"customertitle": "Mr",
"customerfirstname": "Demo",
"customersurname": "Customer",
"customeremail": "demo@travelgenix.io",
"created": "2023-01-26T11:33:10Z"
},
"url": "/admin/orders/1/F461B152-B2EB-40AF-81B2-E8BEFDE80A43",
"timestamp": "2023-01-26T12:00:00Z"
}
Order fields
| Field | Description |
|---|---|
| id | Unique order id |
| key | Order security key |
| status | Order status (eg. Confirmed, Cancelled) |
| language | Order language (eg. EN) |
| currency | Order currency code (eg. GBP) |
| amount | Order total amount |
| itemscount | Number of items in order |
| customertitle | Customer title (eg. Mr, Mrs. Miss, Ms, Dr) |
| customerfirstname | Customer first name |
| customersurname | Customer surname/family name |
| customeremail | Customer email address |
| created | Order creation date & time (UTC) |
Getting More Data
The webhook data only returns a basic summary of the information in the event (customer or order). In order to get more information about the data in the event, we also provide a url field. This allows you to query our full API to get all the data we hold about the item.
Webhook Security (Security Key)
To improve security of your webhook calls, you can set an optional security key. If you set this, we will sign the request using HMAC SHA256 and send an additional signature HTTP header.
Travelgenix-Signature: cUj1PK+TEFI/LelZI/dLvfp7I7YkQSuNzOcMDZaFleA=
To verify the signature, take the raw JSON request data we send you and encode is it using your Security Key. You can then compare it with the signature header that we send you which will validate that it originates from the Travelgenix platform.









