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

> Check how a hotel cancellation ended

Report where one cancellation has got to, named by the `operation` handle a commit (or POST /v1/hotel\_cancel) returned. Read-only. `state` is the platform view, keep polling while it is `in_progress` or `attention_required`, both of which mean the operation is still alive. `provider` is what the supplier says about the booking and `money` is where the refund itself has got to; the two move independently, so a booking can read `cancelled` while the money is still in flight. Do not tell a customer they have been refunded until `money.vehicle_state` says `paid`. Same auth modes as hotel\_cancel\_preview.


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/hotel_cancel_status
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_status:
    post:
      tags:
        - Post-booking
      summary: Check how a hotel cancellation ended
      description: >-
        Report where one cancellation has got to, named by the `operation`
        handle a commit (or POST /v1/hotel_cancel) returned. Read-only. `state`
        is the platform view — keep polling while it is `in_progress` or
        `attention_required`, both of which mean the operation is still alive.
        `provider` is what the supplier says about the booking and `money` is
        where the refund itself has got to; the two move independently, so a
        booking can read `cancelled` while the money is still in flight. Do not
        tell a customer they have been refunded until `money.vehicle_state` says
        `paid`. Same auth modes as hotel_cancel_preview.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HotelCancelStatusRequest'
      responses:
        '200':
          description: Where the cancellation has got to
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HotelCancelStatusResponse'
        '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 operation or 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: >-
            Several booked items match. Select a booked_item_id from items and
            repeat with booking_ref and booked_item_id.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/BookingSelectionConflict'
        '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:
    HotelCancelStatusRequest:
      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'
        operation:
          type: string
          description: The "svc_…" handle from a commit, or from POST /v1/hotel_cancel.
          example: svc_01J7ZR5Q2KME8V4T
      required:
        - operation
      example:
        booking_ref: JNK-H1ZK90
        last_name: Doe
        operation: svc_01J7ZR5Q2KME8V4T
    HotelCancelStatusResponse:
      type: object
      properties:
        operation:
          type: string
          example: svc_01J7ZR5Q2KME8V4T
        state:
          $ref: '#/components/schemas/ServicingState'
        reason:
          type: string
          description: >-
            With `state: attention_required`, why the operation is stalled: the
            value names what Jinko has to resolve, and needs nothing from the
            caller. With `state: failed`, why it ended: `provider_refused` (the
            supplier refused before changing anything), `provider_did_not_apply`
            (the supplier’s record shows it was not applied), `not_sent` (it
            ended before anything was sent to the supplier), `QUOTE_EXPIRED`
            (the quote it was committed on no longer stood), `superseded` or
            `not_cancellable`. Absent on a failed operation that recorded none.
          example: settlement_review
        message:
          type: string
          description: >-
            A sentence about why a failed operation ended, where there is one:
            what the supplier’s refusal means, or that its price changed after
            the quote. Present only with `state: failed`; it never states the
            supplier’s figures.
          example: the fare rules do not allow a refund of this ticket
        park_deadline:
          type: string
          description: >-
            When a parked operation stops waiting for Jinko and is settled or
            failed. Present with `state: attention_required`; it is how long
            "keep polling" lasts.
          example: '2026-09-10T12:15:00Z'
        next_run_at:
          type: string
          description: >-
            When the platform next drives this operation by itself.
            Informational — polling sooner does not make it run sooner.
          example: '2026-09-03T12:20:00Z'
        provider:
          type: object
          properties:
            state:
              type: string
              description: >-
                The supplier's own view of the booking: `confirmed` (still
                standing), `cancelled`, or `pending` (the supplier has not
                settled it yet).
              example: cancelled
            references:
              type: object
              properties:
                cancellation_reference:
                  type: string
                  description: >-
                    The reference the supplier issued for the cancellation or
                    refund itself, for example the ticket number a void settles
                    or the supplier’s refund id. It is never the supplier’s
                    identifier for the booking, and is absent when the supplier
                    issued none.
                  example: cxl_2f90a1c3
          description: >-
            The supplier's record. It can say `cancelled` while the money is
            still moving — that is the normal middle of a cancellation, not a
            discrepancy.
        money:
          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 figure being moved.
            direction:
              type: string
              description: Which way the money moves. `refund` on a cancellation.
              example: refund
            vehicle_state:
              type: string
              description: >-
                How far the money itself has got, independently of the supplier:
                `reserved` (earmarked, nothing sent), `refund_pending`
                (submitted to the payment provider), `payout_initiated` and
                `payout_settled` (paid out to a third party), `paid` (it has
                reached the customer), `released` (earmark dropped, nothing
                owed), `refund_review` (a person at Jinko has to release it).
                Only `paid` and `payout_settled` mean the customer has the
                money.
              example: paid
            stripe_reference:
              type: string
              description: Deprecated. An internal payment reference.
              example: re_3UBIxK2eZvKYlo2C
              deprecated: true
          description: >-
            The refund and where it has got to. Read `vehicle_state` before
            telling a customer they have been refunded.
    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
    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
    ServicingState:
      type: string
      enum:
        - in_progress
        - attention_required
        - succeeded
        - failed
      description: >-
        Where the cancellation has got to. `in_progress` — running; keep
        polling. `attention_required` — stalled on something a person at Jinko
        has to resolve (`reason` names it); keep polling, and do not report it
        to the customer as a failure, because the booking may already be
        cancelled at the supplier. `succeeded` and `failed` are terminal: the
        supplier outcome and the money are both settled and nothing further will
        change.
    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.
    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.