# Create a new hotel booking Creates a new hotel booking for the given request parameters. Endpoint: POST /v2/hotel/create-pnr Version: v2 Security: Bearer ## Request fields (application/json): - `bookingKey` (string, required) The booking key for the hotel booking. Example: "example_booking_key" - `travelers` (array, required) The list of travelers and their details. The traveler at index 0 will be considered as the primary traveler and their details will be passed to the supplier. - `travelers.travelerId` (object, required) The ID of the traveler. - `travelers.travelerId.id` (string, required) - `travelers.name` (object, required) Name of the traveler. - `travelers.name.family1` (string, required) Last (family) name. Example: "Gandas" - `travelers.name.family2` (string) Example: "FamilyTwo" - `travelers.name.given` (string, required) First (given) name. Example: "Vichitr" - `travelers.name.middle` (string) Middle name. Example: "Kumar" - `travelers.name.suffix` (string) Suffix used with the name. For example SR or JR. Enum: "NAME_SUFFIX_UNKNOWN", "SR", "JR", "MD", "PHD", "II", "III", "IV", "DO", "ATTY", "V", "VI", "ESQ", "DC", "DDS", "VM", "JD", "SECOND", "THIRD" - `travelers.name.preferred` (string) Informal preferred name added by traveler. This is not used on any PNR or tickets Example: "Don" - `travelers.dob` (object) Date of birth of the traveler. - `travelers.dob.iso8601` (string, required) Example: "2017-07-21" - `travelers.phoneNumber` (object, required) Phone number of the traveler. - `travelers.phoneNumber.countryCode` (integer) two digit country code Example: 91 - `travelers.phoneNumber.countryCodeSource` (string) Enum: "UNSPECIFIED", "FROM_NUMBER_WITH_PLUS_SIGN", "FROM_NUMBER_WITH_IDD", "FROM_NUMBER_WITHOUT_PLUS_SIGN", "FROM_DEFAULT_COUNTRY" - `travelers.phoneNumber.extension` (string) phone number extension Example: "222" - `travelers.phoneNumber.isoCountryCode` (string) ISO alpha-2 code Example: "IN" - `travelers.phoneNumber.italianLeadingZero` (boolean) Example: true - `travelers.phoneNumber.nationalNumber` (integer) Example: 8150 - `travelers.phoneNumber.numberOfLeadingZeros` (integer) Example: 1 - `travelers.phoneNumber.preferredDomesticCarrierCode` (string) Example: "7" - `travelers.phoneNumber.rawInput` (string) Example: "77777" - `travelers.phoneNumber.type` (string) Enum: "UNKNOWN_TYPE", "MOBILE", "LANDLINE" - `travelers.email` (string, required) Email of the traveler. Example: "mail@mail.com" - `travelers.loyaltyInfo` (object) Loyalty Info of the traveler. - `travelers.loyaltyInfo.appliedTo` (array) Example: ["TAJ"] - `travelers.loyaltyInfo.issuedBy` (string, required) Example: "firstIssuedBy" - `travelers.loyaltyInfo.linked` (boolean) Indicates if this loyalty account is linked to the external provider. Only applicable for certain loyalty types. - `travelers.adhocInfo` (object) Adhoc Info of the traveler. It is only present if the traveler is adhoc user. - `travelers.adhocInfo.profileOwnerId` (object) The profile owner of the adhoc user. - `tripData` (object, required) Trip data to book a PNR. - `tripData.approverEmail` (string) Email address of the approver who should receives approval email for the current booking. - `tripData.approverName` (string) Name of the approver. - `tripData.hardApprovalRequired` (boolean) Whether the current booking requires hard approval or soft approval. This flag should be used only if valid approver is present. - `tripData.outOfPolicy` (boolean) If the given booking is out of policy. - `tripData.policyId` (string) Policy Id for which violation is done. - `tripData.policyVersion` (integer) Version of policy. - `tripData.tripId` (object, required) Id of the trip. - `tripData.tripId.id` (string, required) Id. Example: "2783425534" - `preBookAnswers` (object) - `preBookAnswers.answers` (array) - `preBookAnswers.answers.entityId` (string) The unique ID for the question. - `preBookAnswers.answers.userInput` (string) The text input given by user (if any). - `preBookAnswers.answers.itemIds` (array) The id/enum value corresponding to the option chosen by the user as answer. - `preBookAnswers.answers.customFieldType` (string) The type of custom field. Enum: "QUESTION", "MEETING", "BUDGET", "BREX_TOKEN" - `preBookAnswers.answers.questionDisplayText` (string) The question text to be displayed to the user. - `preBookAnswers.answers.question` (object) The message defines the format of a question which can be asked to a user in any kind of workflows. - `preBookAnswers.answers.question.name` (string, required) Question display name that the user will see. For eg, 'Choose the purpose of your trip'. - `preBookAnswers.answers.question.questionFormat` (string) Question types. INPUT_BOX will make user enter a free flowing text. RADIO_BUTTON will have multiple options, user can select only one. CHECKBOX questions contain the possible set of options, from which the user can choose multiple options. CHECKBOX_WITH_PERCENTAGE is similar to checkbox, with the difference being that each option having an additional input field whose values must add up to 100. Enum: "INPUT_BOX", "RADIO_BUTTON", "CHECKBOX", "CHECKBOX_WITH_PERCENTAGE" - `preBookAnswers.answers.question.optionInfo` (object) Options related information for the question. - `preBookAnswers.answers.question.optionInfo.source` (string, required) Option source Enum: "MANUAL", "COMPANY_CONFIG" - `preBookAnswers.answers.question.optionInfo.sourceMetadata` (any) - `preBookAnswers.answers.question.optionInfo.totalNumOptions` (integer) Total number of options - `preBookAnswers.answers.question.optionInfo.options` (array) Available options for the question. This will contain only max 10 options if only summary is requested. - `preBookAnswers.answers.question.optionInfo.options.displayCode` (string, required) The code which is sent in answer response. - `preBookAnswers.answers.question.optionInfo.options.displayValue` (string) The text to be displayed to the user beside this option. - `preBookAnswers.answers.question.isRequired` (boolean, required) Whether its compulsory to answer the question or not. Example: true - `preBookAnswers.answers.question.isDisabled` (boolean, required) Whether the question is disabled or not. If true, this should not be asked. Example: true - `preBookAnswers.answers.question.customFieldLocations` (array) Enum: "POLICY_APPROVAL_EMAIL", "PNR_EMAIL", "TRIP_EMAIL" - `preBookAnswers.answers.question.matchConditions` (object) Conditions to select the custom field for given context. - `preBookAnswers.answers.question.matchConditions.travelerConditions` (object) Matching conditions for traveler. - `preBookAnswers.answers.question.matchConditions.travelerConditions.workerTypes` (array) Worker types. Users belonging to any of these would match. Enum: "EMPLOYEE", "CONTINGENT", "SEASONAL", "INTERN", "GUEST" - `preBookAnswers.answers.question.matchConditions.travelerConditions.countries` (array) Countries. - `preBookAnswers.answers.question.matchConditions.travelerConditions.legalEntities` (array) Legal entities - `preBookAnswers.answers.question.matchConditions.travelerConditions.legalEntities.name` (string) Example: "Name" - `preBookAnswers.answers.question.matchConditions.travelerConditions.departments` (array) Departments - `preBookAnswers.answers.question.matchConditions.travelerConditions.costCenters` (array) Cost centers - `preBookAnswers.answers.question.matchConditions.travelerConditions.offices` (array) Offices - `preBookAnswers.answers.question.matchConditions.travelTypes` (array) Travel types to match. Enum: "AIR", "HOTEL", "CAR", "RAIL", "LIMO", "MISC", "ALL" - `preBookAnswers.answers.question.matchConditions.travelRegionTypes` (array) Travel region types to match. Enum: "DOMESTIC", "INTERNATIONAL" - `preBookAnswers.answers.question.matchConditions.tripUsageTypes` (array) Trip usage types to match. If empty, all trip usage types will be matched. Enum: "STANDARD", "EVENT" - `preBookAnswers.answers.question.questionType` (object) Question type. - `preBookAnswers.answers.question.questionType.preSearchQuestionType` (string) Types of pre-search questions. PURPOSE_OF_TRIP required to ask purpose of the trip user is going to. For example: meeting, training, interview. Enum: "UNKNOWN_SEARCH_QUESTION_TYPE", "PURPOSE_OF_TRIP" - `preBookAnswers.answers.question.questionType.preCheckoutQuestionType` (string) Types of pre-checkout questions. USER_DEFINED_QUESTION the default question type for all pre checkout questions which have been created from UI. OOP_REASON_CODE is kept separate so that existing OOP flow doesn't break. Enum: "UNKNOWN_CHECKOUT_QUESTION_TYPE", "USER_DEFINED_QUESTION", "OOP_REASON_CODE" - `preBookAnswers.answers.question.includeInItinerary` (boolean) Whether to include this question in the itinerary related emails. Example: true - `preBookAnswers.preBookQuestionResponseId` (string) The unique id sent back in the pre book questions API response - `bookingPaymentDetails` (object, required) Payment details used for booking. - `bookingPaymentDetails.bookingTravelerPaymentDetails` (array, required) - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments` (array, required) - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.paymentItems` (array, required) - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.paymentItems.itemType` (string) Type of payment item eligible for this fop rule Enum: "SERVICE_FEE", "TRAVEL_TICKET", "SEAT", "BAGGAGE", "EARLY_BIRD" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.paymentItems.fareComponent` (array) Enum: "BASE", "TAX" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources` (array, required) - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.paymentSourceId` (string) Unique identifier identifying this payment source. Example: "f49d00fe-1eda-4304-ba79-a980f565281d" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.rawPaymentSource` (any) - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.postPaymentRedirectionUrl` (string) Url for post payment redirection if payment source navigates user to a third party url Example: "https://mycompany.com/checkout?paymentSourceId=f49d00fe-1eda-4304-ba79-a980f565281d" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.cvv` (string) CVV associated with associated payment source, if any. - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount` (object) Total amount to be charged for specified payment items. - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.amount` (number, required) The numeric value for the amount of money. Example: 510 - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.currencyCode` (string, required) The 3-letter currency code for the money amount (defined using ISO 4217 standard). Example: "GBP" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.convertedAmount` (number) The converted currency and amount that has been converted (if a currency conversion has been requested). For example, if the call requests that money be sent in a specified currency (because the frontend requested the backend to send money in the user's preferred currency). Example: 715.42 - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.convertedCurrency` (string) The 3-letter currency code for the converted currency (defined using ISO 4217 standard). Example: "USD" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.otherCoinage` (array) List of the dollar amount in other coinage systems like reward points, cryptocurrency etc. - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.otherCoinage.coinageCode` (string) Payment method Enum: "PAYMENT_METHOD_UNKNOWN", "CREDIT_CARD", "BREX_POINTS", "CASH", "QANTAS_POINTS", "VENDOR_PROGRAM_PAYMENT", "DELAYED_INVOICING", "FLIGHT_CREDITS", "QANTAS_TRAVEL_FUND", "CUSTOM_VIRTUAL_PAYMENT", "FLIGHT_PASS", "MISCELLANEOUS_CREDIT_ORDER" - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.otherCoinage.amount` (number) Example: 1000 - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.otherCoinage.conversionRate` (number) 1 coin in this system equals to how many currency value Example: 0.01 - `bookingPaymentDetails.bookingTravelerPaymentDetails.selectedFormOfPayments.selectedPaymentSources.amount.otherCoinage.preferredCurrencyConversionRate` (number) 1 coin in this system equals to how many currency value Example: 0.01 - `bookingContact` (object, required) - `bookingContact.emailAddress` (string) Email address of the booking contact Example: "mail@mail.com" - `bookingContact.phoneNumber` (object) Properly formatted phone number. - `hotelSpecialRequests` (object) Hotel special requests - `hotelSpecialRequests.roomLocations` (array) Room Location special request Enum: "HIGH_FLOOR", "LOW_FLOOR" - `hotelSpecialRequests.roomFeatures` (array) Room Features List Enum: "CRIB", "ROLLAWAY_BED", "FEATHER_FREE_ROOM", "ACCESSIBLE_ROOM", "NEAR_ELEVATOR" - `hotelSpecialRequests.checkIn` (string) Early or Late Check-in Enum: "EARLY_CHECK_IN", "LATE_CHECK_IN" - `hotelSpecialRequests.checkInTime` (object) Requested time for check-in - `hotelSpecialRequests.flightNumber` (string) Attach flight number Example: "AC1234" - `hotelSpecialRequests.additionalNote` (string) Free form text to describe special request Example: "Extra pillows and blankets for added comfort during the stay." - `hotelSpecialRequests.accessibleFeatures` (array) Accessible Features List Enum: "MOBILITY_ACCESSIBLE_ROOM_WITH_TUB", "MOBILITY_ACCESSIBLE_ROOM_WITH_ROLL_IN_SHOWER", "HEARING_ACCESSIBLE_ROOM", "MOBILITY_ACCESSIBLE_ROOM_WITH_TUB_AND_ROLL_IN_SHOWER", "MOBILITY_ACCESSIBLE_ROOM_WITH_TUB_AND_HEARING_ACCESSIBLE_ROOM", "MOBILITY_ACCESSIBLE_ROOM_WITH_ROLL_IN_SHOWER_AND_HEARING_ACCESSIBLE_ROOM", "MOBILITY_ACCESSIBLE_ROOM_WITH_TRANSFER_SHOWER", "MOBILITY_ACCESSIBLE_ROOM_WITH_TUB_AND_TRANSFER_SHOWER", "MOBILITY_ACCESSIBLE_ROOM_WITH_TRANSFER_SHOWER_AND_HEARING_ACCESSIBLE_ROOM" - `cancelSourcePnrId` (string) The source PNR ID within the booking source that needs to be canceled in favor of the new booking that is being created. Example: "ABC123" - `hotelRateAssuranceInfo` (object) Savings information from the rate assurance rebooking - `hotelRateAssuranceInfo.selfReportedSavings` (object) Money object containing just amount and currency code. - `hotelRateAssuranceInfo.selfReportedSavings.amount` (number, required) Amount Example: 510 - `hotelRateAssuranceInfo.selfReportedSavings.currencyCode` (string, required) The 3-letter currency code defined in ISO 4217. Example: "GBP" - `hotelRateAssuranceInfo.actualSavings` (object) Money object containing just amount and currency code. - `customFieldV3Responses` (array) Custom field responses for the booking. - `customFieldV3Responses.fieldId` (string, required) Custom field id - `customFieldV3Responses.fieldName` (string) Name of the custom field - `customFieldV3Responses.armId` (string, required) Arm id which is applicable - `customFieldV3Responses.includeLocations` (array) Enum: "BOOKING_CONFIRMATION_EMAILS", "APPROVAL_EMAILS", "COMPANY_REPORTS", "CONSOLIDATED_ITINERARY_EMAILS" - `customFieldV3Responses.selectedOptions` (array, required) The list of options that are selected by user or auto populated. - `customFieldV3Responses.selectedOptions.name` (string, required) Value of the selection - `customFieldV3Responses.selectedOptions.description` (string) Description of the selection - `customFieldV3Responses.selectedOptions.additionalUserInput` (string) Additional user input - `customFieldV3Responses.selectedOptions.additionalInfos` (array) Actual values of the additional infos - `customFieldV3Responses.selectedOptions.additionalInfoConfigs` (array) Additional info configs for the selected option ## Response 200 fields (application/json): - `pnrId` (string, required) A unique PNR ID created by Spotnana for the new hotel booking. Example: "7373737373" - `pnrStatus` (string, required) The status of the PNR. Enum: "SUCCESS", "APPROVAL_PENDING", "CONFIRMATION_PENDING" - `externalPnrId` (string) The external PNR ID for the hotel booking, created by the third party suppliers. Example: "ABC123" ## Response 401 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 403 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error. ## Response 404 fields (application/json): - `debugIdentifier` (string) Link to debug the error internally. - `errorMessages` (array) - `errorMessages.errorCode` (string) Error code to identify the specific errors. - `errorMessages.message` (string) Message containing details of error. - `errorMessages.errorParameters` (array) Error message parameters. - `errorMessages.errorParameters.name` (string) Parameter name - `errorMessages.errorParameters.value` (string) Parameter value - `errorMessages.errorDetail` (string) More details about the error.