Spaces:
Sleeping
Sleeping
| 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 | |
| ``` | |
| --- | |