Spaces:
Sleeping
Sleeping
File size: 6,877 Bytes
2d9cdfb 04f322e 5df0921 2883543 f8bb6ab 5df0921 2883543 5df0921 2883543 5df0921 973f6f3 4b7ef2c 5df0921 2883543 12a4071 2883543 5df0921 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 | ---
title: Api Web Crawler
emoji: ๐ฆ
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
---
### HOW TO RUN VISA CHECKER
```bash
python -m app.util.visa_availability_scraper_playwright
```
---
# ๐ Visa Letter PDF Generator API
This API automatically generates **embassy-ready visa cover letters** in PDF format using FPDF2.
It currently supports:
- ๐ช๐บ **Schengen Visa (Individual & Group Trip)**
- ๐ฏ๐ต **Japan Multi-Entry Visa**
---
## ๐งพ Endpoints Overview
| Endpoint | Method | Description |
|-----------|---------|-------------|
| `/generate/<doc-type>` | POST | Generate a document |
| `/generate/schengen` | POST | Generate a Schengen visa cover letter for a group/family trip |
| `/generate/japan-multientry` | POST | Generate a Japan multi-entry visa support letter |
| `/generate/sponsorship` | POST | Generate sponsorship letter |
| `/generate/housewife-statement` | POST | Generate housewife statement letter |
| `/generate/passport-collection` | POST | Generate passport collection consent letter |
---
## ๐ช๐บ Schengen Visa Cover Letter
### **Endpoint**
```
POST /generate/schengen
```
### **Sample Request**
#### Individual Trip
```bash
curl -X POST http://localhost:5000/generate/schengen \
-H "Content-Type: application/json" \
-d '{
"country": "Germany",
"city": "Jakarta",
"purpose": "tourism",
"main_destination": "Germany",
"event": "personal vacation",
"other_destinations": "France and Italy",
"travel_start": "1st August 2024",
"travel_end": "16th August 2024",
"duration": "16 days and 15 nights",
"personal_details": {
"name": "John Doe",
"dob": "1st January 1985",
"nationality": "Indonesian",
"occupation": "Software Engineer",
"passport_number": "A1234567"
},
"trip_highlight": "visit cultural landmarks, museums, and enjoy sightseeing in Germany",
"contact_email": "john@example.com",
"contact_phone": "+62 812 3456 7890",
"job_commitment": "Software Engineer at PT. Example Indonesia",
"financial_status": "sound"
}' -- output Schengen_Visa_Cover_Letter.pdf
```
#### Schengen Visa Cover Letter (Group Trip)
```bash
curl -X POST http://localhost:5000/generate/schengen/group \
-H "Content-Type: application/json" \
-d '{
"country": "Germany",
"city": "Jakarta",
"purpose": "family visit",
"main_destination": "Germany",
"event": "family gathering",
"other_destinations": "France and Italy",
"travel_start": "1st August 2024",
"travel_end": "16th August 2024",
"duration": "16 days and 15 nights",
"personal_details": {
"name": "John Doe",
"dob": "1st January 1985",
"nationality": "Indonesian",
"occupation": "Software Engineer",
"passport_number": "A1234567"
},
"group_members": [
{
"relationship": "Wife",
"name": "Jane Doe",
"dob": "5th May 1987",
"occupation": "Teacher",
"nationality": "Indonesian",
"passport_number": "B7654321"
},
{
"relationship": "Son",
"name": "Jack Doe",
"dob": "10th August 2010",
"occupation": "Student",
"nationality": "Indonesian",
"passport_number": "C9988776"
}
],
"trip_highlight": "explore cultural landmarks and visit family together",
"contact_email": "john@example.com",
"contact_phone": "+62 812 3456 7890",
"job_commitment": "Software Engineer at PT. Example Indonesia",
"financial_status": "sound"
}' --output Schengen_Group_Cover_Letter.pdf
```
## Japan Multi-Entry Visa Letter
### Endpoint
```
POST /generate/japan-multientry-tourist
```
#### Sample Requests
```bash
curl -X POST http://localhost:5000/generate/japan-multientry-tourist \
-H "Content-Type: application/json" \
-d '{
"name": "John Doe",
"address": "Gatot Subroto St., Senayan",
"city": "Jakarta Selatan",
"postal_code": "51001",
"email": "john@example.com",
"phone": "+62 812 3456 7890"
}' -- output Japan_MultiEntry_Visa_Letter.pdf
```
## Sponsorshi Letter
### **Endpoint**
```
POST /generate/sponsorship
```
### **Sample Request**
```bash
curl -X POST http://localhost:5000/generate/sponsorship \
-H "Content-Type: application/json" \
-d '{
"sponsor_name": "Mr. John Sponsor",
"sponsor_address": "123 Sponsor St, Appt 4B",
"sponsor_postal_code": "New York, NY 10001",
"sponsor_email": "john.sponsor@email.com",
"sponsor_contact_number": "+1 (555) 123-4567",
"officer_title": "Visa Officer",
"embassy_name": "Embassy of [Country]",
"embassy_address": "456 Embassy Row",
"embassy_city_state_postal": "Washington, D.C. 20008",
"applicant_name": "Ms. Jane Applicant",
"applicant_dob": "January 15, 1995",
"applicant_passport_no": "X12345678",
"visa_name": "B-2 Visitor Visa",
"sponsor_relationship": "friend",
"visit_reason": "attend my wedding and for tourism",
"destination_country": "the United States",
"visit_start_date": "December 1, 2024",
"visit_end_date": "December 20, 2024",
"visit_purpose_details": "a personal visit to attend my wedding ceremony on December 5th and to tour New York City"
}' -- output document.pdf
```
## Housewife Statement Letter
### **Endpoint**
```
POST /generate/housewife-statement
```
### **Sample Request**
```bash
curl -X POST http://localhost:5000/generate/housewife-statement \
-H "Content-Type: application/json" \
-d '{
"applicant_name": "Mrs. Sarah Wijaya",
"applicant_dob": "Jakarta, April 10, 1985",
"applicant_passport": "B1234567",
"sponsor_name": "Mr. Budi Wijaya",
"sponsor_bank_details": "Bank Central Asia (BCA): 123-456-7890",
"destination_country": "Japan",
"visa_type": "tourism",
"visit_end_date": "November 20, 2024",
"travel_companions": "my husband, Budi Wijaya, and my son, Putra Wijaya",
"letter_location": "Jakarta",
"letter_date": "October 28, 2024"
}' -- output housewife.pdf
```
## Passport Collection Consent Letter
```
POST /generate/passport-collection
```
### **Sample Request**
```bash
curl -X POST http://localhost:5000/generate/passport-collection \
-H "Content-Type: application/json" \
-d ' {
"applicant_name": "Budi Hartono",
"applicant_nik": "3171234567890001",
"applicant_address": "Jl. Kemerdekaan No. 17, akarta Pusat",
"agent_name": "Citra Lestari",
"agent_nik": "3171098765432100",
"agent_address": "Jl. Melati No. 8, akarta Selatan",
"passport_no": "C1234567",
"letter_location": "Jakarta",
"letter_date": "18th July 2024"
}' -- output document.pdf
```
---
|