API Specification
Visa Countries API
Fetch list of supported visa countries
Endpoint
POST
/api/b2b/visa/countries.php
This API returns a list of countries for which visa services are available.
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 |
|---|---|---|---|
Status | string | Optional | Filter by status (active/inactive) |
Request Example
JSON Response
{
"api_key": "YOUR_API_KEY",
"Status": "active"
}
cURL Example
curl -X POST "https://enjoyholidayhub.com/api/b2b/visa/countries.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": [
{
"country_id": 1,
"country_name": "United Arab Emirates",
"country_code": "AE",
"status": "active"
},
{
"country_id": 2,
"country_name": "Singapore",
"country_code": "SG",
"status": "active"
},
{
"country_id": 3,
"country_name": "Thailand",
"country_code": "TH",
"status": "active"
}
]
}
Response (Error)
ERROR / NOTICE
No countries found
JSON Response
{
"status": false,
"message": "No countries found"
}
Important Notes
- 🌍 Used for visa search and application flow
- 📌 Use country_id for visa types API
- 🔁 Data is mostly static and can be cached
- ✔ Only active countries should be shown