Automation Triggers
Intermediary endpoint for notifying business events that trigger automations in Fideltour.
Table of Contents¶
- Introduction
- Integration principle
- Current status (phase 1)
- Authentication
- Available methods
- Parameter table
- Examples
- Responses
Introduction¶
This endpoint lets an external system (initially Mirai) notify business events related to bookings or loyalty. HotelDataHub acts as an intermediary: it receives the event, forwards it to Fideltour using the customer's token, and lets Fideltour decide whether to trigger an associated automation (booking confirmation, modification, cancellation, loyalty club enrollment, etc.).
The external system does not send emails or execute a specific automation: it only notifies the event.
The API user needs the "automation" permission to use this endpoint.
Integration principle¶
Mirai creates or updates a booking
↓
Mirai notifies an event to HotelDataHub
↓
HotelDataHub forwards the event to Fideltour
↓
Fideltour identifies the account via the token and locates the booking/contact
↓
Fideltour fires the Automation trigger if applicable
Current status (phase 1)¶
Important: At this stage, Fideltour does not yet expose the automation endpoint, so HotelDataHub always responds with
200 acceptedregardless of Fideltour's actual response. This lets Mirai move forward with its integration.Forwarding Fideltour's real result (
409 automation_not_configured,422 booking_not_found,400 invalid_trigger,401 invalid_token) will be enabled in a later phase, once Fideltour publishes its endpoint.
Authentication¶
Each integrated account has a specific token that identifies the customer (hotel chain). The
token is sent in the Authorization header, so the external system doesn't need to send the
customer identifier with every request.
Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Available methods¶
| Method | Endpoint |
|---|---|
| POST | <PENDING: confirm public domain, e.g. https://app.hoteldatahub.io/api/v1/automation/trigger-executions/> |
Parameter table¶
| Key | Type | Required | Description |
|---|---|---|---|
trigger |
String | Yes | Event being notified. Initial examples: booking.created, booking.modified, booking.cancelled. Future examples: loyalty.member.created, loyalty.password.changed, loyalty.level.changed, loyalty.points.updated. |
booking_localizer |
String | Yes (on booking events) | Localizer Fideltour uses to find the booking within the account identified by the token. |
occurred_at |
Datetime (ISO 8601) | Recommended | Date/time the event occurred in the external system. If not provided, Fideltour uses the date/time it was received. |
event_id |
String | Optional (recommended) | Unique identifier for the event in the external system. Improves idempotency and avoids processing the same event twice on retries. |
email |
String | Optional | Helps disambiguate the booking/contact when there's a risk of duplicate localizers. |
metadata |
Object | Optional | Additional non-critical data (language, market, channel, origin, sender's technical data). |
Examples¶
Request (POST)¶
Protocol: HTTP/1.1
Method: POST
Endpoint: <PENDING: public domain>/api/v1/automation/trigger-executions/
Headers:
Content-Type: application/json
Authorization: Token xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Body:
{
"trigger": "booking.created",
"booking_localizer": "ABC123",
"occurred_at": "2026-05-26T14:30:00Z",
"event_id": "mirai-evt-123456",
"metadata": {
"source": "mirai",
"language": "es",
"market": "ES"
}
}
Responses¶
Event accepted¶
200 OK
{
"status": "accepted",
"trigger": "booking.created",
"booking_localizer": "ABC123"
}
At the current stage, this is the response HotelDataHub returns in every case where the received body is valid JSON (see Current status).
Invalid JSON¶
400 Bad Request
{
"message": "Invalid JSON data"
}
No permission¶
403 Forbidden — the API user does not have the automation permission assigned.