# Modify Book

Book[cancel] new[existing] legs into an existing pnr using the selected rate option from airModifySearch operation.

Endpoint: POST /v2/air/modify-book
Version: v2
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer

## Request fields (application/json):

  - `bookingId` (string, required)
    Booking id returned in successful response of air-revalidate-itin api call in the booking flow.
    Example: ChBlMTFmOTVkZTcwZmZjMmI2EhAwZjVkNDhhNGJjNWExZTMw

  - `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 trip.

  - `tripData.tripId.id` (string, required)
    Id.
    Example: 2783425534

  - `skipTicketing` (boolean)
    If this is true, the PNR is not set up for ticketing.
    Example: true

  - `postPaymentVerificationInfo` (object)
    Payment information sent after the verification of payment method.

  - `postPaymentVerificationInfo.paymentKey` (string)
    Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.

  - `postPaymentVerificationInfo.postStripeVerificationInfo` (object)
    Object to indicate successful stripe verification and provide payment information for next steps.

  - `postPaymentVerificationInfo.postStripeVerificationInfo.paymentMethodId` (string)
    Stripe's payment method id for which the verification was performed.
    Example: pm_1HzKDPI3bT9GUjvoUkRQooN3

  - `postPaymentVerificationInfo.postUrlBasedVerificationInfo` (object)

  - `postPaymentVerificationInfo.postUrlBasedVerificationInfo.pnrId` (string)
    Pnr Id, to continue with the booking flow/check the status of the pnr.

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo` (object)

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.paymentActionTokens` (array, required)

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.paymentActionTokens.paymentRequestId` (string, required)
    Initial payment id generated by checkout SDK to initiate payment

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.paymentActionTokens.actionToken` (string, required)
    Token returned by checkout SDK to create/validate FOP in PSS order

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.paymentRequestId` (string)
    Initial payment id generated by checkout SDK to initiate payment

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.actionToken` (string)
    Token returned by checkout SDK to create/validate FOP in PSS order

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.confirmPayment` (boolean)
    Flag which indicates that the payment confirmation is now required (after 3ds or redirection)

  - `postPaymentVerificationInfo.amadeusCheckoutVerificationInfo.saveCardForFutureUse` (boolean)
    Flag to indicate that card can be saved for future use.

  - `postPaymentVerificationInfo.threeDSecure2PostVerificationInfo` (object)
    Result of 3DS2 verification.

  - `postPaymentVerificationInfo.threeDSecure2PostVerificationInfo.results` (array, required)
    List of 3DS2 verification results.

  - `postPaymentVerificationInfo.threeDSecure2PostVerificationInfo.results.cardId` (string, required)
    Card id for which the verification was performed.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `postPaymentVerificationInfo.threeDSecure2PostVerificationInfo.results.sessionId` (string, required)
    session id of the payment service provider.
    Example: sid_7q3lpqopuwmuxct3l3rkz225ae

  - `postPaymentVerificationInfo.threeDSecure2PostVerificationInfo.results.success` (boolean, required)
    Whether the 3DSecure2 authentication was successful.
    Example: true

  - `postPaymentVerificationInfo.postRazorpayVerificationInfo` (object)
    Object to indicate successful stripe verification and provide payment information for next steps.

  - `postPaymentVerificationInfo.postRazorpayVerificationInfo.paymentId` (string, required)
    Razorpay payment id for which the verification was performed.
    Example: pay_Ot3t93Xwmh2hOg

  - `postPaymentVerificationInfo.postRazorpayVerificationInfo.orderId` (string)
    Razorpay order id in which the payment was added.
    Example: order_OshJ61KRRSzb2Q

  - `postPaymentVerificationInfo.postRazorpayVerificationInfo.signature` (string)
    Razorpay signature to validate the payment.
    Example: f2c0494b77cb067a0ac76973d65cdce8c9de593a55ef2f81969cbabbe7ce493d

  - `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)

  - `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.translatedName` (string)
    Translated value of the selection

  - `customFieldV3Responses.selectedOptions.description` (string)
    Description of the selection

  - `customFieldV3Responses.selectedOptions.translatedDescription` (string)
    Translated 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

  - `customFieldV3Responses.selectedOptions.additionalInfoConfigs.type` (string, required)
    Enum: "VARIABLE", "EXPRESSION"

  - `customFieldV3Responses.selectedOptions.additionalInfoConfigs.name` (string, required)
    Name of the variable.
    Enum: "PUBLISHED_FARE", "LLF", "ADD_COLLECT_AMOUNT", "SELECTED_FARE", "SPLIT_PAYMENT_FARE"

  - `customFieldV3Responses.selectedOptions.additionalInfoConfigs.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.
    Example: Result:  ${math.mul(LLF,5)}  ${ADD_COLLECT_AMOUNT}

  - `customFieldV3Responses.selectedOptions.additionalInfoConfigs.variables` (array)
    Reference names of the variables present in the expression.

  - `customFieldV3Responses.selectedOptions.optionId` (string)
    Id of the selected option; sent by clients, never returned

  - `waiveOffInfo` (object)
    Waive off info.

  - `waiveOffInfo.waiveOffInfoPerModules` (array)
    Waive off info per module.

  - `waiveOffInfo.waiveOffInfoPerModules.moduleId` (string)
    Module id
    Enum: "BOOKING", "AGENT"

  - `waiveOffInfo.waiveOffInfoPerModules.waiveOffFeeReason` (object)
    Fee waive off reason info.

  - `waiveOffInfo.waiveOffInfoPerModules.waiveOffFeeReason.reasonCode` (string)
    Fee waive off reason code.
    Example: WA05

  - `waiveOffInfo.waiveOffInfoPerModules.waiveOffFeeReason.reason` (string)
    Fee waive off reason description.
    Example: Customer goodwill

  - `callbackUrlVerificationInfo` (object)
    Callback URL to the source post successful verification by the supplier.

  - `callbackUrlVerificationInfo.sourceCallbackUrl` (string)
    The callback URL to redirect to after successful verification.
    Example: https://app.spotnana.com/flights/check-pnr-status

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `pnrNumber` (string)
    Example: ABXDFZ

  - `pnrStatus` (string)
    Status of PNR
    Enum: "UNKNOWN", "INITIATED", "CANCELLED", "CONFIRMED", "GROUP_BOOKING_ON_REQUEST", "WAITLISTED", "PENDING", "AIRLINE_UPGRADE", "WAITLIST_CONFIRMED", "BOOKING_DENIED_CONTACT_SUPPORT", "NO_SHOW", "CONTACT_SUPPORT", "STATUS_CHANGED_CONTACT_SUPPORT", "SCHEDULE_CHANGE", "SEGMENT_REQUEST", "SCHEDULE_CHANGE_WAITLISTED_BOOKING", "REQUEST_PENDING", "WAITLISTED_NOT_CONFIRMED", "SCHEDULE_CHANGE_NOT_CONFIRMED", "SCHEDULE_CHANGE_PENDING_STATUS", "MIS_CONNECTION", "REQUESTED", "TICKETED", "VOIDED", "CANCELLED_BY_VENDOR", "CANCELLATION_IN_PROGRESS", "REINSTATED", "BOOKING_ON_HOLD", "AIRLINE_CONTROL", "MODIFIED", "PAYMENT_DECLINED", "INOPERATIVE", "UNCONFIRMED"

  - `pnrId` (string)
    Spotnana PNR ID
    Example: 1213124111

  - `paymentVerificationInfo` (object)
    VerificationInfo required for the payment operation.

  - `paymentVerificationInfo.gatewayIdentifier` (object)

  - `paymentVerificationInfo.gatewayIdentifier.gatewayId` (string)
    Gateway Id for which the payment method should be verified.

  - `paymentVerificationInfo.gatewayIdentifier.gatewayType` (string)
    Gateway Type for of the verification gateway.
    Enum: "PAYMENT_GATEWAY_UNKNOWN", "STRIPE", "BREX", "RAZORPAY"

  - `paymentVerificationInfo.paymentKey` (string)
    Serialized key to identify the payment executed on payment gateway that will be used for post payment verification.

  - `paymentVerificationInfo.stripeVerificationInfo` (object)
    Verification information required for card stripe verification.

  - `paymentVerificationInfo.stripeVerificationInfo.stripeCardTokens` (object)
    Stripe card tokens used by clients in authorizing newly added cards.

  - `paymentVerificationInfo.stripeVerificationInfo.stripeCardTokens.paymentProcessor` (string, required)
    Payment processor involved.
    Example: STRIPE

  - `paymentVerificationInfo.stripeVerificationInfo.stripeCardTokens.paymentMethodId` (string, required)
    Stripe's payment-method-id for the card.
    Example: pm_1HzKDPI3bT9GUjvoUkRQooN3

  - `paymentVerificationInfo.stripeVerificationInfo.stripeCardTokens.setupIntentClientSecret` (string, required)
    Stripe client secret for attaching the card to the setup-intent.
    Example: seti_1IBwEiKXFM6BpWYhfdCGZ7sg_secret_InXJDifWGBcVqekJvhAxidON6vHAvfS

  - `paymentVerificationInfo.stripeVerificationInfo.stripeCardTokens.connectedAccountId` (string)
    Account Id of the connected account in which above payment-method and setup-intent exist. This is populated only when a connected account is used.
    Example: acct_1NT8oyCZnFgI0lFY

  - `paymentVerificationInfo.stripeVerificationInfo.stripeCardTokens.publishableKey` (string)
    Publishable key of the Stripe platform account.
    Example: pk_test_51Hx7XyI3bT9GUjvoUkRQooN3

  - `paymentVerificationInfo.urlVerificationInfo` (object)
    Verification information required for url based payment verification.

  - `paymentVerificationInfo.urlVerificationInfo.ccVerificationUrl` (string)
    Verification url for the payment source.

  - `paymentVerificationInfo.threeDSecure2VerificationInfo` (object)
    Verification information required for 3DS2 authentication.

  - `paymentVerificationInfo.threeDSecure2VerificationInfo.verificationInfoList` (array, required)
    List of 3DS2 verification info.

  - `paymentVerificationInfo.threeDSecure2VerificationInfo.verificationInfoList.cardId` (string, required)
    Card id for which the verification was performed.
    Example: 550e8400-e29b-41d4-a716-446655440000

  - `paymentVerificationInfo.threeDSecure2VerificationInfo.verificationInfoList.sessionId` (string, required)
    session id of the payment service provider.
    Example: sid_7q3lpqopuwmuxct3l3rkz225ae

  - `paymentVerificationInfo.threeDSecure2VerificationInfo.verificationInfoList.redirectUrl` (string, required)
    3DS2 verification redirect url.
    Example: https://api.checkout.com/sessions-interceptor/sid_7q3lpqopuwmuxct3l3rkz225ae

  - `paymentVerificationInfo.razorPayVerificationInfo` (object)
    Verification information required when card is tokenized via Razorpay for Indian markets.

  - `paymentVerificationInfo.razorPayVerificationInfo.paymentProcessor` (string, required)
    Payment processor involved.
    Example: RAZORPAY

  - `paymentVerificationInfo.razorPayVerificationInfo.paymentAuthUrl` (string)
    URL for authorizing the payment on the card.

  - `processingWarning` (string)
    Optional warning message if processing is taking longer than expected
    Example: Modification is successful but update is taking longer than expected

## Response 401:

  - `401` (unknown)
    Unauthorized

## 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:

  - `403` (unknown)
    Forbidden

## 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:

  - `404` (unknown)
    The specified resource was not found.

## 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.

