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

# flight-refund-status

> Check how a flight refund or void ended

Report where one refund or void has got to, named by the `operation` handle a commit (or POST /v1/refund\_commit) 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; `attention_required` means a Jinko agent has it, and `park_deadline` says how long that lasts. `operation_kind` says which operation actually ran. `provider` is what the airline says, including what became of each ticket and EMD, an operation has done its work when every document it covers has reached a terminal state. `money` is where the refund itself has got to; the two move independently, so the tickets can read refunded 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 flight\_refund\_preview.


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/flight_refund_status
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.8.1
  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. WorkOS-shaped values (prefixed `user_` or `org_`) are rejected.
servers: []
security: []
paths:
  /v1/flight_refund_status:
    post:
      tags:
        - Post-booking
      summary: Check how a flight refund or void ended
      description: >-
        Report where one refund or void has got to, named by the `operation`
        handle a commit (or POST /v1/refund_commit) 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;
        `attention_required` means a Jinko agent has it, and `park_deadline`
        says how long that lasts. `operation_kind` says which operation actually
        ran. `provider` is what the airline says, including what became of each
        ticket and EMD — an operation has done its work when every document it
        covers has reached a terminal state. `money` is where the refund itself
        has got to; the two move independently, so the tickets can read refunded
        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 flight_refund_preview.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlightRefundStatusRequest'
      responses:
        '200':
          description: Where the refund or void has got to
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlightRefundStatusResponse'
        '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/api-reference/authentication
        '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: The operation conflicts with the current state of the resource
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: CONFLICT
                  message: an exchange is already in progress for this booking
                  doc_url: https://docs.gojinko.com/concepts/errors
        '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: >-
                    origins: origins is required; trip_type: trip_type is
                    required
                  doc_url: https://docs.gojinko.com/concepts/errors
        '429':
          description: Rate limit or quota exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: RATE_LIMITED
                  message: Rate limit or quota exceeded.
                  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: >-
                    sabre-rest BargainFinderMaxRQ failed with status 400: 27131
                    - Number of connection locations exceeds maximum allowed
                  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, forwarded verbatim from the
                upstream service. Absent when the upstream named no interval.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_UNAVAILABLE
                  message: >-
                    All flight providers are temporarily unable to serve this
                    search. Please retry later. Provider reasons: sabre-rest:
                    provider temporarily closed; travelfusion: quota exhausted
                  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: sabre-rest BargainFinderMaxRQ timed out after 30s
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    FlightRefundStatusRequest:
      type: object
      properties:
        provider_reference:
          type: string
          description: >-
            The CONNECTOR's own order id for this flight booking — the Sabre PNR
            for a Sabre booking, the TravelFusion booking reference for a
            TravelFusion one. NOT the airline record locator, which names the
            carrier's own copy of the reservation and is answered 404 here,
            identically to an unknown booking. OWNER mode: beyond the API
            authentication every call needs, this one requires a credential that
            OWNS the booking — a tenant-bound key reaches its whole tenant, any
            other credential must belong to the booking's own user. Mutually
            exclusive with booking_ref + last_name; sending both is rejected
            with 422.
          example: QQIUIQ
        booking_ref:
          type: string
          description: >-
            The Jinko reference. GUEST mode: pair it with last_name and the pair
            identifies the booking on its own — API authentication is still
            required, as on every call here, but the credential does not have to
            own the booking. Mutually exclusive with provider_reference; one
            without the other is rejected with 422.
          example: JNK-H1ZK90
        last_name:
          type: string
          description: >-
            The lead traveller's surname. Required with booking_ref, and only
            with it.
          example: Carrard
        intent:
          $ref: '#/components/schemas/IntentInput'
        operation:
          type: string
          description: The "svc_…" handle from a commit, or from POST /v1/refund_commit.
          example: svc_01J7ZR5Q2KME8V4T
      required:
        - operation
      example:
        booking_ref: JNK-A0AUR2
        last_name: Carrard
        operation: svc_01J7ZR5Q2KME8V4T
    FlightRefundStatusResponse:
      type: object
      properties:
        operation:
          type: string
          example: svc_01J7ZR5Q2KME8V4T
        state:
          $ref: '#/components/schemas/ServicingState'
        reason:
          type: string
          description: >-
            Why the operation is stalled. Present with `state:
            attention_required`; the value names what Jinko has to resolve, and
            needs nothing from the caller.
          example: settlement_review
        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
            provider_status:
              type: string
              description: >-
                The supplier's own raw status word, verbatim and unmapped.
                Diagnostic: read `state` to branch on, this to explain what the
                supplier actually said.
              example: CANCELLED_WITH_CHARGES
            references:
              type: object
              properties:
                booking_id:
                  type: string
                  example: eRR9inUfI
                cancellation_reference:
                  type: string
                  description: >-
                    The reference the supplier issued for the cancellation or
                    refund itself, once it has issued one.
                  example: cxl_2f90a1c3
            documents:
              type: array
              items:
                $ref: '#/components/schemas/FlightDocument'
              description: >-
                What each document the operation covers was last observed to be.
                Absent until the first probe. This is the proof of what
                happened: an operation has done its work when every document it
                covers has reached a terminal state, not when a refund record
                appears.
          description: >-
            The airline's record. It can show the tickets refunded while the
            money is still moving — that is the normal middle of a refund, not a
            discrepancy.
        money:
          type: object
          properties:
            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
            amount:
              type: number
              description: >-
                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).
            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
            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: The payment provider's own refund id, once one exists.
              example: re_3UBIxK2eZvKYlo2C
          description: >-
            The refund and where it has got to. Read `vehicle_state` before
            telling a customer they have been refunded.
        operation_kind:
          allOf:
            - $ref: '#/components/schemas/FlightOperationKind'
            - description: >-
                Which operation ran — a refund under the fare rules (`cancel`)
                or a void of the original charge (`void`). The same field the
                preview quoted, so what was quoted and what ran compare
                directly.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - AUTH_REQUIRED
                - PAYMENT_REQUIRED
                - RATE_LIMITED
                - BAD_REQUEST
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - GONE
                - QUOTE_EXPIRED
                - TRIP_EXPIRED
                - TRIP_STATE_CONFLICT
                - OFFER_EXPIRED
                - OFFER_UNAVAILABLE
                - MISSING_CUSTOMER_DETAILS
                - CURRENCY_UNSUPPORTED
                - 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
            doc_url:
              type: string
          required:
            - code
            - message
      required:
        - error
    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.
    FlightDocument:
      type: object
      properties:
        number:
          type: string
          description: The 13-digit ticket or EMD number.
          example: '0012345678901'
        type:
          type: string
          enum:
            - TKT
            - EMD
          description: >-
            What the document is. `TKT` — the flight ticket itself. `EMD` — an
            electronic miscellaneous document, which is how an ancillary (a bag,
            a seat) is issued.
        state:
          type: string
          enum:
            - ACTIVE
            - REFUNDED
            - VOIDED
            - INACTIVE
            - PENDING
            - UNKNOWN
          description: >-
            Where the document itself has got to. Every document on a preview is
            `ACTIVE` — that is what makes the quote possible. On a status read
            the values are the outcome per document: `REFUNDED`, `VOIDED`,
            `INACTIVE` (the airline dropped it), `PENDING` (the airline has not
            settled it) or `UNKNOWN` (not yet observed).
          example: ACTIVE
        recoverable:
          type: boolean
          description: >-
            Whether this document’s value can be recovered through this path.
            `false` on every EMD: the platform has no EMD refund or void
            operation, so an ancillary issued as one is not returned by this
            operation and a person has to recover it.
          example: false
    FlightOperationKind:
      type: string
      enum:
        - cancel
        - void
      description: >-
        What the platform would do, or did. `cancel` — refund the ticket under
        the fare rules, less the penalty. `void` — the ticket is inside its void
        window, so it is voided and the original charge is reversed in full,
        penalty-free. The platform decides from the live state of the documents;
        the caller cannot ask for one.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````