Data model
Request body schemas for booking events.
BookingInput
Used for create and update booking events. Contains all information about the consumer and their trip.
Note: The update endpoint does not support partial updates. You must send the full payload, not just the changed fields.
| Field | Type | Required | Description |
|---|---|---|---|
consumerGivenName | NonEmptyString (nullable) | No | The first name of the consumer, only. Example: Charlie |
consumerPartnerExternalReference | NonEmptyString (nullable) | No | The partner's unique reference of the consumer |
consumerPhone | PhoneNumber (nullable) | No | All phone numbers must be added in the E.164 format to be considered valid. We are using https://www.npmjs.com/package/google-libphonenumber library for validation. * numbers should start with a '+' * followed by country code * the phone number For example: * USA: +14155552671 * Brazil: +551155256325 * UK: +442071838750 |
consumerEmail | string (email) (nullable) | No | The email address of the consumer |
consumerNationality | AF, AL, DZ, AS, AD, AO, AI, AQ, AG, AR, AM, AW, AU, AT, AZ, BS, BH, BD, BB, BY, BE, BZ, BJ, BM, BT, BO, BA, BW, BV, BR, IO, BN, BG, BF, BI, KH, CM, CA, CV, KY, CF, TD, CL, CN, CX, CC, CO, KM, CG, CD, CK, CR, CI, HR, CU, CY, CZ, DK, DJ, DM, DO, EC, EG, SV, GQ, ER, EE, ET, FK, FO, FJ, FI, FR, GF, PF, TF, GA, GM, GE, DE, GH, GI, GR, GL, GD, GP, GU, GT, GN, GW, GY, HT, HM, VA, HN, HK, HU, IS, IN, ID, IR, IQ, IE, IL, IT, JM, JP, JO, KZ, KE, KI, KP, KR, KW, KG, LA, LV, LB, LS, LR, LY, LI, LT, LU, MO, MG, MW, MY, MV, ML, MT, MH, MQ, MR, MU, YT, MX, FM, MD, MC, MN, MS, MA, MZ, MM, NA, NR, NP, NL, NC, NZ, NI, NE, NG, NU, NF, MP, MK, NO, OM, PK, PW, PS, PA, PG, PY, PE, PH, PN, PL, PT, PR, QA, RE, RO, RU, RW, SH, KN, LC, PM, VC, WS, SM, ST, SA, SN, SC, SL, SG, SK, SI, SB, SO, ZA, GS, ES, LK, SD, SR, SJ, SZ, SE, CH, SY, TW, TJ, TZ, TH, TL, TG, TK, TO, TT, TN, TR, TM, TC, TV, UG, UA, AE, GB, US, UM, UY, UZ, VU, VE, VN, VG, VI, WF, EH, YE, ZM, ZW, AX, BQ, CW, GG, IM, JE, ME, BL, MF, RS, SX, SS, XK (nullable) | No | The nationality of the consumer. It takes country codes in ISO 3166-1 alpha-2 standard |
consumerCurrency | string (nullable) | No | The preferred currency of the consumer. For example USD, EUR |
consumerLanguage | string (nullable) | No | ISO 639-1 language code |
consumerTripPartnerExternalReference | string | Yes | The partner's unique reference of the consumer's trip and or booking |
consumerTripArrivalDate | ImpreciseDateTime (nullable) | No | The arrival date of the consumer's trip. The datetime that the consumer arrives at the destination. Timezone is required when passing a datetime string. Correct datetime string should follow ISO 8601 standard with timezone. For example * 2024-06-14 * 2024-06-14T07:27:17.335Z * 2020-01-01T00:00:00.123+0200 If the request only have consumerTripArrivalDate that means it is a one-way trip |
consumerTripReturnDate | ImpreciseDateTime (nullable) | No | The return date of the consumer's trip. The datetime that the consumer returns from the destination. Timezone is required when passing a datetime string. Correct datetime string should follow ISO 8601 standard with timezone. For example * 2024-06-14 * 2024-06-14T07:27:17.335Z * 2020-01-01T00:00:00.123+0200 If the request have both consumerTripArrivalDate and consumerTripReturnDate that means it is a round trip |
consumerTripDepartureCityName | NonEmptyString (nullable) | No | The departure city name for the outbound journey |
consumerTripDepartureCountryName | NonEmptyString (nullable) | No | The departure country name for the outbound journey |
consumerTripDepartureAirportCode | NonEmptyString (nullable) | No | The departure airport code for the outbound journey |
consumerTripArrivalFlightNumber | NonEmptyString (nullable) | No | The flight number for the arrival journey. For example: QF9 |
consumerTripDepartureFlightNumber | NonEmptyString (nullable) | No | The flight number for the outbound journey. For example: BA 222 |
consumerTripDepartureFlightClass | ECONOMY, PREMIUM_ECONOMY, BUSINESS, FIRST_CLASS (nullable) | No | The flight class for the outbound journey |
consumerTripBookingDate | ImpreciseDateTime (nullable) | No | The datetime that the consumer made a booking on the partner's system |
consumerTripBookingLink | string (uri) (nullable) | No | The partner's link for the consumer to view their booking. This is often a link to a manage my booking page |
consumerTripAccommodationName | NonEmptyString (nullable) | No | The name of the accommodation where the consumer is staying during their trip. This is often a hotel name |
consumerTripAccommodationAddress | NonEmptyString (nullable) | No | The address of the accommodation where the consumer is staying during their trip |
consumerTripVenueName | NonEmptyString (nullable) | No | The name of some venue that the consumer will attend during their trip |
consumerTripVenueAddress | NonEmptyString (nullable) | No | The address of some venue that the consumer will attend during their trip |
consumerTripDestinationName | NonEmptyString (nullable) | No | The name of the destination where the consumer's trip is. This is often a city name. This field is case insensitive. If using consumerTripDestinationName, both consumerTripDestinationName and consumerTripDestinationCountryName must be used. |
consumerTripDestinationCountryName | NonEmptyString (nullable) | No | The name of the destination's country |
consumerTripDestinationAirportCode | NonEmptyString (nullable) | No | The destination airport code for the return journey |
consumerTripArrivalAirportName | NonEmptyString (nullable) | No | The arrival airport name for the return journey |
consumerTripDepartureAirportName | NonEmptyString (nullable) | No | The departure airport name for the return journey |
consumerTripExternalProductName | NonEmptyString (nullable) | No | The partner's name for the product that was booked on their system. This is often the name of a hotel room, flight or event |
consumerTripPersonCount | integer (nullable) | No | The number of people in total on the consumer's trip |
consumerTripChildCount | integer (nullable) | No | The number of children on the consumer's trip |
consumerTripInfantCount | integer (nullable) | No | The number of infants on the consumer's trip |
consumerTripIsInternational | Boolean (nullable) | No | Indicates whether the destination of the consumer's trip is international |
consumerTripIsRegional | Boolean (nullable) | No | Indicates whether the destination of the consumer's trip is within a day's travel from their home and unlikely to be a holiday destination |
consumerTripIsLocal | Boolean (nullable) | No | Indicates whether the destination of the consumer's trip is local to them |
agentPartnerExternalReference | string | No | Your unique agent reference. This field is required once any other agent data is provided |
agentEmail | string (email) (nullable) | No | Agent email. Once this field is provided then agentPartnerExternalReference field is required. |
agentTimezone | Timezone (nullable) | No | Timezone identifier from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Example: America/New_York, Europe/London Once this field is provided then agentPartnerExternalReference field is required. |
agentPhoneNumber | PhoneNumber (nullable) | No | All phone numbers must be added in the E.164 format to be considered valid. We are using https://www.npmjs.com/package/google-libphonenumber library for validation. * numbers should start with a '+' * followed by country code * the phone number For example: * USA: +14155552671 * Brazil: +551155256325 * UK: +442071838750 Once this field is provided then agentPartnerExternalReference field is required. |
agentGivenName | string (nullable) | No | Agent given name. Example: John. Once this field is provided then agentPartnerExternalReference field is required. |
agentFamilyName | string (nullable) | No | Agent family name. Example: Smith. Once this field is provided then agentPartnerExternalReference field is required. |
BookingReference
Used for delete booking events. Identifies the booking to delete.
| Field | Type | Required | Description |
|---|---|---|---|
consumerTripPartnerExternalReference | string | Yes | The partner's unique reference of the consumer's trip and or booking |