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

# car-cancel-preview

> Preview the cost of cancelling a car rental booking

Quote what cancelling would cost right now: the fee in force and the refund it would leave. Nothing is cancelled. `fee_known: false` means the fee could not be established, render it as "we will confirm the fee", never as free cancellation. The returned `quote_id` is required by car\_cancel\_commit, and binds until `expires_at` where one is given. `cancellable: false` with `manual_required: true` means the cancellation cannot be completed online (fee unknown, rental changed after payment, fee in another currency or above the rental) and `refund_review_reason` says why: it is not a dead end, once the customer agrees, commit it with `manual_ok: true` and a Jinko agent completes it. `cancellable: false` without that flag is a rental that cannot be cancelled at all (already cancelled, or over), carrying the cancellation that stands where there is one. Guest-authenticated: booking\_ref + last\_name; a wrong pair returns 404 rather than confirming the booking's existence.


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/car_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/car_cancel_preview:
    post:
      tags:
        - Cars
      summary: Preview the cost of cancelling a car rental booking
      description: >-
        Quote what cancelling would cost right now: the fee in force and the
        refund it would leave. Nothing is cancelled. `fee_known: false` means
        the fee could not be established — render it as "we will confirm the
        fee", never as free cancellation. The returned `quote_id` is required by
        car_cancel_commit, and binds until `expires_at` where one is given.
        `cancellable: false` with `manual_required: true` means the cancellation
        cannot be completed online (fee unknown, rental changed after payment,
        fee in another currency or above the rental) and `refund_review_reason`
        says why: it is not a dead end — once the customer agrees, commit it
        with `manual_ok: true` and a Jinko agent completes it. `cancellable:
        false` without that flag is a rental that cannot be cancelled at all
        (already cancelled, or over), carrying the cancellation that stands
        where there is one. Guest-authenticated: booking_ref + last_name; a
        wrong pair returns 404 rather than confirming the booking's existence.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CarCancelPreviewRequest'
      responses:
        '200':
          description: Cancellation quote
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CarCancelPreviewResponse'
        '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_ref + last_name pair.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: booking not found
        '409':
          description: >-
            An exchange or another cancellation is already in flight for this
            rental, so no quote can be given: `code` is
            `active_operation_exists`, as a sibling of `error`, and
            `active_operation` names the cancellation running where it is one.
            Wait for it to finish (car_cancel_status) and preview again. 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/CarServicingConflictResponse'
                  - $ref: '#/components/schemas/BookingSelectionConflict'
              example:
                error:
                  code: CONFLICT
                  message: >-
                    an exchange is in progress for this rental; wait for it to
                    finish before cancelling
                code: active_operation_exists
        '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:
    CarCancelPreviewRequest:
      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
        intent:
          $ref: '#/components/schemas/IntentInput'
      required:
        - booking_ref
      example:
        booking_ref: JNK-8PT9VS
        last_name: Doe
    CarCancelPreviewResponse:
      type: object
      properties:
        quote_id:
          type: string
          description: >-
            This preview’s quote. Pass it as `quote_id` to car_cancel_commit —
            it binds the commit to the fee quoted here. Treat as an opaque
            string; the format may evolve.
          example: ccl_2f7c9a4e8b1d4c6f9e3a5b7d1c2e4f6a
        cancellation_id:
          type: string
          description: 'Deprecated: use `quote_id` instead. Same value.'
          example: ccl_2f7c9a4e8b1d4c6f9e3a5b7d1c2e4f6a
          deprecated: true
        cancellable:
          type: boolean
          example: true
        fee_known:
          type: boolean
          description: >-
            false means the fee could not be established — UNKNOWN, not free.
            Render as "we will confirm the fee".
          example: true
        fee_type:
          type: string
          example: cancellation
        fee:
          $ref: '#/components/schemas/CarAmount'
        paid:
          allOf:
            - $ref: '#/components/schemas/CarAmount'
            - description: What the customer originally paid.
        refund_amount:
          allOf:
            - $ref: '#/components/schemas/CarAmount'
            - description: >-
                paid minus fee. Absent whenever the fee is unknown — absent is
                not zero.
        currency:
          type: string
          example: EUR
        non_refundable:
          type: boolean
        refund_pending_review:
          type: boolean
          description: >-
            true means the refund figure is right but will be issued by hand
            rather than automatically (the rental was changed after it was paid
            for). The cancellation itself still goes through online; not a
            failure.
        refund_review_reason:
          type: string
          description: >-
            Why a person is involved, whenever `manual_required` or
            `refund_pending_review` is true, in words the customer can be shown.
            Where the reason would be the supplier’s own words — as on a
            `cancellable: false` preview of a rental that cannot be cancelled at
            all — it reads “This request needs manual handling by Jinko
            support.”
          example: >-
            the cancellation fee for this rental could not be established; a
            person will complete the cancellation
        manual_required:
          type: boolean
          description: >-
            true means this cancellation cannot be completed online — the fee
            could not be established, the rental was changed after it was paid
            for, or the fee is in another currency or above the rental.
            `cancellable` is false, no refund figure is given and
            `refund_review_reason` says why. It is not a dead end:
            car_cancel_commit takes this `cancellation_id` with `manual_ok:
            true`, which records the cancellation for a Jinko agent to complete
            and answers `state: pending` with `refund_pending_review: true`.
            Without the flag such a commit is refused 409 `manual_required`, so
            a customer is never put in an agent queue unasked. Absent (or false)
            on every quote that can be committed online.
          example: false
        expires_at:
          type: string
          description: >-
            When this preview stops being committable (RFC 3339). A commit after
            it is refused 409 `QUOTE_EXPIRED`; preview again. Absent where the
            quote carries no deadline.
          example: '2026-09-21T10:15:00Z'
    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
    CarServicingConflictResponse:
      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/CarServicingConflictCode'
        retry_quote_id:
          type: string
          description: >-
            A fresh `quote_id`, on `quote_drift`. Show the customer the figure
            in `current.refund`, then commit against this `quote_id` as you
            would one from car_cancel_preview.
          example: ccl_01J8AB4N7GLY3Q0DXK2M5R9VWT
        requote:
          type: string
          description: 'Deprecated: use `retry_quote_id` instead. Same value.'
          example: ccl_01J8AB4N7GLY3Q0DXK2M5R9VWT
          deprecated: true
        current:
          type: object
          properties:
            refund:
              $ref: '#/components/schemas/CarAmount'
          description: >-
            The refund as it stands now, on `quote_drift`: what the customer
            gets if they accept the fresh preview.
        active_operation:
          type: string
          description: >-
            The cancellation already running on this rental, on
            `active_operation_exists`. Follow it with car_cancel_status.
          example: ccl_01J7ZR5Q2KME8V4TBN3P8XD6WQ
        shortfall:
          allOf:
            - $ref: '#/components/schemas/CarAmount'
            - description: >-
                How much of the refund could not be reserved, on
                `funds_unavailable` — money still moving on the original
                payment, not a fact about this rental.
        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 settle before this
            one can be reserved. Opaque handles — identity only.
          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
    CarAmount:
      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
        currency:
          type: string
          description: ISO 4217 currency code.
          example: EUR
        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: EUR 412.50
    CarServicingConflictCode:
      type: string
      enum:
        - quote_drift
        - QUOTE_EXPIRED
        - active_operation_exists
        - not_cancellable
        - funds_unavailable
        - manual_required
      description: >-
        Which refusal this is. `manual_required` — the preview said
        `manual_required: true` (fee unknown, rental changed after payment, fee
        in another currency or above the rental) and the commit did not carry
        `manual_ok: true`; resend the same commit with it, once the customer
        agrees, to hand the cancellation to a Jinko agent. `quote_drift` — the
        refund moved since the preview (the fee tier changed as pick-up drew
        nearer); `retry_quote_id` is a fresh preview reference and
        `current.refund` the figure now — show it to the customer and commit
        against `retry_quote_id`. `QUOTE_EXPIRED` — the preview stopped binding
        (`expires_at`); preview again. `active_operation_exists` — an exchange
        or another cancellation is in flight for this rental; wait for it to
        finish (car_cancel_status) rather than starting a second.
        `not_cancellable` — the rental can no longer be cancelled as it stands
        (already cancelled since the preview, or over); `error.message` carries
        the reason, and car_cancel_status reports the cancellation that stands.
        `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. In every case NOTHING was cancelled and no money
        moved.
    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.