> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# hotel-cancel-preview

> Preview what cancelling a hotel booking would cost

Quote what cancelling would return to the customer right now: the refund, the penalty in force, and the policy behind them. NOTHING is cancelled. `refund` is the customer figure, what they paid for the item less the penalty. All amounts are customer-facing only. `commitable: false` means a commit would be refused and `not_commitable_reason` says why. The handle this returns is named `quote`: it is what POST /v1/hotel\_cancel\_commit consumes, and it stops binding at `expires_at`. Every call here needs API authentication; this is about which mode identifies the booking. Call get\_booking first, then send booking\_ref and the selected booked\_item\_id. An owning credential identifies the booking without last\_name; guests must supply it. The deprecated `provider`, `order_id`, `provider_reference` and `provider_booking_id` are accepted until 2027-04-30 where the request declares them; a request that sends one is answered with `Deprecation` and `Sunset` headers.


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/hotel_cancel_preview
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.125.0
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.


    ### Per-end-user attribution


    On booking calls you may send an optional `X-End-User-Id` request header to
    attribute the booking to one of your own end users (for per-end-user
    attribution and rate-limiting). The value is an **opaque, tenant-scoped**
    identifier that you choose — not a Jinko account id. Omit it to book as the
    tenant. Values prefixed `user_` or `org_` are rejected.
servers:
  - url: https://api.gojinko.com
    description: Production
  - url: https://api.sandbox.gojinko.com
    description: Sandbox
security: []
paths:
  /v1/hotel_cancel_preview:
    post:
      tags:
        - Post-booking
      summary: Preview what cancelling a hotel booking would cost
      description: >-
        Quote what cancelling would return to the customer right now: the
        refund, the penalty in force, and the policy behind them. NOTHING is
        cancelled. `refund` is the customer figure — what they paid for the item
        less the penalty. All amounts are customer-facing only. `commitable:
        false` means a commit would be refused and `not_commitable_reason` says
        why. The handle this returns is named `quote`: it is what POST
        /v1/hotel_cancel_commit consumes, and it stops binding at `expires_at`.
        Every call here needs API authentication; this is about which mode
        identifies the booking. Call get_booking first, then send booking_ref
        and the selected booked_item_id. An owning credential identifies the
        booking without last_name; guests must supply it. The deprecated
        `provider`, `order_id`, `provider_reference` and `provider_booking_id`
        are accepted until 2027-04-30 where the request declares them; a request
        that sends one is answered with `Deprecation` and `Sunset` headers.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HotelCancelPreviewRequest'
      responses:
        '200':
          description: What cancelling would cost
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HotelCancelPreviewResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: Malformed JSON in request body.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: AUTH_REQUIRED
                  message: Invalid or expired API key.
                  doc_url: https://docs.gojinko.com/authentication/api-keys
        '402':
          description: Payment required — organization balance exhausted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: PAYMENT_REQUIRED
                  message: >-
                    Insufficient balance — this call costs $0.0150 and your
                    organization has $0.0000 available. Top up at
                    https://dashboard.gojinko.com/developers/billing/topup
                  doc_url: https://docs.gojinko.com/concepts/errors
        '404':
          description: Unknown booking, or one this credential may not read.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: booking not found
        '409':
          description: >-
            The supplier will not cancel this booking as it stands — it is
            already cancelled, or was never confirmed. A hotel booking that is
            no longer active is also refused with `reason_code:
            booking_not_active` when the caller may service it (any other caller
            gets the same 404 as for an unknown booking). `code` is
            `not_cancellable`, as a sibling of `error`. `error.message` is “This
            booking cannot be cancelled online. Contact Jinko support.” when the
            supplier refused, or the platform’s sentence when the booking is no
            longer active. There is no quote to show and nothing to commit.
            Another operation already in flight on the item (an exchange, a
            refund or a cancellation) is refused the same way, with `code:
            active_operation_exists` and `active_operation` naming it: follow it
            with the status route and preview again once it has finished. A 409
            with no `code` beside `error` is not this case — the reference
            matched more than one booking.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ServicingConflictResponse'
                  - $ref: '#/components/schemas/BookingSelectionConflict'
              example:
                error:
                  code: CONFLICT
                  message: >-
                    This booking cannot be cancelled online. Contact Jinko
                    support.
                code: not_cancellable
        '410':
          description: The resource this request names no longer exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: GONE
                  message: The resource no longer exists.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: A required field is missing or invalid.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '429':
          description: Rate limit or quota exceeded
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying. Absent when no interval
                applies.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Too many requests. Retry after the Retry-After delay.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '502':
          description: The travel provider rejected the request, or an upstream call failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_REJECTED
                  message: The request was declined for this offer. Try another offer.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '503':
          description: No travel provider can serve the request right now
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying. Absent when no interval
                applies.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_UNAVAILABLE
                  message: >-
                    The service is temporarily unavailable. Retry after the
                    Retry-After delay.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '504':
          description: The travel provider did not answer in time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_TIMEOUT
                  message: >-
                    The request timed out before a result was available. Retry
                    the request.
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    HotelCancelPreviewRequest:
      type: object
      properties:
        booking_ref:
          type: string
          minLength: 1
          description: >-
            Jinko booking reference. Call get_booking first, then select its
            booked_item_id for servicing.
          example: JNK-A0AUR2
        booked_item_id:
          type: string
          pattern: ^itm_[a-z2-7]+$(?![\s\S])
          description: >-
            The booked item, from get_booking items[].booked_item_id. Preserved
            across exchanges. Omit only when the booking has exactly one item of
            the requested domain; otherwise a 409 returns items to choose from.
          example: itm_aaaaaaaaaaaaafhuxsdxpbzrbfz5hm3a
        last_name:
          type: string
          minLength: 1
          description: >-
            Required for guest lookup. A credential that owns the booking may
            omit it; ownership is checked by the platform.
          example: Doe
        provider_reference:
          type: string
          minLength: 1
          description: >-
            Deprecated: name the booking with booking_ref and booked_item_id
            from get_booking. Names the booking instead of booking_ref and
            last_name, never beside it, and needs a credential that owns the
            booking. Accepted until 2027-04-30; a request that sends it is
            answered with `Deprecation` and `Sunset` headers.
          deprecated: true
        intent:
          $ref: '#/components/schemas/IntentInput'
      example:
        booking_ref: JNK-H1ZK90
        last_name: Doe
    HotelCancelPreviewResponse:
      type: object
      properties:
        quote_id:
          type: string
          description: >-
            This quote. Pass it as `quote_id` to POST /v1/hotel_cancel_commit —
            it binds the commit to the figures below. Opaque; the format may
            evolve.
          example: svq_01J7ZR3M8FKX2P9C
        quote:
          type: string
          description: 'Deprecated: use `quote_id` instead. Same value.'
          example: svq_01J7ZR3M8FKX2P9C
          deprecated: true
        state:
          type: string
          description: >-
            Lifecycle of the QUOTE, not of a cancellation — nothing has been
            cancelled by this call. `completed` means the figures are final
            until `expires_at`.
          example: completed
        commitable:
          type: boolean
          description: >-
            Whether a commit against this quote would be accepted right now.
            When false, `not_commitable_reason` says why and committing is
            pointless.
          example: true
        support_level:
          $ref: '#/components/schemas/ServicingSupportLevel'
        manual_reason:
          type: string
          description: >-
            Why a person has to act, in words the customer can be shown. Present
            with `support_level: MANUAL_REQUIRED`. Where the reason would be the
            supplier’s own words, it reads “This request needs manual handling
            by Jinko support.” `not_commitable_reason` is the code to branch on;
            this is the sentence to show.
          example: >-
            the supplier's cancellation policy names no fee in force for this
            booking, so the fee could not be established
        expires_at:
          type: string
          description: >-
            When this quote stops binding. Committing after it answers 409
            `QUOTE_EXPIRED`; take a fresh quote and show the customer the new
            figure before committing again.
          example: '2026-09-03T12:15:00Z'
        booked_item_id:
          type: string
          description: >-
            The booked item this quote would cancel — the `booked_item_id`
            get_booking returns. A booking holding several items is quoted and
            cancelled one item at a time.
          example: itm_7f2c9a4e8b1d
        item:
          type: string
          description: 'Deprecated: use `booked_item_id` instead. Same value.'
          example: itm_7f2c9a4e8b1d
          deprecated: true
        refund:
          type: object
          properties:
            amount:
              type: number
              description: >-
                Deprecated: use `amount_money` instead. Alternative to `value`
                on some endpoints (the two never appear together); its scale
                depends on decimal_places. When this object carries
                decimal_places, amount is an INTEGER in minor units — divide by
                10 ** decimal_places (e.g. select_ancillaries
                total_with_ancillaries). When there is no decimal_places field,
                amount is a decimal in MAJOR units, safe to display as-is (e.g.
                trip and checkout totals).
              deprecated: true
            value:
              type: integer
              description: >-
                Deprecated: use `amount_money` instead. Integer amount in MINOR
                units, always paired with decimal_places — divide by 10 **
                decimal_places to display. Example: value 15977 with
                decimal_places 2 is 159.77 USD. Rendering this field directly
                shows prices 100x too high for 2-decimal currencies.
              example: 41250
              deprecated: true
            currency:
              type: string
              description: 'Deprecated: use `amount_money` instead. ISO 4217 currency code.'
              example: USD
              deprecated: true
            decimal_places:
              type: integer
              description: >-
                Deprecated: use `amount_money` instead. Scale of the integer
                value/amount: display = integer / 10 ** decimal_places. Always
                sent alongside minor-unit amounts. Usually the ISO 4217 digits
                of the currency (2 for USD/EUR/GBP, 0 for JPY/KRW, 3 for
                BHD/JOD/KWD) but currency-converted prices can carry a different
                scale — ALWAYS use the decimal_places sent with the amount,
                never a hardcoded 2. Only if the field is genuinely absent on a
                value-shaped object, fall back to the ISO digits for the
                currency.
              example: 2
              deprecated: true
            display:
              type: string
              description: >-
                Deprecated: use `amount_money` instead. The same figure as a
                string ready to show: the ISO 4217 code, a space, then the
                amount, e.g. "USD 159.77". With decimal_places it is written at
                exactly that scale (value 1561500, JPY, decimal_places 2 is "JPY
                15615.00"); without, at the ISO digits of the currency. Show
                this; compute with the number. Absent when the figure is not
                money (a cancellation step expressed as a percent or a number of
                nights) or could not be read unambiguously.
              example: USD 412.50
              deprecated: true
            amount_money:
              allOf:
                - $ref: '#/components/schemas/MoneyValue'
                - description: The refund figure. Absent when the figure is not known.
            basis:
              type: string
              description: >-
                How the figure was computed. `sell_minus_penalty` — what the
                customer paid for this item, less the penalty. `original_charge`
                — the entire charge is reversed, penalty-free (a void).
                `supplier_refund` — the ticket was exchanged, and the figure is
                what the airline refunds for the ticket now held, on a void as
                on a refund; it does not add up with what the customer paid less
                the penalty. The platform chooses; the caller cannot ask for
                one.
              example: sell_minus_penalty
          description: >-
            THE CUSTOMER FIGURE: what would go back to the payment method, on
            the basis named in `basis`. Show this one. Absent is not zero.
        penalty:
          anyOf:
            - type: object
              properties:
                amount:
                  type: number
                  description: >-
                    Deprecated: use `amount_money` instead. Alternative to
                    `value` on some endpoints (the two never appear together);
                    its scale depends on decimal_places. When this object
                    carries decimal_places, amount is an INTEGER in minor units
                    — divide by 10 ** decimal_places (e.g. select_ancillaries
                    total_with_ancillaries). When there is no decimal_places
                    field, amount is a decimal in MAJOR units, safe to display
                    as-is (e.g. trip and checkout totals).
                  deprecated: true
                value:
                  type: integer
                  description: >-
                    Deprecated: use `amount_money` instead. Integer amount in
                    MINOR units, always paired with decimal_places — divide by
                    10 ** decimal_places to display. Example: value 15977 with
                    decimal_places 2 is 159.77 USD. Rendering this field
                    directly shows prices 100x too high for 2-decimal
                    currencies.
                  example: 41250
                  deprecated: true
                currency:
                  type: string
                  description: >-
                    Deprecated: use `amount_money` instead. ISO 4217 currency
                    code.
                  example: USD
                  deprecated: true
                decimal_places:
                  type: integer
                  description: >-
                    Deprecated: use `amount_money` instead. Scale of the integer
                    value/amount: display = integer / 10 ** decimal_places.
                    Always sent alongside minor-unit amounts. Usually the ISO
                    4217 digits of the currency (2 for USD/EUR/GBP, 0 for
                    JPY/KRW, 3 for BHD/JOD/KWD) but currency-converted prices
                    can carry a different scale — ALWAYS use the decimal_places
                    sent with the amount, never a hardcoded 2. Only if the field
                    is genuinely absent on a value-shaped object, fall back to
                    the ISO digits for the currency.
                  example: 2
                  deprecated: true
                display:
                  type: string
                  description: >-
                    Deprecated: use `amount_money` instead. The same figure as a
                    string ready to show: the ISO 4217 code, a space, then the
                    amount, e.g. "USD 159.77". With decimal_places it is written
                    at exactly that scale (value 1561500, JPY, decimal_places 2
                    is "JPY 15615.00"); without, at the ISO digits of the
                    currency. Show this; compute with the number. Absent when
                    the figure is not money (a cancellation step expressed as a
                    percent or a number of nights) or could not be read
                    unambiguously.
                  example: USD 412.50
                  deprecated: true
                amount_money:
                  allOf:
                    - $ref: '#/components/schemas/MoneyValue'
                    - description: >-
                        The penalty figure. Present only when `fee_known` is
                        true; absent when the fee is unknown, which is not zero.
                fee_known:
                  type: boolean
                  description: >-
                    false means the penalty could not be established — UNKNOWN,
                    not zero. Render it as "we will confirm the fee", never as
                    free cancellation, and expect the final figure on the
                    operation status.
                  example: true
            - type: object
              properties:
                fee_known:
                  type: boolean
                  enum:
                    - false
              required:
                - fee_known
          description: >-
            What the customer would forfeit. When unknown, the amount is
            omitted; a fee_known: false marker may remain. Absent is not zero.
            Read `fee_known` before showing it.
        policy:
          type: object
          properties:
            free_cancel_until:
              type: string
              nullable: true
              description: >-
                The last instant at which cancelling costs nothing. `null` means
                there is no free window — either the booking never had one or it
                has passed.
              example: '2026-09-01T00:00:00Z'
            is_refundable_now:
              type: boolean
              example: true
            tiers:
              type: array
              items:
                type: object
                properties:
                  from:
                    type: string
                    description: When this step starts applying.
                    example: '2026-09-01T00:00:00Z'
                  amount:
                    $ref: '#/components/schemas/Money'
                  fraction:
                    type: number
                    description: >-
                      The share of the paid price withheld from `from` onwards,
                      when the supplier states the step as a proportion rather
                      than a sum. A step carries `amount` or `fraction`, not
                      both.
                    example: 0.5
              description: >-
                The supplier's policy steps in time order. Informational: the
                figure that binds is `penalty`, computed for right now.
          description: >-
            The supplier's cancellation policy as it stands, for explaining the
            figures to the customer.
        not_commitable_reason:
          type: string
          description: >-
            Why `commitable` is false. Today: `penalty_exceeds_sell` (the
            penalty is at least what the customer paid), `multi_currency_basis`
            (the supplier prices the fee in a currency the customer was not
            charged in, so no single refund figure exists). A fee the supplier’s
            policy does not establish (`penalty.fee_known: false`) is
            `support_level: MANUAL_REQUIRED` with no reason code — read
            `manual_reason`. Two refusals are never values here: a booking the
            supplier will not cancel as it stands is 409 `not_cancellable` from
            this preview itself, and a supplier with no cancellation route is
            422 `provider_unsupported`. The contract reserves further values
            (`provider_unsupported`, `funds_unavailable`,
            `insufficient_time_to_converge`) and new reasons may be added, so
            treat an unrecognised value as "not right now".
          example: penalty_exceeds_sell
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - INVALID_SEGMENTS_TO_EXCHANGE
                - PARTIAL_EXCHANGE_UNSUPPORTED
                - LEG_ALREADY_DEPARTED
                - DEPARTURE_DATE_IN_PAST
                - LEG_DATES_OUT_OF_ORDER
                - INVALID_EXCHANGE_REQUEST
                - NOT_EXCHANGEABLE
                - CREDENTIAL_FORMAT_INVALID
                - PAYMENT_TYPE_NOT_ENABLED
                - PAYMENT_CREDENTIAL_INVALID
                - TRIP_OWNED_BY_OTHER_PAYMENT
                - IDEMPOTENCY_KEY_REUSED
                - ATTEMPT_IN_PROGRESS
                - ATTEMPT_TERMINAL
                - TEMPORARILY_UNAVAILABLE
                - AUTH_REQUIRED
                - PAYMENT_REQUIRED
                - RATE_LIMITED
                - BAD_REQUEST
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - GONE
                - QUOTE_PENDING
                - QUOTE_EXPIRED
                - TRIP_EXPIRED
                - TRIP_STATE_CONFLICT
                - OFFER_EXPIRED
                - OFFER_UNAVAILABLE
                - MISSING_CUSTOMER_DETAILS
                - INVALID_PHONE_NUMBER
                - INVALID_FLIGHT_NUMBER
                - CURRENCY_UNSUPPORTED
                - HOTEL_NAME_LOW_CONFIDENCE
                - DESTINATION_LOW_CONFIDENCE
                - UPSTREAM_REJECTED
                - UPSTREAM_UNAVAILABLE
                - UPSTREAM_TIMEOUT
                - UPSTREAM_ERROR
                - INTERNAL
              description: >-
                What went wrong, as a stable machine-readable code. This is a
                closed set — branch on it rather than on `message`, which is
                prose and may change. New codes arrive in a minor version, so
                treat an unknown one as its HTTP status. A code can also stop
                being emitted: it leaves this set in a minor version, named in
                the changelog, and a branch you wrote for it goes unreached
                rather than wrong.
              example: BAD_REQUEST
            message:
              type: string
              description: >-
                What went wrong, in prose. These codes always carry the same
                message, and it never includes text from a supplier:
                `RATE_LIMITED` — "Too many requests. Retry after the Retry-After
                delay."; `OFFER_EXPIRED` — "This offer has expired. Search
                again."; `OFFER_UNAVAILABLE` — "This offer is no longer
                available. Search again."; `UPSTREAM_REJECTED` — "The request
                was declined for this offer. Try another offer.";
                `UPSTREAM_UNAVAILABLE` — "The service is temporarily
                unavailable. Retry after the Retry-After delay.";
                `UPSTREAM_TIMEOUT` — "The request timed out before a result was
                available. Retry the request."; `UPSTREAM_ERROR` — "The request
                could not be completed.".
            doc_url:
              type: string
            field:
              type: string
              description: >-
                On a 400 `BAD_REQUEST` that names one refused input: the path of
                that field in your request, e.g. `selections[1].quantity` for
                the second selection of a `select_ancillaries` call. Absent when
                the refusal names no single field.
              example: selections[1].quantity
          required:
            - code
            - message
      required:
        - error
    ServicingConflictResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: CONFLICT
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
        code:
          $ref: '#/components/schemas/ServicingConflictCode'
        reason_code:
          type: string
          pattern: ^[A-Za-z_]{1,64}$
          description: >-
            Machine-readable reason for the servicing refusal.
            `already_cancelled` means this booking already has a successful
            cancellation recorded by Jinko; it is not a supplier answer.
            `booking_not_active` means get_booking returns a booking whose
            status is failed (for example, after payment), expired_quote,
            pending or exchange_partial_failure. Refund and hotel servicing
            routes refuse it with `code: not_cancellable` and a platform
            sentence in `error.message`, to a caller who may service the
            booking; any other caller gets the same 404 as for an unknown
            booking.
          example: already_cancelled
        retry_quote_id:
          type: string
          description: >-
            The quote to commit against when your acknowledged figure differs
            from a still-live quote’s refund (`quote_drift`). This is the same
            `quote_id`, not a new one. Show the customer `current.refund`, then
            commit again with this `quote_id` and that figure. Absent on
            `QUOTE_EXPIRED`, `superseded`, or a hotel `quote_drift` because the
            supplier’s policy moved since the quote. Preview again in those
            cases.
          example: svq_01J8AB4N7GLY3Q0D
        requote:
          type: string
          description: 'Deprecated: use `retry_quote_id` instead. Same value.'
          example: svq_01J8AB4N7GLY3Q0D
          deprecated: true
        current:
          type: object
          properties:
            refund:
              $ref: '#/components/schemas/Money'
          description: >-
            The quote’s refund, on `quote_drift`. When `retry_quote_id` is
            present, show this figure to the customer, then commit again with
            that handle and this figure.
        active_operation:
          type: string
          description: >-
            The operation already running on this booking, on
            `active_operation_exists`. Present when the running operation
            belongs to this booking and can be polled with the status route; it
            may be absent otherwise. Poll it with the status route for its
            domain — POST /v1/hotel_cancel_status or POST
            /v1/flight_refund_status.
          example: svc_01J7ZR5Q2KME8V4T
        shortfall:
          allOf:
            - $ref: '#/components/schemas/Money'
            - description: >-
                How much of the refund could not be reserved, on
                `funds_unavailable`. The refusal is about money still moving on
                the original payment, not about this booking, so this is the
                figure that says how much has to clear before a commit can
                succeed.
        blocking:
          type: array
          items:
            type: string
          description: >-
            What is holding that money, on `funds_unavailable`: the refunds
            already in flight against the same payment, which have to settle
            before this one can be reserved. Opaque handles — read them as
            identity, do not parse them. This is what to wait on; without it,
            "retry later" has nothing behind it.
          example:
            - re_3UBIxK2eZvKYlo2C
      required:
        - error
        - code
    BookingSelectionConflict:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - CONFLICT
            message:
              type: string
          required:
            - code
            - message
        code:
          type: string
          enum:
            - item_selection_required
        items:
          type: array
          items:
            $ref: '#/components/schemas/BookingItem'
      required:
        - error
        - code
        - items
      description: >-
        Several items match the requested domain. Choose a booked_item_id from
        items (the same safe projection as get_booking) and repeat the request
        with booking_ref and booked_item_id.
    IntentInput:
      type: object
      properties:
        user_intent:
          type: string
          nullable: true
          description: >-
            The user's natural-language intent: the Alpic PII-stripped
            paraphrase when available, else a best-effort fallback to the
            client-provided NL query.
          example: find a cheap flight to Tokyo
    ServicingSupportLevel:
      type: string
      enum:
        - AUTO
        - MANUAL_REQUIRED
      description: >-
        How this cancellation would be carried out. `AUTO` — the platform
        completes it end to end. `MANUAL_REQUIRED` — it is possible, but a Jinko
        agent has to act; expect a delay rather than an immediate result, and do
        not treat it as a failure; `manual_reason` says why. There is no
        "unsupported" level: a supplier that cannot be cancelled through the API
        arrives as `commitable: false` with `not_commitable_reason:
        provider_unsupported`, and a booking the supplier will not cancel as it
        stands arrives as a 409 `not_cancellable` — from the preview as well as
        the commit — with `error.message` “This booking cannot be cancelled
        online. Contact Jinko support.”
    MoneyValue:
      type: object
      properties:
        value:
          type: integer
          description: >-
            Integer amount in MINOR units at the ISO 4217 digits of `currency`:
            divide by 10 ** decimal_places to get the amount. Signed where the
            field says so (a price change delta).
          example: 41250
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          description: ISO 4217 currency code.
          example: USD
        decimal_places:
          type: integer
          description: >-
            The ISO 4217 digits of `currency` (2 for USD/EUR, 0 for JPY/KRW, 3
            for BHD/KWD), and the scale of `value`.
          example: 2
        display:
          type: string
          description: >-
            The same figure as a string ready to show: the ISO 4217 code, a
            space, then the amount at `decimal_places`, e.g. "USD 412.50". Show
            this; compute with `value`.
          example: USD 412.50
      required:
        - value
        - currency
        - decimal_places
        - display
      description: >-
        Money as every new field carries it: `value` is an INTEGER in minor
        units at the ISO 4217 digits of `currency` (`decimal_places`), and
        `display` is the same figure ready to show. All four members are always
        present; a figure the platform does not know is absent, never `{value:
        0}`. New integrations read the `*_money` fields (and `value` on the
        objects that carry it); the two-scale rule described on `Money` applies
        only to the deprecated fields.
    Money:
      type: object
      properties:
        amount:
          type: number
          description: >-
            Deprecated: use `value` instead (the same integer) where this object
            carries decimal_places. Where it does not, the figure is in MAJOR
            units and the field holding this object is itself deprecated: read
            its `*_money` sibling. The two-scale rule applies only to deprecated
            fields. Alternative to `value` on some endpoints (the two never
            appear together); its scale depends on decimal_places. When this
            object carries decimal_places, amount is an INTEGER in minor units —
            divide by 10 ** decimal_places (e.g. select_ancillaries
            total_with_ancillaries). When there is no decimal_places field,
            amount is a decimal in MAJOR units, safe to display as-is (e.g. trip
            and checkout totals).
          deprecated: true
        value:
          type: integer
          description: >-
            Integer amount in MINOR units, always paired with decimal_places —
            divide by 10 ** decimal_places to display. Example: value 15977 with
            decimal_places 2 is 159.77 USD. Rendering this field directly shows
            prices 100x too high for 2-decimal currencies.
          example: 41250
        currency:
          type: string
          description: ISO 4217 currency code.
          example: USD
        decimal_places:
          type: integer
          description: >-
            Scale of the integer value/amount: display = integer / 10 **
            decimal_places. Always sent alongside minor-unit amounts. Usually
            the ISO 4217 digits of the currency (2 for USD/EUR/GBP, 0 for
            JPY/KRW, 3 for BHD/JOD/KWD) but currency-converted prices can carry
            a different scale — ALWAYS use the decimal_places sent with the
            amount, never a hardcoded 2. Only if the field is genuinely absent
            on a value-shaped object, fall back to the ISO digits for the
            currency.
          example: 2
        display:
          type: string
          description: >-
            The same figure as a string ready to show: the ISO 4217 code, a
            space, then the amount, e.g. "USD 159.77". With decimal_places it is
            written at exactly that scale (value 1561500, JPY, decimal_places 2
            is "JPY 15615.00"); without, at the ISO digits of the currency. Show
            this; compute with the number. Absent when the figure is not money
            (a cancellation step expressed as a percent or a number of nights)
            or could not be read unambiguously.
          example: USD 412.50
      description: >-
        A money figure in one of two scales. New integrations read the `*_money`
        field beside it (a `MoneyValue`) where there is one, and `value` on
        objects that carry it; the rule below applies only to the deprecated
        forms. When `decimal_places` is present, `value` (or the deprecated
        `amount`) is an INTEGER in minor units: divide by 10 ** decimal_places.
        When it is absent, the deprecated `amount` is already in MAJOR units.
        Branch on whether decimal_places is present in the response you
        received, never on the currency code or the field name. `display` is the
        same figure as a string to show.
    ServicingConflictCode:
      type: string
      enum:
        - quote_drift
        - QUOTE_EXPIRED
        - active_operation_exists
        - not_cancellable
        - funds_unavailable
        - superseded
      description: >-
        Which refusal this is. `quote_drift` — your acknowledged figure differs
        from the still-live quote’s refund. `retry_quote_id` is that same
        quote’s handle and `current.refund` its figure. Show it to the customer,
        then commit again with that handle and figure. If the supplier’s policy
        moved since the quote, `quote_drift` has no `retry_quote_id`; preview
        again. `QUOTE_EXPIRED` — the quote stopped binding; take a fresh one.
        `active_operation_exists` — one cancellation is already running on this
        booking; poll `active_operation` when present instead of starting a
        second. `not_cancellable` — usually the supplier refuses to cancel this
        booking as it stands (already cancelled, never confirmed), with its
        reason in `error.message`. When `reason_code` is `already_cancelled`,
        Jinko already recorded a successful cancellation for this booking; this
        is not a supplier answer. The preview answers it too, so it is not a
        commit-only case. `booking_not_active` means the booking is no longer
        active; `error.message` is the platform’s sentence. `funds_unavailable`
        — the original payment cannot cover the refund yet; `shortfall` is how
        much is missing and `blocking` names the refunds that have to settle
        first. `superseded` — the item this quote named is no longer the live
        one with the supplier (an exchange moved it); preview again; there is no
        `retry_quote_id`. In every case NOTHING was cancelled.
    BookingItem:
      type: object
      properties:
        booked_item_id:
          type: string
          description: The item to name with `booked_item_id` on the next request.
          example: itm_aaaaaaaaaaaaafhuxsdxpbzrbfz5hm3a
        item_id:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: >-
            Deprecated: use `booked_item_id` instead. The booked item as an
            integer.
          example: 42
          deprecated: true
        domain:
          type: string
        summary:
          type: string
        status:
          type: string
          description: >-
            This item's state in Jinko's own booking and servicing flow. In
            progress: `pending`, `awaiting_payment`, `preparing`, `prepared`,
            `processing`, `confirming`. Final: `completed` (booked; for a
            flight, ticketed), `failed`, `cancelled` (nothing is booked any
            more: the checkout was never paid, or a cancellation succeeded),
            `expired_quote` (a quoted price, at checkout or for an exchange,
            expired before it was confirmed). Needing attention:
            `exchange_partial_failure`, `needs_review`. Treat the list as open:
            new values may be added. It changes only through Jinko's steps
            (payment, booking, ticketing, or a cancellation or exchange you
            request), never because an airline changed or cancelled a flight.
          example: completed
        booking_ref:
          type: string
          description: >-
            The Jinko booking reference of the booking this item belongs to,
            also after an exchange.
          example: JNK-A0AUR2
        booking_reference:
          type: string
          description: >-
            Deprecated: use `booking_ref` instead. The Jinko reference of the
            cart this item lives on: after an exchange, the exchange’s own
            reference.
          deprecated: true
        servicing:
          $ref: '#/components/schemas/BookingItemServicing'
      required:
        - item_id
        - domain
    BookingItemServicing:
      type: object
      properties:
        can_refund:
          type: boolean
        can_void:
          type: boolean
        can_exchange:
          type: boolean
        refund_support_level:
          type: string
          enum:
            - AUTO
            - MANUAL_REQUIRED
            - UNSUPPORTED
        exchange_support_level:
          type: string
          enum:
            - AUTO
            - MANUAL_REQUIRED
            - UNSUPPORTED
        refund_unavailable_reason:
          type: string
        exchange_unavailable_reason:
          type: string
        refund_reason_code:
          type: string
        exchange_reason_code:
          type: string
        reason_code:
          type: string
        support_level:
          type: string
          enum:
            - AUTO
            - MANUAL_REQUIRED
            - UNSUPPORTED
      required:
        - can_refund
        - can_void
        - can_exchange
      description: >-
        Eligibility of this booked item and its current product. Read the live
        refund or exchange check before committing; eligibility can change with
        time.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.