API Specification
Boarding Point API
Fetch available boarding and dropping points for selected bus
Endpoint
POST
/api/b2b/bus/boardingpoint.php
This API returns available boarding and dropping points for a selected bus result. Use this after selecting a bus from search results.
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 |
|---|---|---|---|
SearchTokenId | string | Required | Token received from search API |
ResultIndex | string | Required | Selected bus result index |
Request Example
JSON Response
{
"api_key": "YOUR_API_KEY",
"SearchTokenId": "SEARCH_TOKEN_HERE",
"ResultIndex": "TB-35"
}
cURL Example
curl -X POST "https://enjoyholidayhub.com/api/b2b/bus/boardingpoint.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"SearchTokenId": "SEARCH_TOKEN",
"ResultIndex": "TB-35",
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": {
"boarding_points": [
{
"id": 1,
"location": "ISBT Kashmere Gate",
"time": "22:30"
}
],
"dropping_points": [
{
"id": 2,
"location": "Jaipur Sindhi Camp",
"time": "06:00"
}
]
}
}
Response (Error)
ERROR / NOTICE
Invalid search token or result index
JSON Response
{
"status": false,
"message": "Invalid search token or result index"
}
Important Notes
- 📍 Boarding and dropping points depend on selected bus
- ⚠️ Always use valid SearchTokenId from search API
- 🔁 Data may change based on availability
- 🌐 User IP is handled internally by the system