API Specification

Tour Block API

v1.2.0 Active API Key Required

Temporarily reserve tour seats before booking

Endpoint

POST /api/b2b/tour/block.php

This API temporarily blocks seats for a selected tour date before confirming booking. It locks availability and pricing for a limited time.

API Key Authentication

Authenticate requests via HTTP Header or Request Parameter
Required for all endpoints

Enjoy 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: demo_123456789
Get your production key in Agent Portal

Request Parameters

FieldTypeRequiredDescription
TourIdintegerRequiredUnique tour ID
TourDateIdintegerRequiredSelected tour date ID
AdultsintegerRequiredNumber of adults
ChildrenintegerOptionalNumber of children
InfantsintegerOptionalNumber of infants

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "TourId": 201,
    "TourDateId": 501,
    "Adults": 2,
    "Children": 1,
    "Infants": 0
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/tour/block.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "TourId": 201,
    "TourDateId": 501,
    "Adults": 2,
    "api_key": "demo_123456789"
}'

Response (Success)

SUCCESS Tour seats blocked successfully
JSON Response
{
    "status": true,
    "message": "Tour seats blocked successfully",
    "data": {
        "block_id": "TOURBLK123",
        "expires_at": "2026-05-01T12:00:00",
        "total_amount": 21000
    }
}

Response (Error)

ERROR / NOTICE Insufficient seats or pricing changed
JSON Response
{
    "status": false,
    "message": "Insufficient seats or pricing changed"
}

Important Notes

  • ⏳ Seats are blocked for limited time (usually 5–15 minutes)
  • ⚠️ Booking must be completed before expiry
  • 🔑 Use block_id for booking API
  • 💰 Total amount is calculated based on selected passengers
  • 🔁 Availability and pricing may change after expiry