Webhook Events
Following is a reference of the webhook events supported by Bókun. All webhook requests sent by Bókun will include the following headers:
x-bokun-apikey
x-bokun-hmac
x-bokun-topic
x-bokun-vendor-id
Some events may add additional headers.
App Uninstalled
This event is sent if a vendor uninstalls your app.
x-bokun-topic: apps/uninstall
The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:06:32.419"
}
Experience created
This event is sent when an experience is created. The experience will either be supplied or resold by the vendor that installed the app.
x-bokun-topic: experiences/create
x-bokun-experience-id: RXhwZXJpZW5jZToyNjA5
The x-bokun-experience-id
header contains the unique ID of the experience product. The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:06:32.419",
"experienceId": "RXhwZXJpZW5jZToyNjA5",
"supplierId": "VmVuZG9yOjQ",
"createMethod": "MANUAL_CREATE_EXPERIENCE"
}
You can compare the supplierId
to the value of the x-bokun-vendor-id
header to see if the app vendor is the actual supplier of the product. The createMethod
will have one of the following values, representing how the product was created:
MANUAL_CREATE_EXPERIENCE
MANUAL_CLONE
MANUAL_BOX
IMPORT_VIATOR
IMPORT_SPREADSHEET_UPLOAD
IMPORT_INVENTORY_SERVICE
GRAPHQL_APP_API
Experience updated
This event is sent when an experience is created. The experience will either be supplied or resold by the vendor that installed the app.
x-bokun-topic: experiences/update
x-bokun-experience-id: RXhwZXJpZW5jZToyNjA5
The x-bokun-experience-id
header contains the unique ID of the experience product. The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:05:33.213",
"experienceId": "RXhwZXJpZW5jZToyNjA5",
"supplierId": "VmVuZG9yOjQ",
"activated": true,
"step": "PHOTOS"
}
The activated
field specifies whether the product is activated after the update occurred. The step
field specifies which part of the product was being updated. Here are a few relevant values for step
:
TITLE_AND_TYPE
DURATION
CATEGORY
LOCATION
TIME_ZONE
DESCRIPTION
PHOTOS
VIDEOS
INCLUSIONS
EXCLUSIONS
KNOW_BEFORE_YOU_GO
REQUIREMENTS
TICKETS
EXTRAS
ITINERARY
TRANSLATIONS
CUSTOM_INPUT_FIELDS
BOOKING_TYPE
BOOKING_CUTOFF
CAPACITY_TYPE
DEPARTURE_OPTIONS
START_TIMES
OPENING_HOURS
CALENDAR
PASS_SETTINGS
ON_REQUEST_CONFIRMATION_DEADLINE
MEETING_TYPE
MEETING_POINT
PICK_UP_SERVICE
PICK_UP_TIME
PICK_UP_CONFIG
DROP_OFF_SERVICE
PRICING_CATEGORIES
RATES
COMMISSION_AND_RATES
PRICE_CATALOG
Experience availability updated
This event is sent when availability for a product is updated.
x-bokun-topic: experiences/availability_update
x-bokun-experience-id: RXhwZXJpZW5jZToyNjA5
The x-bokun-experience-id
header contains the unique ID of the experience product. The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:06:32.419",
"experienceId": "RXhwZXJpZW5jZToyNjA5",
"supplierId": "VmVuZG9yOjQ",
"updateReasons": [
"AVAILABILITY_SETTINGS_CHANGED"
],
"dateFrom": "2020-07-29",
"dateTo": "2022-08-08"
}
The dateFrom
and dateTo
give you the date range that the availability change occurs on. The updateReasons
field gives an indication about why the availability changed.
Booking created
This event is sent when a booking is created in confirmed state.
x-bokun-topic: bookings/create
x-bokun-booking-id: Qm9va2luZzozNzY0OA
The x-bokun-booking-id
header gives you the unique ID of the booking. You can then use the GraphQL API to retrieve the details.
The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:06:32.419",
"bookingId": "Qm9va2luZzozNzY0OA"
}
Booking updated
This event is sent when a booking, or one of its product bookings, is updated.
x-bokun-topic: bookings/update
x-bokun-booking-id: Qm9va2luZzozNzY0OA
Optionally, there may be an additional header:
x-bokun-experiencebooking-id: RXhwZXJpZW5jZUJvb2tpbmc6OTQ2MTg
If the change relates on one specific experience booking inside the booking, then the x-bokun-experiencebooking-id
header will identify that experience booking.
The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:06:32.419",
"bookingId": "Qm9va2luZzozNzY0OA",
"experienceBookingId": "RXhwZXJpZW5jZUJvb2tpbmc6OTQ2MTg"
}
Booking cancelled
This event is sent when a booking, or one of its product bookings, is cancelled.
x-bokun-topic: bookings/cancel
x-bokun-booking-id: Qm9va2luZzozNzY0OA
Optionally, there may be an additional header:
x-bokun-experiencebooking-id: RXhwZXJpZW5jZUJvb2tpbmc6OTQ2MTg
If one of multiple experience bookings was cancelled inside the booking, then the x-bokun-experiencebooking-id
header will identify that experience booking. Else you can assume the whole booking was cancelled.
The body will contain JSON with the following structure:
{
"timestamp": "2020-09-07T11:06:32.419",
"bookingId": "Qm9va2luZzozNzY0OA",
"experienceBookingId": "RXhwZXJpZW5jZUJvb2tpbmc6OTQ2MTg"
}
Booking Payment
This event is sent when a payment is added to a booking (after booking was confirmed).
x-bokun-topic: bookings/payment
x-bokun-booking-id: Qm9va2luZzozNzY0OA
The x-bokun-booking-id
header gives you the unique ID of the booking. You can then use the GraphQL API to retrieve the details.
Booking Refund
This event is sent when a refund is issued on a booking.
x-bokun-topic: bookings/refund
x-bokun-booking-id: Qm9va2luZzozNzY0OA
The x-bokun-booking-id
header gives you the unique ID of the booking. You can then use the GraphQL API to retrieve the details.