RahalCorporate
Booking requestsReference

Field Reference

Complete field definitions for booking requests and related items

Field Reference

This page documents all fields in booking requests and their related entities.

BookingRequest

The main booking request entity.

FieldTypeRequiredDescription
idstringYesUnique identifier (CUID)
companyIdstringYesID of the associated company
requestedByUserIdstringYesID of the user the request is for
createdByUserIdstringNoID of the user who created the request (if delegating)
totalPricenumberYesTotal cost of all items
currencystringYesCurrency code (e.g., "IQD", "USD")
statusenumYesPENDING, COMPLETED, or CANCELLED
requestNotesstringNoUser or admin notes
policyIdstringNoID of the policy that was evaluated
createdAtdatetimeYesWhen the request was created
updatedAtdatetimeYesWhen the request was last modified

User Attribution Fields

Two fields track who is involved in a booking request:

FieldMeaningExample
requestedByUserIdWhose travel is being bookedThe traveler or their manager
createdByUserIdWho submitted the requestOnly set when different from requestedByUserId

Standard case (user books for themselves):

  • requestedByUserId: User A
  • createdByUserId: null

Delegation case (User B books for User A):

  • requestedByUserId: User A (the traveler)
  • createdByUserId: User B (the delegate who submitted)

Policy and budget are evaluated for requestedByUserId, ensuring the traveler's rules apply.

Relations

RelationTypeDescription
companyCompanyThe associated company
requestedByUserThe user the request is for
createdByUserThe user who created the request
policyPolicyThe policy that was evaluated
flightItemsFlightItem[]Flight segments in the request
hotelItemsHotelItem[]Hotel bookings in the request
travelersTraveler[]Travelers on the request

FlightBookingRequestItem

A flight segment within a booking request.

FieldTypeRequiredDescription
idstringYesUnique identifier
bookingRequestIdstringYesParent booking request ID
originLocationIdstringYesOrigin location ID
originLocationTypestringYesType: "airport", "city", "country"
originCodestringYesAirport/city code (e.g., "BGW")
originNamestringYesLocation name (e.g., "Baghdad")
destinationLocationIdstringYesDestination location ID
destinationLocationTypestringYesType: "airport", "city", "country"
destinationCodestringYesAirport/city code
destinationNamestringYesLocation name
departureDatedateYesFlight departure date
departureTimestringYesDeparture time (HH:MM)
arrivalDatedateYesFlight arrival date
arrivalTimestringYesArrival time (HH:MM)
airlinestringYesAirline name
airlineCodestringNoIATA airline code
flightNumberstringYesFlight number
cabinClassstringYesCabin class (Economy, Business, etc.)
adultsCountnumberYesNumber of adult passengers
childrenCountnumberYesNumber of child passengers
infantsCountnumberYesNumber of infant passengers
pricenumberYesFlight price
currencystringYesPrice currency

Computed Fields

FieldTypeDescription
airlineLogostringCDN URL for airline logo

HotelBookingRequestItem

A hotel booking within a booking request.

FieldTypeRequiredDescription
idstringYesUnique identifier
bookingRequestIdstringYesParent booking request ID
cityIdstringYesCity ID
cityCodestringYesCity code
cityNamestringYesCity name
hotelIdstringYesHotel ID
hotelNamestringYesHotel name
hotelStarsnumberNoHotel star rating (1-5)
checkInDatedateYesCheck-in date
checkOutDatedateYesCheck-out date
pricenumberYesTotal hotel price
currencystringYesPrice currency

Relations

RelationTypeDescription
roomOccupancyRoomOccupancy[]Room configurations

HotelRoomOccupancy

Room configuration for a hotel booking.

FieldTypeRequiredDescription
idstringYesUnique identifier
hotelBookingRequestItemIdstringYesParent hotel item ID
roomNamestringYesRoom type name
boardBasisstringYesMeal plan code (RO, BB, HB, FB, AI)
adultsCountnumberYesAdults in this room
childrenCountnumberYesChildren in this room
childrenAgesnumber[]YesAges of children

BookingRequestTraveler

A traveler associated with a booking request.

FieldTypeRequiredDescription
idstringYesUnique identifier
bookingRequestIdstringYesParent booking request ID
travelerIdstringYesTraveler profile ID
travelerTypeCodestringYesADT, CHD, or INF
createdAtdatetimeYesWhen added to request

Relations

RelationTypeDescription
travelerTravelerThe traveler profile

TravelerInfo

Traveler profile information included with booking requests.

FieldTypeRequiredDescription
idstringYesTraveler ID
titlestringYesTitle (mr, mrs, miss, ms)
firstNamestringYesFirst name
lastNamestringYesLast name
emailAddressstringNoEmail address
phonestringYesPhone number
birthDatestringYesBirth date (ISO format)
passportsPassport[]NoPassport information

Passport

Passport information for a traveler.

FieldTypeRequiredDescription
idstringYesPassport ID
passportNumberstringYesPassport number
nationalitystringYesNationality
issuingCountrystringYesIssuing country
issuingDatestringYesIssue date (ISO format)
expiryDatestringYesExpiry date (ISO format)
isPrimarybooleanYesWhether this is the primary passport

CompanyInfo

Company information included with booking requests.

FieldTypeRequiredDescription
idstringYesCompany ID
namestringYesCompany name
slugstringYesCompany slug

UserInfo

User information included with booking requests.

FieldTypeRequiredDescription
idstringYesUser ID
namestringNoUser display name
emailstringNoUser email address

Field Constraints

String Lengths

FieldMax Length
currency10 characters
requestNotes5000 characters
cabinClass50 characters
flightNumber20 characters

Numeric Ranges

FieldMinMax
totalPrice0-
adultsCount0-
childrenCount0-
infantsCount0-
hotelStars15

Date Rules

RuleDescription
departureDatearrivalDateDeparture before arrival
checkInDate < checkOutDateCheck-in before check-out
issuingDate < expiryDatePassport validity

On this page