# Create air pnr Creates a new air booking with the given itinerary Endpoint: POST /v2/air/create-pnr Version: v2 Security: Bearer ## Request fields (application/json): - `bookingId` (string) The booking ID for which the PNR is being created. This is returned in the revalidate itinerary API response. Example: "booking-id" - `initiateBookingId` (string) Initiate booking id is returned in response to air-initiate-booking API call. This id is required if in case the booking id is not available due to third-party redirection. Example: "eCfghty567jkHG56DFgh" - `preSearchAnswers` (object) - `preSearchAnswers.answers` (array) - `preSearchAnswers.answers.entityId` (string) The unique ID for the question. - `preSearchAnswers.answers.userInput` (string) The text input given by user (if any). - `preSearchAnswers.answers.itemIds` (array) The id/enum value corresponding to the option chosen by the user as answer. - `preSearchAnswers.answers.customFieldType` (string) The type of custom field. Enum: "QUESTION", "MEETING", "BUDGET", "BREX_TOKEN" - `preSearchAnswers.answers.questionDisplayText` (string) The question text to be displayed to the user. - `preSearchAnswers.answers.question` (object) The message defines the format of a question which can be asked to a user in any kind of workflows. - `preSearchAnswers.answers.question.id` (string, required) - `preSearchAnswers.answers.question.name` (string, required) Question display name that the user will see. For eg, 'Choose the purpose of your trip'. - `preSearchAnswers.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" - `preSearchAnswers.answers.question.optionInfo` (object) Options related information for the question. - `preSearchAnswers.answers.question.optionInfo.source` (string, required) Option source Enum: "MANUAL", "COMPANY_CONFIG" - `preSearchAnswers.answers.question.optionInfo.sourceMetadata` (any) - `preSearchAnswers.answers.question.optionInfo.totalNumOptions` (integer) Total number of options - `preSearchAnswers.answers.question.optionInfo.options` (array) Available options for the question. This will contain only max 10 options if only summary is requested. - `preSearchAnswers.answers.question.optionInfo.options.displayCode` (string, required) The code which is sent in answer response. - `preSearchAnswers.answers.question.optionInfo.options.displayValue` (string) The text to be displayed to the user beside this option. - `preSearchAnswers.answers.question.isRequired` (boolean, required) Whether its compulsory to answer the question or not. Example: true - `preSearchAnswers.answers.question.isDisabled` (boolean, required) Whether the question is disabled or not. If true, this should not be asked. Example: true - `preSearchAnswers.answers.question.customFieldLocations` (array) Enum: "POLICY_APPROVAL_EMAIL", "PNR_EMAIL", "TRIP_EMAIL" - `preSearchAnswers.answers.question.matchConditions` (object) Conditions to select the custom field for given context. - `preSearchAnswers.answers.question.matchConditions.travelerConditions` (object) Matching conditions for traveler. - `preSearchAnswers.answers.question.matchConditions.travelerConditions.workerTypes` (array) Worker types. Users belonging to any of these would match. Enum: "EMPLOYEE", "CONTINGENT", "SEASONAL", "INTERN", "GUEST" - `preSearchAnswers.answers.question.matchConditions.travelerConditions.countries` (array) Countries. - `preSearchAnswers.answers.question.matchConditions.travelerConditions.legalEntities` (array) Legal entities - `preSearchAnswers.answers.question.matchConditions.travelerConditions.legalEntities.name` (string) Example: "Name" - `preSearchAnswers.answers.question.matchConditions.travelerConditions.departments` (array) Departments - `preSearchAnswers.answers.question.matchConditions.travelerConditions.costCenters` (array) Cost centers - `preSearchAnswers.answers.question.matchConditions.travelerConditions.offices` (array) Offices - `preSearchAnswers.answers.question.matchConditions.travelTypes` (array) Travel types to match. Enum: "AIR", "HOTEL", "CAR", "RAIL", "LIMO", "MISC", "ALL" - `preSearchAnswers.answers.question.matchConditions.travelRegionTypes` (array) Travel region types to match. Enum: "DOMESTIC", "INTERNATIONAL" - `preSearchAnswers.answers.question.matchConditions.tripUsageTypes` (array) Trip usage types to match. If empty, all trip usage types will be matched. Enum: "STANDARD", "EVENT" - `preSearchAnswers.answers.question.questionType` (object) Question type. - `preSearchAnswers.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" - `preSearchAnswers.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" - `preSearchAnswers.answers.question.includeInItinerary` (boolean) Whether to include this question in the itinerary related emails. Example: true - `preSearchAnswers.userEntitiesResponseId` (string) - `postPaymentVerificationInfo` (any) - `isPreAuthApprovalRequired` (boolean) Flag to check if the pre-authorization approval is enabled. - `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 - `preBookAnswers` (object) - `preBookAnswers.preBookQuestionResponseId` (string) The unique id sent back in the pre book questions API response ## Response 200 fields (application/json): - `pnrId` (string) Spotnana PNR ID. - `sourcePnrId` (string) Source PNR ID - `pnrStatus` (string) PNR status (for example success, approval pending) Enum: "SUCCESS", "APPROVAL_PENDING", "CC_VERIFICATION_REQUIRED", "PAYMENT_PENDING", "CONFIRMATION_PENDING", "ERROR" - `createPnrApplicationInfo` (object) Create PNR application info, will return warning or error if present - `createPnrApplicationInfo.applicationWarning` (array) - `createPnrApplicationInfo.applicationWarning.warningType` (string) Warning Type Enum: "LOYALTY_NAME_MISMATCH" - `createPnrApplicationInfo.applicationWarning.description` (string) Warning description Example: "FREQUENT TRAVELER NUMBER DOES NOT EXIST FOR THIS AIRLINE" ## 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.