---
title: "Create air pnr"
method: POST
path: "/v2/air/create-pnr"
tags: ["Air"]
---

# Create air pnr

`POST /v2/air/create-pnr`

Creates a new air booking with the given itinerary

## Request body

- AirCreatePnrRequest
  - `bookingId` string — The booking ID for which the PNR is being created. This is returned in the revalidate itinerary API response.
  - `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.
  - `preBookAnswers` PreBookAnswers
    - `answers` EntityAnswer[]
      - `entityId` string — The unique ID for the question.
      - `userInput` string — The text input given by user (if any).
      - `itemIds` integer[] — The id/enum value corresponding to the option chosen by the user as answer.
      - `answers` AnswerPair[]
        - `item` string — The option selected from the list of available choices.
        - `value` string — The additional input provided (by the user) while selecting one of the options.
        - `description` string — Description of the selected option.
      - `customFieldType` 'QUESTION' | 'MEETING' | 'BUDGET' | 'BREX_TOKEN' — The type of custom field.
      - `questionDisplayText` string — The question text to be displayed to the user.
      - `question` Question — The message defines the format of a question which can be asked to a user in any kind of workflows.
        - `id` string, uuid, required
        - `name` string, required — Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
        - `questionFormat` 'INPUT_BOX' | 'RADIO_BUTTON' | 'CHECKBOX' | 'CHECKBOX_WITH_PERCENTAGE' — 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.
        - `optionInfo` OptionInfo — Options related information for the question.
          - `source` 'MANUAL' | 'COMPANY_CONFIG', required — Option source
          - `sourceMetadata` OptionSourceMetadata — Wrapper for option source company config.
            - `companyConfig` CompanyConfigSource — For this option source, options would be auto generated based on specified parameter.
              - …
          - `totalNumOptions` integer — Total number of options
          - `options` Option[] — Available options for the question. This will contain only max 10 options if only summary is requested.
            - `displayCode` string, required — The code which is sent in answer response.
            - `displayValue` string — The text to be displayed to the user beside this option.
        - `isRequired` boolean, required — Whether its compulsory to answer the question or not.
        - `isDisabled` boolean, required — Whether the question is disabled or not. If true, this should not be asked.
        - `includeInItinerary` boolean — Whether to include this question in the itinerary related emails.
        - `customFieldLocations` CustomFieldLocation[]
        - `matchConditions` CustomFieldMatchConditions — Conditions to select the custom field for given context.
          - `travelerConditions` TravelerMatchConditions — Matching conditions for traveler.
            - `workerTypes` WorkerType[] — Worker types. Users belonging to any of these would match.
            - `countries` string[] — Countries.
            - `legalEntities` Reference[] — Legal entities
              - …
            - `departments` Reference[] — Departments
              - …
            - `costCenters` Reference[] — Cost centers
              - …
            - `offices` Reference[] — Offices
              - …
          - `travelTypes` TravelType[] — Travel types to match.
          - `travelRegionTypes` TravelRegionType[] — Travel region types to match.
          - `tripUsageTypes` TripUsageType[] — Trip usage types to match. If empty, all trip usage types will be matched.
        - `questionType` QuestionType — Question type.
          - `preSearchQuestionType` 'UNKNOWN_SEARCH_QUESTION_TYPE' | 'PURPOSE_OF_TRIP' — Types of pre-search questions. PURPOSE_OF_TRIP required to ask purpose of the trip user is going to. For example: meeting, training, interview.
          - `preCheckoutQuestionType` 'UNKNOWN_CHECKOUT_QUESTION_TYPE' | 'USER_DEFINED_QUESTION' | 'OOP_REASON_CODE' — 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.
    - `preBookQuestionResponseId` string — The unique id sent back in the pre book questions API response
  - `preSearchAnswers` PreSearchAnswers
    - `answers` EntityAnswer[]
      - `entityId` string — The unique ID for the question.
      - `userInput` string — The text input given by user (if any).
      - `itemIds` integer[] — The id/enum value corresponding to the option chosen by the user as answer.
      - `answers` AnswerPair[]
        - `item` string — The option selected from the list of available choices.
        - `value` string — The additional input provided (by the user) while selecting one of the options.
        - `description` string — Description of the selected option.
      - `customFieldType` 'QUESTION' | 'MEETING' | 'BUDGET' | 'BREX_TOKEN' — The type of custom field.
      - `questionDisplayText` string — The question text to be displayed to the user.
      - `question` Question — The message defines the format of a question which can be asked to a user in any kind of workflows.
        - `id` string, uuid, required
        - `name` string, required — Question display name that the user will see. For eg, 'Choose the purpose of your trip'.
        - `questionFormat` 'INPUT_BOX' | 'RADIO_BUTTON' | 'CHECKBOX' | 'CHECKBOX_WITH_PERCENTAGE' — 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.
        - `optionInfo` OptionInfo — Options related information for the question.
          - `source` 'MANUAL' | 'COMPANY_CONFIG', required — Option source
          - `sourceMetadata` OptionSourceMetadata — Wrapper for option source company config.
            - `companyConfig` CompanyConfigSource — For this option source, options would be auto generated based on specified parameter.
              - …
          - `totalNumOptions` integer — Total number of options
          - `options` Option[] — Available options for the question. This will contain only max 10 options if only summary is requested.
            - `displayCode` string, required — The code which is sent in answer response.
            - `displayValue` string — The text to be displayed to the user beside this option.
        - `isRequired` boolean, required — Whether its compulsory to answer the question or not.
        - `isDisabled` boolean, required — Whether the question is disabled or not. If true, this should not be asked.
        - `includeInItinerary` boolean — Whether to include this question in the itinerary related emails.
        - `customFieldLocations` CustomFieldLocation[]
        - `matchConditions` CustomFieldMatchConditions — Conditions to select the custom field for given context.
          - `travelerConditions` TravelerMatchConditions — Matching conditions for traveler.
            - `workerTypes` WorkerType[] — Worker types. Users belonging to any of these would match.
            - `countries` string[] — Countries.
            - `legalEntities` Reference[] — Legal entities
              - …
            - `departments` Reference[] — Departments
              - …
            - `costCenters` Reference[] — Cost centers
              - …
            - `offices` Reference[] — Offices
              - …
          - `travelTypes` TravelType[] — Travel types to match.
          - `travelRegionTypes` TravelRegionType[] — Travel region types to match.
          - `tripUsageTypes` TripUsageType[] — Trip usage types to match. If empty, all trip usage types will be matched.
        - `questionType` QuestionType — Question type.
          - `preSearchQuestionType` 'UNKNOWN_SEARCH_QUESTION_TYPE' | 'PURPOSE_OF_TRIP' — Types of pre-search questions. PURPOSE_OF_TRIP required to ask purpose of the trip user is going to. For example: meeting, training, interview.
          - `preCheckoutQuestionType` 'UNKNOWN_CHECKOUT_QUESTION_TYPE' | 'USER_DEFINED_QUESTION' | 'OOP_REASON_CODE' — 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.
    - `userEntitiesResponseId` string
  - `postPaymentVerificationInfo` union — Payment information sent after the verification of payment method.
    - object — Wrapper for post stripe verification info object.
      - `postStripeVerificationInfo` PostStripeVerificationInfo — Object to indicate successful stripe verification and provide payment information for next steps.
        - `paymentMethodId` string — Stripe's payment method id for which the verification was performed.
      - `paymentKey` string — Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.
    - object — Wrapper for post url based verification info object.
      - `postUrlBasedVerificationInfo` PostUrlBasedVerificationInfo
        - `pnrId` string — Pnr Id, to continue with the booking flow/check the status of the pnr.
      - `paymentKey` string — Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.
    - object — Wrapper for amadeus checkout verification info object
      - `amadeusCheckoutVerificationInfo` AmadeusCheckoutVerificationInfo
        - `paymentActionTokens` AmadeusPaymentActionToken[], required
          - `paymentRequestId` string, required — Initial payment id generated by checkout SDK to initiate payment
          - `actionToken` string, required — Token returned by checkout SDK to create/validate FOP in PSS order
        - `paymentRequestId` string — Initial payment id generated by checkout SDK to initiate payment
        - `actionToken` string — Token returned by checkout SDK to create/validate FOP in PSS order
        - `confirmPayment` boolean — Flag which indicates that the payment confirmation is now required (after 3ds or redirection)
      - `paymentKey` string — Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.
    - object — Wrapper for 3DS2 post verification info object
      - `threeDSecure2PostVerificationInfo` ThreeDSecure2PostVerificationInfo — Result of 3DS2 verification.
        - `results` ThreeDSecure2VerificationResultItem[], required — List of 3DS2 verification results.
          - `cardId` string, required — Card id for which the verification was performed.
          - `sessionId` string, required — session id of the payment service provider.
          - `success` boolean, required — Whether the 3DSecure2 authentication was successful.
      - `paymentKey` string — Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.
    - object — Wrapper for post razorpay verification info object.
      - `postRazorpayVerificationInfo` RazorpayPostVerificationInfo — Object to indicate successful stripe verification and provide payment information for next steps.
        - `paymentId` string, required — Razorpay payment id for which the verification was performed.
        - `orderId` string — Razorpay order id in which the payment was added.
        - `signature` string — Razorpay signature to validate the payment.
      - `paymentKey` string — Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.
  - `isPreAuthApprovalRequired` boolean — Flag to check if the pre-authorization approval is enabled.
  - `customFieldV3Responses` CustomFieldV3Response[] — Custom field responses for the booking.
    - `fieldId` string, uuid, required — Custom field id
    - `fieldName` string — Name of the custom field
    - `armId` string, uuid, required — Arm id which is applicable
    - `includeLocations` IncludeLocation[]
    - `selectedOptions` CustomFieldSelectedOption[], required — The list of options that are selected by user or auto populated.
      - `name` string, required — Value of the selection
      - `translatedName` string — Translated value of the selection
      - `description` string — Description of the selection
      - `translatedDescription` string — Translated description of the selection
      - `additionalUserInput` string — Additional user input
      - `additionalInfos` string[] — Actual values of the additional infos
      - `additionalInfoConfigs` AdditionalInfo[] — Additional info configs for the selected option
        - union — Additional data need to be sent along with the custom field response.
          - object — Variable defining the additional value to be sent along with custom field response.
            - `type` string, required
            - `name` 'PUBLISHED_FARE' | 'LLF' | 'ADD_COLLECT_AMOUNT' | 'SELECTED_FARE' | 'SPLIT_PAYMENT_FARE', required — Name of the variable.
          - object — Expression consisting of variables and constants which needs to be sent along with custom field response.
            - `type` string, required
            - `formatExpression` string, required — The expression must be of format : `<any_text> ${expression} <any_text>`.The expression can consist of a combination of variables and mathematical operations. Variable names must be same as VariableName Enum. To define mathematical operations, the operation name should follow the format `math.<math_op>(arg1, arg2)`. Both `arg1` and `arg2` can be variables or constants. The supported math operations (math_op) include: `add, mul, div, sub, min, and max`. All keywords, such as `<math_op>, math, and var` must be written in lowercase.
            - `variables` VariableName[] — Reference names of the variables present in the expression.
  - `manualRemarks` ThirdPartyPnrRemark[] — Remarks from the frontend to be added to the PNR during creation.
    - `sabre` SabrePnrRemark — Sabre Remark
      - `type` 'ALPHA_CODED' | 'CLIENT_ADDRESS' | 'CORPORATE' | 'DELIVERY_ADDRESS' | 'GENERAL' | 'GROUP_NAME' | 'HIDDEN' | 'HISTORICAL' | 'INVOICE' | 'ITINERARY' | 'OSI' — Type of remark, for eg, General, Invoice, etc.
      - `text` string — ThirdPartyPnrRemark
      - `legIndex` integer — Index referencing the flight leg for which the remark should be added. Currently required only for OSI Remarks. Should be used in conjunction with the flight Index.
      - `flightIndex` integer — Index referencing the flight for which the remark should be added. Currently required only for OSI Remarks. Should be used in conjunction with the leg Index.

## Response `200`

OK

- AirCreatePnrResponse
  - `pnrId` string — Spotnana PNR ID.
  - `sourcePnrId` string — Source PNR ID
  - `pnrStatus` 'SUCCESS' | 'APPROVAL_PENDING' | 'CC_VERIFICATION_REQUIRED' | 'PAYMENT_PENDING' | 'CONFIRMATION_PENDING' | 'ERROR' — PNR status (for example success, approval pending)
  - `createPnrApplicationInfo` object — Create PNR application info, will return warning or error if present
    - `applicationWarning` ApplicationWarnings[]
      - `warningType` 'LOYALTY_NAME_MISMATCH' | 'MEAL_NOT_AVAILABLE' — Warning Type
      - `description` string — Warning description

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — The specified resource was not found.

---

[API](https://skmtc.net/spotnana/apis/air-api.md) · [All operations](https://skmtc.net/spotnana/apis/air-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/spotnana/air-api/versions/3009937ca024/schema)
