API Specification

Update Booking API

v1.2.0 Active API Key Required

Update passenger details for an existing bus booking

Endpoint

POST /api/b2b/bus/updatebookingdetail.php

This API allows you to update passenger details for an existing booking. Only limited fields such as name, contact details, or minor corrections can be updated.

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
BookingIdintegerRequiredUnique booking ID
PassengersarrayRequiredUpdated passenger details

Passenger Object

JSON Response
{
    "Name": "Rahul Sharma",
    "Age": 30,
    "Gender": "male",
    "SeatNo": "A1"
}

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "BookingId": 12345,
    "Passengers": [
        {
            "Name": "Rahul Sharma",
            "Age": 30,
            "Gender": "male",
            "SeatNo": "A1"
        }
    ]
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/bus/updatebookingdetail.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "BookingId": 12345,
    "api_key": "demo_123456789"
}'

Response (Success)

SUCCESS Booking details updated successfully
JSON Response
{
    "status": true,
    "message": "Booking details updated successfully",
    "data": {
        "booking_id": 12345,
        "status": "updated"
    }
}

Response (Error)

ERROR / NOTICE Update failed or booking not eligible for modification
JSON Response
{
    "status": false,
    "message": "Update failed or booking not eligible for modification"
}

Important Notes

  • ✏️ Only minor corrections are allowed after booking
  • 🚫 Seat change or route change is not allowed
  • ⚠️ Updates may be restricted after departure time
  • 🔁 Some updates depend on operator approval