API Specification

Visa Apply API

v1.2.0 Active API Key Required

Submit a new visa application

Endpoint

POST /api/b2b/visa/apply.php

This API allows you to create a new visa application with applicant details, travel dates, and visa type.

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
VisaTypeIdintegerRequiredSelected visa type ID
TravelDatedateRequiredIntended travel date (YYYY-MM-DD)
ReturnDatedateOptionalReturn date (if applicable)
ApplicantsarrayRequiredApplicant details

Applicant Object

JSON Response
{
    "FirstName": "Rahul",
    "LastName": "Sharma",
    "Gender": "male",
    "DOB": "1995-05-10",
    "PassportNo": "A1234567",
    "PassportExpiry": "2030-05-10",
    "Nationality": "Indian"
}

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "VisaTypeId": 5,
    "TravelDate": "2026-06-15",
    "ReturnDate": "2026-06-25",
    "Applicants": [
        {
            "FirstName": "Rahul",
            "LastName": "Sharma",
            "Gender": "male",
            "DOB": "1995-05-10",
            "PassportNo": "A1234567",
            "PassportExpiry": "2030-05-10",
            "Nationality": "Indian"
        }
    ]
}

cURL Example

curl -X POST "https://enjoyholidayhub.com/api/b2b/visa/apply.php" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -H "X-API-Key: demo_123456789" \
  -d '{
    "VisaTypeId": 5,
    "TravelDate": "2026-06-15",
    "api_key": "demo_123456789"
}'

Response (Success)

SUCCESS Visa application submitted successfully
JSON Response
{
    "status": true,
    "message": "Visa application submitted successfully",
    "data": {
        "application_id": 1001,
        "application_ref": "VISA20260001",
        "status": "pending"
    }
}

Response (Error)

ERROR / NOTICE Application submission failed or invalid data
JSON Response
{
    "status": false,
    "message": "Application submission failed or invalid data"
}

Important Notes

  • 🛂 Multiple applicants can be added in one request
  • 📅 Travel date must be valid
  • 📄 Passport details must be accurate
  • ⚠️ Incorrect information may lead to rejection
  • 🔁 Application status starts as pending