API Specification
Visa Upload Documents API
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 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 |
|---|---|---|---|
ApplicationId | integer | Required | Visa application ID |
Documents | array | Required | List 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