API Specification
Tour Availability API
Check available dates, slots, and pricing for a tour
Endpoint
POST
/api/b2b/tour/availability.php
This API returns available travel dates, seat availability, and pricing details for a selected tour.
API Key Authentication
Authenticate requests via HTTP Header or Request ParameterEnjoy Holiday Hub APIs authenticate requests using your unique secret API Key. You can provide your key in either of the following standard formats:
Method 1: Header (Recommended)
Send key in standard HTTP header:
X-API-Key: demo_123456789
Method 2: Body / Query
Send key in JSON payload or query param:
"api_key": "demo_123456789"
Demo Sandbox Key:
Get your production key in Agent Portal
demo_123456789
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
TourId | integer | Required | Unique tour ID |
TravelDate | date | Optional | Specific travel date (YYYY-MM-DD) |
Request Example
JSON Response
{
"api_key": "YOUR_API_KEY",
"TourId": 201
}
cURL Example
curl -X POST "https://enjoyholidayhub.com/api/b2b/tour/availability.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"TourId": 201,
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": [
{
"tour_date_id": 501,
"travel_date": "2026-06-10",
"available_seats": 10,
"price": {
"adult": 8000,
"child": 5000,
"infant": 2000
},
"status": "available"
},
{
"tour_date_id": 502,
"travel_date": "2026-06-15",
"available_seats": 0,
"price": {
"adult": 8500,
"child": 5200,
"infant": 2000
},
"status": "sold_out"
}
]
}
Response (Error)
ERROR / NOTICE
No availability found for selected tour
JSON Response
{
"status": false,
"message": "No availability found for selected tour"
}
Important Notes
- 📅 Use tour_date_id for booking
- 👥 Available seats are limited and updated in real-time
- 💰 Pricing may vary by date
- 🔁 Always check availability before booking
- 🌍 Status can be available or sold_out