Field Definitions Complete field reference for travelers, passports, and documents
Complete reference for all fields in the traveler management system.
Field Type Required Description idstring Auto Unique identifier (CUID) userIdstring Yes Reference to owning user titleenum Yes Salutation (mr, mrs, ms, miss, mstr) firstNamestring Yes First/given name lastNamestring Yes Last/family name emailAddressstring No Email address phonePrefixstring Yes Phone country code phoneNumberstring Yes Phone number without country code birthDatedate Yes Date of birth createdAtdatetime Auto Record creation timestamp updatedAtdatetime Auto Last update timestamp deletedAtdatetime Auto Soft delete timestamp (null if active)
Travelers, passports, and documents use soft delete. When deleted, the deletedAt field is set rather than removing the record. This preserves historical data for audit trails and booking history.
Field Type Description agenumber Current age in years (calculated from birthDate) travelerTypeenum ADT/CHD/INF (calculated from age) phonestring Combined phone prefix and number
Field Type Description userobject Linked user details passportsarray Associated passports _count.documentsnumber Document count
Field Type Required Description idstring Auto Unique identifier (CUID) travelerIdstring Yes Reference to traveler passportNumberstring Yes Official passport number nationalitystring Yes ISO 3166-1 alpha-2 country code issuingCountrystring Yes ISO 3166-1 alpha-2 country code issuingDatedate Yes Date passport was issued expiryDatedate Yes Date passport expires isPrimaryboolean No Whether this is the primary passport createdAtdatetime Auto Record creation timestamp updatedAtdatetime Auto Last update timestamp deletedAtdatetime Auto Soft delete timestamp
Field Type Description expiresInDaysnumber Days until expiry (negative if expired)
Constraint Description Unique nationality One passport per nationality per traveler Primary uniqueness Only one primary passport per traveler Date ordering expiryDate must be after issuingDate
Field Type Required Description idstring Auto Unique identifier (CUID) travelerIdstring Yes Reference to traveler documentCategoryenum Yes PASSPORT, VISA, RESIDENCY, OTHER relatedEntityIdstring No ID of linked entity (e.g., passport) relatedEntityTypestring No Type of linked entity labelstring No Custom label (max 200 chars) storageKeystring Auto S3 storage key fileNamestring Auto Original filename mimeTypestring Auto File MIME type uploadedAtdatetime Auto Upload timestamp deletedAtdatetime Auto Soft delete timestamp
Field Type Description downloadUrlstring Temporary signed URL for download
Value Display Usage mrMr. Adult male mrsMrs. Married adult female msMs. Adult female (neutral) missMiss Unmarried female or girl mstrMaster Male child
Value Display Age Range ADTAdult 12+ years CHDChild 2-11 years INFInfant Under 2 years
Value Display Usage PASSPORTPassport Passport scans VISAVisa Visa documents RESIDENCYResidency Residence permits OTHEROther Miscellaneous
Nationality and issuing country use ISO 3166-1 alpha-2 codes:
Code Country IQIraq USUnited States GBUnited Kingdom DEGermany JOJordan AEUnited Arab Emirates ... (All ISO 3166-1 alpha-2 codes)
Extension MIME Type .pdf application/pdf .jpg, .jpeg image/jpeg .png image/png
Limit Value Maximum file size 10 MB Maximum files per upload 10
Rule Constraint Minimum length 1 character Maximum length 255 characters Characters Letters, spaces, hyphens, apostrophes
Rule Constraint Minimum length 6 characters Maximum length 20 characters Characters Alphanumeric
Rule Constraint Format Country code + number Validation E.164 format
Rule Constraint Format Valid email address Required No
Field Constraint birthDate Must be in the past issuingDate Must be before expiryDate expiryDate Must be after issuingDate