API Specification

Visa Upload Documents API

v1.2.0 Active API Key Required

Upload required documents for visa application

Endpoint

POST /api/b2b/visa/upload-documents.php

This API allows uploading required documents for a visa application. Documents must match the requirements of the selected 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
ApplicationIdintegerRequiredVisa application ID
DocumentsarrayRequiredList of documents to upload

Document Object

JSON Response
{
    "DocumentName": "Passport Copy",
    "File": "BASE64_ENCODED_FILE_OR_URL"
}

Request Example

JSON Response
{
    "api_key": "YOUR_API_KEY",
    "ApplicationId": 1001,
    "Documents": [
        {
            "DocumentName": "Passport Copy",
            "File": "BASE64_STRING_HERE"
        },
        {
            "DocumentName": "Photograph",
            "File": "BASE64_STRING_HERE"
        }
    ]
}

cURL Example

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

Response (Success)

SUCCESS Documents uploaded successfully
JSON Response
{
    "status": true,
    "message": "Documents uploaded successfully",
    "data": {
        "application_id": 1001,
        "uploaded_documents": [
            "Passport Copy",
            "Photograph"
        ]
    }
}

Response (Error)

ERROR / NOTICE Document upload failed or invalid format
JSON Response
{
    "status": false,
    "message": "Document upload failed or invalid format"
}

Important Notes

  • 📄 Documents must match visa requirements
  • 📂 Supported formats: PDF, JPG, PNG
  • ⚠️ Invalid or unclear documents may lead to rejection
  • 🔁 Documents can be re-uploaded if rejected
  • 🛂 Ensure correct document naming