Sandbox mode — all API calls hit test environments. No real bookings or charges.

API Documentation

Full REST API for searching, checking availability, and booking tours and activities. All responses are JSON. No authentication is required for sandbox testing.

Base URL
http://localhost:3017
Format
JSON
Auth (Sandbox)
None required
Sandbox vs Production
Sandbox is open and free — test the full booking flow with no real charges. For production access with live provider inventory, contact us.

Booking Workflow

The typical integration follows this flow:

1
Search
Find cities & activities
2
Availability
Check dates & time slots
3
Hold & Pay
Reserve + Stripe checkout
4
Confirm
Finalize booking
GET/api/search/destinations

Search for cities and destinations by name.

Parameters

NameTypeRequiredDescription
qstringYesSearch query (min 2 chars)
langstringNoLanguage code (default: en)
limitnumberNoMax results (default: 10, max: 20)
SandboxTry it
GET/api/search/activities

Search activities by text, city, or filters. Returns paginated results with pricing.

Parameters

NameTypeRequiredDescription
qstringNoFull-text search query
citynumberNoCity ID (from destinations search)
city_namestringNoCity name (resolved to ID via full-text search, e.g. "rome")
sortstringNocaliber (default), rating, reviews
pagenumberNoPage number (default: 1)
limitnumberNoResults per page (default: 20, max: 100)
langstringNoLanguage code (default: en)
providersstringNoComma-separated provider IDs (2=Tiqets, 3=Viator, 7=Headout)
min_ratingnumberNoMinimum review rating
SandboxTry it
GET/api/search/product/:id

Get full product detail including description, gallery, itinerary, pricing, features, and cancellation policy.

Parameters

NameTypeRequiredDescription
idnumberYesActivity ID (URL param)
langstringNoLanguage code (default: en)
SandboxTry it
POST/api/availability/schedule

Get a monthly availability calendar. Returns which dates have available slots.

Body Parameters

NameTypeRequiredDescription
activityIdnumberYesActivity ID
dateFromstringYesStart date (YYYY-MM-DD)
dateTostringYesEnd date (YYYY-MM-DD)
currencystringNoCurrency code (default: EUR)
SandboxTry it
POST/api/availability/slots

Get real-time bookable time slots for a specific date. Use after the user selects a date from the schedule.

Body Parameters

NameTypeRequiredDescription
activityIdnumberYesActivity ID
datestringYesDate (YYYY-MM-DD)
adultsnumberNoNumber of adults (default: 2)
childrennumberNoNumber of children (default: 0)
currencystringNoCurrency code (default: EUR)
SandboxTry it
POST/api/booking/options

Get booking form fields: product variants, age bands, booking questions, language guides, and cancellation policy.

Body Parameters

NameTypeRequiredDescription
activityIdnumberYesActivity ID
currencystringNoCurrency code (default: EUR)
productOptionCodestringNoSpecific variant code (returns all if omitted)
SandboxTry it
POST/api/booking/hold

Hold a booking and create a Stripe Checkout session. Returns a checkoutUrl to redirect the customer to Stripe for payment. The hold uses manual capture — the card is authorized but not charged until the booking is confirmed with the provider.

Body Parameters

NameTypeRequiredDescription
activityIdnumberYesActivity ID
datestringYesTravel date (YYYY-MM-DD)
startTimestringNoTime slot (HH:MM) or omit for ON_DEMAND
productOptionCodestringYesProduct variant code (from booking/options)
passengersobjectYes{ adults: number, children?: number }
contactobjectYes{ firstName, lastName, email, phone }
travelersarrayNoTraveler details per person
bookingAnswersarrayNoAnswers to booking questions
languageGuideobjectNoSelected language guide
currencystringNoCurrency (default: EUR)

Response

{
  "checkoutUrl": "https://checkout.stripe.com/...",
  "internalRef": "TS-3-abc123-def456",
  "expiresAt": "2026-04-10T15:30:00Z",
  "retailPrice": 5400,
  "currency": "EUR"
}
SandboxTry it
POST/api/booking/confirm

Confirm a booking after Stripe payment. Call this with the session_id from the Stripe success redirect. This captures the payment and confirms with the provider.

Body Parameters

NameTypeRequiredDescription
sessionIdstringYesStripe Checkout session ID (from success URL query param)

Response

{
  "status": "confirmed",
  "internalRef": "TS-3-abc123-def456",
  "providerRef": "BR-12345678",
  "voucherUrl": "https://...",
  "ticketUrl": "https://...",
  "activityName": "Colosseum Skip-the-Line Tour",
  "travelDate": "2026-05-15"
}
SandboxTry it
POST/api/booking/status

Check the current status of a booking.

Body Parameters

NameTypeRequiredDescription
internalRefstringYesInternal booking reference (e.g. TS-3-abc123-def456)
SandboxTry it
POST/api/booking/cancel

Cancel a booking. Cancels with the provider and refunds the Stripe payment.

Body Parameters

NameTypeRequiredDescription
internalRefstringYesInternal booking reference
SandboxTry it

Stripe Payment Flow

The booking system uses Stripe's manual capture mode for safe payment handling:

  1. HoldPOST /api/booking/hold creates a Stripe Checkout session with capture_method: manual. The customer's card is authorized but not charged.
  2. Redirect — Redirect the customer to the returned checkoutUrl. Stripe handles card input securely.
  3. Success callback — After payment, Stripe redirects to your success URL with ?session_id=....
  4. Confirm — Call POST /api/booking/confirm with the session ID. This confirms with the provider, then captures the payment.
  5. Failure — If the provider rejects the booking, the payment authorization is cancelled automatically (no charge).
30-minute expiry
Stripe sessions expire after 30 minutes. If the customer doesn't complete payment in time, the hold is released.

MCP Server

This API is available as a Model Context Protocol (MCP) server, allowing AI agents (Claude, GPT, etc.) to search, check availability, and book activities programmatically.

Configuration

Add the following to your MCP client config (e.g. claude_desktop_config.json or .claude/settings.json):

{
  "mcpServers": {
    "tours-api": {
      "command": "npx",
      "args": ["-y", "@anthropic-ai/mcp-remote", "http://localhost:3017/api/mcp"]
    }
  }
}

Available Tools

ToolDescription
search_citiesSearch for cities by name. Params: query, lang
search_activitiesSearch activities by city name or text query. Params: city_name, query, providers, sort, limit
get_productGet full product detail. Params: activity_id, lang
check_availabilityGet available dates and time slots. Params: activity_id, date_from, date_to
get_slotsGet bookable time slots for a date. Params: activity_id, date, adults
get_booking_optionsGet booking form fields (variants, questions). Params: activity_id
hold_bookingHold a booking and get Stripe checkout URL. Params: activity_id, date, start_time, product_option_code, adults, contact
confirm_bookingConfirm after Stripe payment. Params: session_id
booking_statusCheck booking status. Params: internal_ref
cancel_bookingCancel a booking. Params: internal_ref

Example Agent Prompt

"Find skip-the-line tours in Rome for 2 adults on April 20th.
Check availability and show me the best options with prices."
Sandbox by default
The MCP server runs in sandbox mode. All bookings are test-only. For production MCP access, contact us.

Response Codes

CodeMeaning
200Success
400Bad request — missing or invalid parameters
404Resource not found
422Unprocessable — provider error or business logic failure
500Internal server error