The main difference between how Webhooks and APIs generally work:
- APIs place calls without knowing whether they get any data update as a response or not.
- Webhooks receive calls through HTTP POSTs from external systems only when those have some data updates.
Webhooks can then "activate" the whole integration workflow to act on these updates. This activation happens for a reason (because there is a real update to process), not just because it's time to make yet another check for an update.
Webhooks also provide other applications and services with (near) real-time information. This is possible through APIs too, but it involves more effort and is extremely resource-consuming. Webhooks make real-time really simple.
Note: Here is the article on how to Get started with the API.
1. Create your own Webhook
- Go to Connectivity > Webhooks in your Regiondo Account.
- Name your Webhook. The name is up to you. Example: Google Notification
- Choose one of the 3 Trigger types: Booking, Customer or Ticket.
- Enter the Payload URL. This is the URL to be called when the Webhook Trigger happens in the dashboard.
- Test the URL before you save/activate the Webhook.
2. Response values
2.1. Booking
{
"booking_key": "1-2605248-44215-75508-1556874000",
"product_id": "44215",
"product_supplier_id": "9357",
"option_id": "174184",
"variation_id": "75508",
"order_id": "2605248",
"option_name": "Adulte",
"variation_name": "Tours en Français ",
"ticket_name": "La route de Bordeaux",
"product_name": "La route de Bordeaux",
"qty": "1",
"qty_cancelled": "0",
"event_date_time": "2019-05-03T09:00:00+02:00",
"date_applied_for": "2019-05-03T09:00:00+02:00",
"created_at": "2019-04-30T11:02:45+02:00",
"type": "booking",
"status": "approved",
"external_id": null,
"email": "customer.name@regiondo.com",
"phone_number": null,
"first_name": "Customer",
"last_name": "Name",
"duration_type": "minute",
"duration_value": "50.00",
"order_number": "1556614985033893200",
"distribution_channel_partner": "Company Short-name or Name",
"contact_data": {
"firstname": "Customer",
"lastname": "Name",
"email": "customer.name@regiondo.com",
"telephone": null,
"is_subscribed": "no"
}
}2.2. Customer
{
"customer_email": "customer.name@regiondo.com",
"customer_firstname": "Customer",
"customer_lastname": "Name",
"customer_phone": "",
"customer_birth_date": null,
"customer_street": null,
"customer_postcode": null,
"customer_city": null,
"customer_country": null,
"customer_newsletter_status": 0,
"customer_newsletter_order": null,
"customer_newsletter_datetime": null,
"customer_newsletter_ip": null
}{
"customer_email": "customer.name@regiondo.com",
"customer_firstname": "Customer",
"customer_lastname": "Name",
"customer_phone": "",
"customer_birth_date": null,
"customer_street": "Neumarkter Str. 63",
"customer_postcode": "81673",
"customer_city": "München",
"customer_country": "DE",
"customer_newsletter_status": 0,
"customer_newsletter_order": null,
"customer_newsletter_datetime": null,
"customer_newsletter_ip": null
}2.3. Ticket
{
"code": "RE57WGQH0G6S",
"status": "processing",
"validation_status": "not validated",
"data": {
"validated_at": "2019-04-30T11:03:11+02:00",
"product_info": {
"product_name": "La route de Bordeaux",
"variation_name": "Tours en Français ",
"option_name": "Adulte",
"ticket_datetime": "2019-05-03T09:00:00+02:00"
},
"customer_info": {
"customer_name": "Mr. Customer Name",
"customer_email": "customer.name@regiondo.com"
}
}
}{
"code": "RE57WGQH0G6S",
"status": "sent",
"validation_status": "validated",
"data": {
"validated_at": "2019-04-30T11:09:09+02:00",
"product_info": {
"product_name": "La route de Bordeaux",
"variation_name": "Tours en Français ",
"option_name": "Adulte",
"ticket_datetime": "2019-05-03T09:00:00+02:00"
},
"customer_info": {
"customer_name": "Mr. Customer Name",
"customer_email": "customer.name@regiondo.com"
}
}
}
3. Add discount code
You can add information about the discount amount, the currency and the discount code. You will also be shown the total amount of the booking.
3.1. A discount is used
"coupon_code": "HALF_PRICE" "total_paid": "249.50" "coupon_discount": "249.50" "total": "499.00" "currency_code": "CHF"
3.2. A discount is not used
"coupon_code": null "total_paid": "10.00" "coupon_discount": "0.00" "total": "10.00" "currency_code": "EUR"
4. Webhooks on Merchandising – Add-ons
It is possible to connect to Add-ons, but there are limitations:
- VAT is not passed on.
- The amount of the product is added to the amount of the reservation, including VAT.
- Only the total amount of the order is shown, i.e. the amount of the offer plus the add-on.
- Example: offer amount 50E + add-on 5E = 55 EUROS.
All other information is transmitted, such as product identification, quantity, cancellations, status, payment, reservation number, buyer information and order price including VAT.