Quick Start
This guide will walk you through making your first API call to the Project Expedition API.
Prerequisites
Before you begin, you’ll need:
- A registered account at projectexpedition.com
- An API access token (contact partners@projectexpedition.com)
Your First API Call
Let’s search for tours in Ireland. This is one of the most common API operations.
curl -H "access-token: YOUR_TOKEN" \ "https://apistage.projectexpedition.com/v1/return_tours?country=ireland"const response = await fetch( 'https://apistage.projectexpedition.com/v1/return_tours?country=ireland', { headers: { 'access-token': 'YOUR_TOKEN' } });
const tours = await response.json();console.log(tours);<?php$context = stream_context_create([ 'http' => [ 'method' => 'GET', 'header' => 'access-token: YOUR_TOKEN' ]]);
$response = file_get_contents( 'https://apistage.projectexpedition.com/v1/return_tours?country=ireland', false, $context);
$tours = json_decode($response, true);print_r($tours);Understanding the Response
A successful response returns an array of tour objects:
[ { "about": { "name": "Cliffs of Moher Day Trip from Dublin", "country": "Ireland", "type": "Tour", "pe_rating": "4.8" }, "itinerary": { "highlights": "Visit the stunning Cliffs of Moher...", "duration": "12 hours" }, "logistics": { "town": "Dublin", "region": "Leinster", "hotel_pickup_offered": "Yes" }, "pricing": { "price": 65.00, "currency": "EUR", "price_description": "per person" }, "booking_meta": { "id": "PE12031", "confirmation_type": "Instant", "cancellation_window": 3 } }]Complete Booking Flow
Here’s the typical flow for booking a tour:
-
Search for Tours
Use
/return_tourswith filters like country, region, or coordinates. -
Check Availability
Call
/return_availabilitywith the product ID and date to get pricing and time slots. -
Create Booking
Submit a POST request to
/bookingwith traveler details and payment info. -
Confirm Booking
Receive a booking reference and voucher URLs in the response.
Checking Availability
Once you find a tour, check its availability:
curl -H "access-token: YOUR_TOKEN" \ "https://apistage.projectexpedition.com/v1/return_availability?id=PE12031&date=2025-06-15&adults=2¤cy=EUR"const response = await fetch( 'https://apistage.projectexpedition.com/v1/return_availability' + '?id=PE12031&date=2025-06-15&adults=2¤cy=EUR', { headers: { 'access-token': 'YOUR_TOKEN' } });
const availability = await response.json();Creating a Booking
Submit a booking request:
curl -X POST \ -H "access-token: YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "product_id": "PE12031", "date": "2025-06-15", "time": "7:00 am", "phone": "+1 555 123 4567", "email": "john@example.com", "adults": "John Smith,Jane Smith", "partner_ref": "MY-REF-001" }' \ "https://apistage.projectexpedition.com/v1/booking"const response = await fetch( 'https://apistage.projectexpedition.com/v1/booking', { method: 'POST', headers: { 'access-token': 'YOUR_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ product_id: 'PE12031', date: '2025-06-15', time: '7:00 am', phone: '+1 555 123 4567', email: 'john@example.com', adults: 'John Smith,Jane Smith', partner_ref: 'MY-REF-001' }) });
const booking = await response.json();Next Steps
- Authentication - Learn about API tokens and headers
- Environments - Staging vs Production
- Rate Limits - Usage limits and caching best practices
- Pricing Models - Understanding the 4 pricing types