Coming from another booking system? A free month while you move to Tourandi, with our help.See how →

Skip to content
tourandi

Developers

Booking API and widget for your website

Embed your booking page with one line of code, or build your own checkout on Tourandi's public API: catalogue, availability, pricing and bookings confirmed against real capacity.

  • One line for the widget
  • Publishable keys per domain
  • Read-only iCal feeds
index.html
<script src="https://app.tourandi.com/embed.js" data-slug="your-company" async></script>

Booking widget

Your booking page on your website, in one line

The script drops an iframe exactly where you paste it and keeps its height in sync with the content, so there are no scrollbars and no heights to guess. It has no dependencies and works on any site that accepts HTML.

Your ready-made snippet is in the dashboard under Settings › Online booking. That's also where the visual editor lets you set colours and wording.

Attributes

data-slug
Required. Your company's identifier in Tourandi.
data-tour
Shows a single tour instead of the whole catalogue.
data-ref
A guide's referral code: bookings made through this widget are attributed to them.
data-lang
Forces the page language instead of letting the visitor choose.
data-consent
"granted" or "denied": your site's cookie consent. Without it, the widget loads no Google Analytics, Tag Manager or Meta Pixel.

After payment, the widget can send customers to your own thank-you page (https only), set in your settings.

Full widget guide

The minimum

HTML
<script src="https://app.tourandi.com/embed.js" data-slug="your-company" async></script>

One tour, in English, with consent

HTML
<script  src="https://app.tourandi.com/embed.js"  data-slug="your-company"  data-tour="TOUR_ID"  data-lang="en"  data-consent="denied"  async></script>

If your cookie banner changes later

JS
// when the visitor accepts marketing cookieswindow.Tourandi.setConsent("granted");

Public booking API

Build your own checkout on the public API

The public API exposes what a booking website needs: the catalogue, availability with seats left, the price of a basket and the confirmed booking. All under /api/v1/public/your-company.

Publishable keys

Keys are created in the dashboard (owners and admins). They start with pk_ and are safe to use in the browser because they aren't secrets: they only work for your company and from the origins you allow.

  • Send the key in the X-Tourandi-Key header
  • Up to 20 origins per key; no origins means server-to-server only
  • Rotate or revoke a key in one click, recorded in the activity log

Main endpoints

MethodPathWhat it's for
GET/companyCompany details, branding and policies
GET/toursActive tours with their options and ticket types
GET/categoriesCategories, for filters or tabs
GET/availabilityAn option's departures with seats left (up to 62 days)
POST/quotePrice a basket: season, automatic discount and promo code
POST/promo-codes/checkCheck a promo code before booking
POST/gift-vouchers/checkCheck a gift voucher and its balance
POST/bookingsCreate the booking, confirmed against real capacity
GET/bookings/{reference}Fetch a booking with its access token

Booking with no duplicates and no overselling

Every booking needs an Idempotency-Key header: if the request is repeated with the same key, you get the same booking back instead of a new one. Bookings go through the same capacity check as the dashboard, so nothing is confirmed beyond the selling limit, even when several arrive at once. If a booking can't be made, the 409 response says why: sold out, past the cut-off, closed or on request.

Customer self-service

With the access token returned with the booking (and sent in the confirmation email), customers can view their booking, download the voucher with its QR code, update their details, change the date or party size, or cancel, always within the deadlines you set.

An option's availability

BASH
# TOURANDI_API: the base URL of Tourandi's APIcurl "$TOURANDI_API/api/v1/public/your-company/availability?optionId=OPTION_ID&from=2026-11-01&to=2026-11-30" \  -H "X-Tourandi-Key: pk_…"

Create a booking

BASH
curl -X POST "$TOURANDI_API/api/v1/public/your-company/bookings" \  -H "X-Tourandi-Key: pk_…" \  -H "Idempotency-Key: checkout-7f3a9c" \  -H "Content-Type: application/json" \  -d '{    "departureId": "DEPARTURE_ID",    "items": [{ "ticketTypeId": "ADULT_ID", "quantity": 2 }],    "customer": { "name": "Emma Johnson", "email": "emma@example.com" },    "payment": "now"  }'

The API is described in OpenAPI. If you're integrating it, get in touch and we'll send you the full reference, with every field and response.

Request the API reference

Calendar feeds

Your departures in any calendar

iCal feeds are secret, read-only URLs that Google Calendar, Apple Calendar or Outlook subscribe to. They update on their own and can be revoked whenever you like.

  • Company feeds: every departure, or filtered by destination or tour
  • A personal feed for every guide, covering their assignments across companies
  • Each event carries the tour, time, meeting point, seats booked and guides
  • They never include customers' personal data

What about webhooks?

Tourandi doesn't send webhooks to external systems today. If you need another system to hear about every booking, tell us: it helps us decide which events to expose first.

FAQ

Questions from developers

What technical teams usually ask before integrating Tourandi.

Is it safe to put the publishable key in my website's code?

Yes, that's what it's designed for. A publishable key only works with your company's public API and, from a browser, only on the origins you allowed when creating it. It gives no access to the dashboard or to other customers' data: each booking is protected by its own access token. If a key leaks, rotate or revoke it in one click.

What's the difference between the widget and the API?

The widget is Tourandi's booking page inside your website: ready in minutes, with your branding, payments and emails included. The API is for building your own checkout with your own design: you read tours, availability and prices, and create the booking yourself. Many operators start with the widget and move to the API when they need to.

How do I avoid duplicate bookings if a customer clicks twice?

Every booking request carries an Idempotency-Key header. If the same request arrives twice with the same key, the API returns the booking it already created instead of making another. On top of that, the booking is confirmed inside a transaction that locks the departure, so capacity is never exceeded even when requests arrive at the same time.

Can bookings made through the API be paid online?

Yes. If your company has a gateway connected, the booking can ask for payment straight away: the response includes the payment page URL or the details for an embedded payment form, and the seats are held while the customer pays. You can also leave payment for later, by bank transfer or on the day.

Does Tourandi have webhooks?

We don't send webhooks to external systems yet. To see your departures in another calendar you can use the iCal feeds, and to read bookings from your own system, the API. If you need real-time events, write to us and tell us your use case: it helps us prioritise.

Start selling more with less work

Let's talk about your business

Tell us what tours you sell and how you work today. We'll reply within one working day with what Tourandi can do for you and a price that fits.

Get in touch

I'd like a walkthrough first

We'll show you Tourandi with your own tours, answer your questions and plan the move from your current system together.

Book a demo