# Get cancellation details

This endpoint gets cancellation details for a given trip ID and PNR ID.

Endpoint: GET /v2/trips/{tripId}/pnrs/{pnrId}/cancellation-details
Version: v2
Security: Bearer

## Security:

  - `Bearer` (unknown)
    http bearer

## Path parameters:

  - `tripId` (string, required)
    Trip ID.

  - `pnrId` (string, required)
    PNR ID.

## Response 200:

  - `200` (unknown)
    OK

## Response 200 fields (application/json):

  - `pnrId` (string, required)
    PNR ID for the booking.
    Example: 1234567890

  - `tripId` (string, required)
    Trip ID for the booking.
    Example: 2345678901

  - `cancellationDetails` (object)
    Cancellation details for this booking

  - `cancellationDetails.air` (object)
    Cancellation details for air booking.

  - `cancellationDetails.air.travelers` (array, required)
    Cancellation information for travelers in this booking.

  - `cancellationDetails.air.travelers.userId` (object, required)
    User identifier

  - `cancellationDetails.air.travelers.userId.id` (string, required)

  - `cancellationDetails.air.travelers.travelerInfo` (object)
    The traveler identifiers. These can be either the Spotnana user IDs of the travelers or information regarding
the adhoc travelers.

  - `cancellationDetails.air.travelers.travelerInfo.adhocTravelerInfo` (object)
    Describes an adhoc traveler.

  - `cancellationDetails.air.travelers.travelerInfo.adhocTravelerInfo.externalId` (string)
    External Id of user
    Example: qwert123

  - `cancellationDetails.air.travelers.tickets` (array, required)
    Cancellation information for traveler tickets.

  - `cancellationDetails.air.travelers.tickets.ticketNumber` (string)
    Ticket number. For non-ticketed PNRs, this field will not be present.
    Example: 0111234567890

  - `cancellationDetails.air.travelers.tickets.ticketType` (string, required)
    Type of ticket.
    Enum: "FLIGHT", "ANCILLARY"

  - `cancellationDetails.air.travelers.tickets.ticketFare` (object, required)
    Fare amount including base fare and tax.

  - `cancellationDetails.air.travelers.tickets.ticketFare.base` (object, required)
    Money object containing details such as the amount, the currency code, and the converted amount.

  - `cancellationDetails.air.travelers.tickets.ticketFare.base.amount` (number, required)
    The numeric value for the amount of money.
    Example: 510

  - `cancellationDetails.air.travelers.tickets.ticketFare.base.currencyCode` (string, required)
    The 3-letter currency code for the money amount (defined using ISO 4217 standard).
    Example: GBP

  - `cancellationDetails.air.travelers.tickets.ticketFare.base.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

  - `cancellationDetails.air.travelers.tickets.ticketFare.base.convertedCurrency` (string)
    The 3-letter currency code for the converted currency (defined using ISO 4217 standard).
    Example: USD

  - `cancellationDetails.air.travelers.tickets.ticketFare.base.otherCoinage` (array)
    List of the dollar amount in other coinage systems like reward points, cryptocurrency etc.

  - `cancellationDetails.air.travelers.tickets.ticketFare.taxBreakdown` (array)

  - `cancellationDetails.air.travelers.tickets.ticketFare.taxBreakdown.taxCode` (string)
    Tax code
    Example: VAT

  - `cancellationDetails.air.travelers.tickets.ticketFare.taxBreakdown.percentage` (number)
    Tax amount to total amount
    Example: 9

  - `cancellationDetails.air.travelers.tickets.ticketFare.taxBreakdown.description` (string)
    Tax name or Tax Description
    Example: AIR TRAVELLERS SECURITY CHARGE

  - `cancellationDetails.air.travelers.tickets.cancellationState` (string, required)
    - CANCELLABLE_BY_OBT: Cancellation possible via API.
- CANCELLABLE_BY_SUPPORT: Cancellation possible via agent support.
- NON_CANCELLABLE: Booking is non-cancellable.
- CANCELLATION_IN_PROGRESS: Cancellation is in progress.
- CANCELLATION_BY_AGENT_REQUESTED: Cancellation request has been sent to agent.
- CANCELLED: Already cancelled.
- CANCELLATION_INFO_NOT_AVAILABLE: Cancellation information not available.
    Enum: "CANCELLABLE_BY_OBT", "CANCELLABLE_BY_SUPPORT", "NON_CANCELLABLE", "CANCELLATION_IN_PROGRESS", "CANCELLATION_BY_AGENT_REQUESTED", "CANCELLED", "CANCELLATION_INFO_NOT_AVAILABLE"

  - `cancellationDetails.air.travelers.tickets.cancellationOptions` (array)
    Cancellation options for this ticket. A ticket can have multiple options, like refunding
ticket, converting ticket to flight credits.

  - `cancellationDetails.air.travelers.tickets.cancellationOptions.cancellationType` (string)
    Type of cancellation.
    Enum: "REFUND", "VOID", "UNUSED_CREDITS"

  - `cancellationDetails.air.travelers.tickets.cancellationOptions.fareInfo` (object, required)
    Fare breakup for cancellation.

  - `cancellationDetails.air.travelers.tickets.cancellationOptions.fareInfo.flightCredits` (object)
    Flight credits for a traveler.

  - `cancellationDetails.air.travelers.tickets.cancellationOptions.offerExpiryInfo` (object)
    Date time in UTC till when this cancellation offer is valid. For example void window expiry.

  - `cancellationDetails.air.travelers.tickets.cancellationOptions.offerExpiryInfo.dateTime` (object, required)
    ISO8601 UTC Date Time

  - `cancellationDetails.air.travelers.tickets.cancellationOptions.optionId` (string)
    Unique id for this cancellation option.
    Example: 1

  - `cancellationDetails.air.travelers.tickets.cancellationNotSupportedReasons` (array)
    Reasons why cancellation is not supported via OBT.

  - `cancellationDetails.air.travelers.tickets.isNonRefundableAndNonExchangeable` (boolean)
    If true, the ticket is not refundable and not exchangeable.

  - `cancellationDetails.air.travelers.cancellationOptions` (array)
    Cancellation options for this traveler.

  - `cancellationDetails.air.cancellationOptions` (array)
    Cancellation options for this booking.

  - `cancellationDetails.air.cancellationNotSupportedReasons` (array)
    Reasons why cancellation is not supported via OBT.

  - `cancellationDetails.rail` (object)
    Cancellation details for rail booking.

  - `cancellationDetails.rail.refundOptions` (array)
    Refund options for this booking.

  - `cancellationDetails.rail.refundOptions.refundId` (string, required)
    Refund option id.
    Example: 1234567890

  - `cancellationDetails.rail.refundOptions.refundRateInfo` (object, required)
    Rate information for this refund option.

  - `cancellationDetails.rail.refundOptions.refundRateInfo.voucher` (object)
    Refund voucher information for this refund option.

  - `cancellationDetails.rail.refundOptions.legs` (array)
    List of leg indices for the refund option.

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

