API Specification

Visa Countries API

v1.2.0 Active API Key Required

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 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
StatusstringOptionalFilter 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