Flight Ticket, Hotel Booking, Visa — 3 types
Travel Documents
Travel document types extract structured itinerary and booking data. and handle printed tickets, PDF bookings, and scanned visa pages.
flight_ticket — Flight Ticket
Analysis type: extraction
Handles single-leg and multi-leg itineraries, multiple passengers, and bookings from any airline or travel platform.
Fields extracted
| Field | Type | Notes |
|---|---|---|
passenger_name | string | Full name of primary / lead passenger |
all_passengers | object[] | Each: name, title (Mr/Mrs/Ms/Mstr), ticket_number |
airline | string | Primary airline name |
flight_number | string | First leg flight number |
pnr | string | PNR or booking reference |
booking_id | string | Booking platform reference |
booking_status | string | confirmed, waitlisted, cancelled |
origin_city | string | First departure city |
origin_iata | string | 3-letter IATA code or null |
origin_country | string | Country of departure |
destination_city | string | Final destination city (skips transit stops) |
destination_iata | string | Final destination IATA code or null |
destination_country | string | Final destination country |
via_cities | string[] | Intermediate connection cities |
departure_date | string | YYYY-MM-DD — date of first departure leg |
departure_time | string | HH:MM or null |
arrival_date | string | YYYY-MM-DD — arrival at final destination |
arrival_time | string | HH:MM or null |
travel_class | string | economy, business, first |
baggage_allowance | string | e.g. 15kg, 2 pieces |
total_fare | number | null if not printed |
currency | string | null if not printed |
Validation rules
| Field | Rule |
|---|---|
passenger_name | Required |
destination_city | Required |
destination_country | Required |
departure_date | Required · Format: date_iso |
Example
const result = await client.verify.document({
doc_type: "flight_ticket",
file_url: "https://storage.example.com/flight_booking.pdf",
});
// result.output.passenger_name → "SHARMA ANITA"
// result.output.pnr → "ABC123"
// result.output.origin_city → "Mumbai"
// result.output.destination_city → "London"
// result.output.destination_country → "United Kingdom"
// result.output.departure_date → "2026-04-15"
// result.output.via_cities → ["Dubai"]
hotel_booking — Hotel Booking
Analysis type: extraction
Handles booking confirmations from hotels and OTAs (MakeMyTrip, Booking.com, Agoda, etc.).
Fields extracted
| Field | Type | Notes |
|---|---|---|
guest_name | string | Lead / primary guest name as on booking |
all_guests | object[] | Each: name, is_primary |
hotel_name | string | Hotel / property name |
address | string | Full property address |
city | string | null if not printed |
country | string | Country where hotel is located |
check_in_date | string | YYYY-MM-DD |
check_out_date | string | YYYY-MM-DD |
num_nights | integer | null if not computed |
num_rooms | integer | null if not shown |
room_type | string | e.g. Deluxe, Standard, Suite |
meal_plan | string | e.g. breakfast included, half board, room only |
num_adults | integer | null if not printed |
num_children | integer | null if not printed |
booking_id | string | Confirmation / booking number |
booking_status | string | confirmed, pending, cancelled |
total_amount | number | null if not printed |
currency | string | null if not printed |
property_contact | string | Phone or email |
cancellation_policy | string | Free cancellation date or policy summary |
Validation rules
| Field | Rule |
|---|---|
guest_name | Required |
hotel_name | Required |
country | Required |
check_in_date | Required · Format: date_iso |
check_out_date | Required · Format: date_iso |
Example
const result = await client.verify.document({
doc_type: "hotel_booking",
file_url: "https://storage.example.com/hotel_confirmation.pdf",
});
// result.output.guest_name → "Rohan Verma"
// result.output.hotel_name → "The Leela Palace"
// result.output.check_in_date → "2026-04-20"
// result.output.check_out_date → "2026-04-23"
// result.output.num_nights → 3
// result.output.country → "India"
visa — Visa
Analysis type: extraction
Extracts data from visa sticker pages affixed in passports, covering tourist, business, work, student, and transit visas from any country.
Fields extracted
| Field | Type | Notes |
|---|---|---|
holder_name | string | Visa holder name |
passport_number | string | null if not printed on visa |
nationality | string | null if not printed |
issuing_country | string | Country that issued the visa |
visa_number | string | null if not printed |
visa_type | string | tourist, business, work, student, transit, medical etc. |
entries | string | single, multiple, double |
place_of_issue | string | Embassy or consulate |
date_of_issue | string | YYYY-MM-DD or null |
date_of_expiry | string | YYYY-MM-DD or null |
valid_from | string | YYYY-MM-DD or null |
valid_until | string | YYYY-MM-DD or null |
duration_of_stay | string | e.g. 90 days, 30 days |
remarks | string | null if not printed |
mrz_line1 | string | null if not visible |
mrz_line2 | string | null if not visible |
Validation rules
| Field | Rule |
|---|---|
holder_name | Required |
visa_type | Required |
issuing_country | Required |
Example
const result = await client.verify.document({
doc_type: "visa",
file_url: "https://storage.example.com/uk_visa.jpg",
});
// result.output.issuing_country → "United Kingdom"
// result.output.visa_type → "tourist"
// result.output.entries → "multiple"
// result.output.valid_from → "2026-04-01"
// result.output.valid_until → "2026-10-01"
// result.output.duration_of_stay → "180 days in total"