API Specification

Visa Types API

v1.2.0 Active API Key Required

Fetch available visa types for a country

Endpoint

POST /api/b2b/visa/visa-types.php

This API returns available visa types for a selected country including processing time and validity.

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
CountryIdintegerRequiredSelected country ID

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "CountryId": 1
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/visa/visa-types.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "CountryId": 1,
    "api_key": "demo_123456789"
}'

Response Example

JSON Response
{
    "status": true,
    "data": [
        {
            "visa_type_id": 5,
            "visa_type": "Tourist Visa",
            "processing_days": 3,
            "validity": "30 Days"
        },
        {
            "visa_type_id": 6,
            "visa_type": "Business Visa",
            "processing_days": 5,
            "validity": "90 Days"
        }
    ]
}

Response (Error)

ERROR / NOTICE Visa types not found
JSON Response
{
    "status": false,
    "message": "Visa types not found"
}

Important Notes

  • 🌍 Use CountryId from countries API
  • 📌 Use visa_type_id for pricing and requirements
  • ⏳ Processing days are approximate
  • 📅 Validity indicates how long visa remains active