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

# trip

> Create and manage a trip: add or remove items and set travelers

Assemble and edit a trip before sending it to checkout. Use it to add a flight, hotel, or car rental offer, set traveler details, swap one item for another, or attach ancillaries like bags and seats. Flights, hotels, and rental cars can sit side by side in the same trip and settle through a single checkout. A trip with a car item also needs `contact.title` (the honorific, for example `mr` or `ms`) before checkout.

Unified trip management endpoint. In a single call you can `add_item` (by `trip_item_token`), `remove_item` (by `item_id`), and `upsert_travelers` (travelers + contact). Omit `trip_id` to create a new trip; include it to update an existing one. Returns the resulting trip state.

**Creating or editing a trip does not start pricing.** A new item has no `price` until pricing succeeds. Call [checkout](https://docs.gojinko.com/api/checkout.md) to start pricing and wait for its result. Polling `GET /v1/trip/{trip_id}` after creation does not initiate a quote. A missing price means unpriced, never free.

Ancillaries are selected on a separate endpoint. See [select-ancillaries](https://docs.gojinko.com/api/select-ancillaries.md).

A trip lapses after 24 hours with no activity, and the offers and quote inside it expire sooner. See [Lifetimes and expiry](https://docs.gojinko.com/concepts/overview.md#lifetimes-and-expiry).


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/trip
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/trip:
    post:
      tags:
        - Pricing & booking
      summary: 'Create and manage a trip: add or remove items and set travelers'
      description: >-
        Creates or edits a trip without starting pricing. A new item has no
        price until it is successfully quoted. Call POST /v1/checkout to start
        pricing and wait for a checkout result. Polling GET /v1/trip/{trip_id}
        after creation does not start pricing.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TripRequest'
      responses:
        '200':
          description: The trip
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TripResponse'
        '400':
          description: >-
            The request was refused. Invalid traveller names at
            `upsert_travelers` are refused with `BAD_REQUEST` and `error.field`
            naming the traveller. **`BAD_REQUEST`** — The request was malformed
            or failed validation. Fix the request as the message describes;
            retrying it unchanged cannot succeed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '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: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: NOT_FOUND
                  message: Resource not found.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '409':
          description: >-
            The trip refused the write, and nothing was changed — `updated_at`
            is untouched. A flight whose segments overlap a flight already in
            the trip is refused with `CONFLICT`; the message names the item
            already there, which the traveller removes first to choose another
            fare or flight. **`TRIP_EXPIRED`** — The trip lapsed under a limit
            that no longer applies and accepts no more writes. Start a new trip
            and add the items again. A lapsed trip cannot be revived.
            **`TRIP_STATE_CONFLICT`** — The trip is in a state that refuses this
            operation: payment already started (`fulfilling`, `fulfilled`,
            `partially_fulfilled`), or it is `cancelled` or `failed`. Read
            `status` and act on it: read the trip to find the booking that
            already exists, or start a new trip. Nothing was written.
            **`CONFLICT`** — The resource's current state refuses the operation.
            Re-read the resource and act on what it says — never retry blindly.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/TripStateResponse'
                  - $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: TRIP_EXPIRED
                  message: This trip has expired and cannot be modified.
                  doc_url: https://docs.gojinko.com/concepts/errors
                status: expired
        '410':
          description: >-
            The offer named in the request is no longer available, or another
            resource the request names is gone. Tell the two apart by
            `error.code`. **`OFFER_EXPIRED`** — The search offer is no longer
            usable: its token expired, or the supplier rejected it as expired or
            missing during pricing and the same product could not be found
            again. No payable quote was established. Search again, replace the
            unavailable item using the latest search result, and check out
            promptly. Show that the flight offer is no longer available; do not
            describe this as an established quote expiring (QUOTE_EXPIRED).
            **`GONE`** — The resource this request names existed and no longer
            does. Re-acquire it — search again, or check out again to re-quote —
            then retry with the new identifier. Repeating this request with the
            same one cannot succeed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            The request failed validation. Tell the causes apart by
            `error.code`. **`BAD_REQUEST`** — The request was malformed or
            failed validation. Fix the request as the message describes;
            retrying it unchanged cannot succeed. **`INVALID_PHONE_NUMBER`** — A
            phone number is not in international format: it has no leading `+`
            and country code, is not a possible number, or carries an extension.
            Nothing was written. Resend the number with a leading `+` and
            country code, for example `+12025550147`. Spaces, hyphens, dots and
            parentheses are accepted and removed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: INVALID_PHONE_NUMBER
                  message: >-
                    phone number must be in international format with a leading
                    + and country code, for example +12025550147
                  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:
    TripRequest:
      type: object
      properties:
        trip_id:
          type: string
        add_item:
          type: object
          properties:
            trip_item_token:
              type: string
            special_requests:
              type: array
              items:
                type: string
                maxLength: 500
              maxItems: 10
              description: >-
                HOTEL ITEMS ONLY. Free-text special requests for the property,
                one per entry — late arrival, quiet room, high floor, bedding
                preference, non-smoking room, baby cot, accessibility needs.
                They apply to the whole stay and are forwarded to the hotel
                supplier with the booking as REQUESTS ONLY: neither Jinko nor
                the supplier guarantees them, and a confirmed booking does not
                mean the hotel will honour them. At most 10 entries of 500
                characters each and 1500 characters in total, counted after
                trimming; blank entries are dropped. Ignored on flight and
                ground items. Echoed back on the item as `special_requests`,
                trimmed and without the blank entries (JIN-2499).
              example:
                - Expected arrival around 11:30 PM.
                - A quiet room on a high floor, if available.
          required:
            - trip_item_token
        remove_item:
          type: object
          properties:
            item_id:
              type: string
          required:
            - item_id
        upsert_travelers:
          type: object
          properties:
            travelers:
              type: array
              items:
                $ref: '#/components/schemas/Traveler'
              description: >-
                Travelers on the trip (replaces all). Required to complete a
                booking; the first traveler also supplies the booking contact
                name.
            contact:
              $ref: '#/components/schemas/Contact'
          required:
            - travelers
        hotel_room_guests:
          $ref: '#/components/schemas/HotelRoomGuests'
        intent:
          $ref: '#/components/schemas/IntentInput'
      example:
        trip_id: trip_1048576
        add_item:
          trip_item_token: htl_2d67a7441c60e5de
          special_requests:
            - Expected arrival around 11:30 PM.
            - A quiet room on a high floor, if available.
    TripResponse:
      type: object
      properties:
        trip_id:
          type: string
          example: trip_1048576
        status:
          type: string
          enum:
            - draft
            - quoting
            - quoted
            - fulfillment_prepared
            - fulfilling
            - fulfilled
            - partially_fulfilled
            - failed
            - cancelled
            - expired
          description: >-
            Where the trip is in its lifecycle, as one value for the whole trip.
            The booking’s progress after payment is `booking_state` (GET
            /v1/trip/{trip_id}); the four booking values below (`fulfilling`,
            `fulfilled`, `partially_fulfilled`, `failed`) are deprecated in
            favour of it and still sent. `draft`: being built or priced, nothing
            paid. `fulfilling`: payment was submitted and booking started. Then
            exactly one outcome: `fulfilled` (`booking_state` `completed`),
            `partially_fulfilled` (`partial`) or `failed` (`failed`).
            `cancelled`: replaced by a new trip when it was re-shopped.
            `expired`: the trip lapsed under a limit that no longer applies. A
            trip left unpaid stays open, so no new trip reaches this state. On
            an expired trip, adding items, setting travelers and checkout are
            refused with `TRIP_EXPIRED`; any other state that refuses a write
            answers `TRIP_STATE_CONFLICT` and names the state here. Start a new
            trip — an expired one cannot be revived. `quoting`, `quoted` and
            `fulfillment_prepared` are reserved and not currently set; quote
            progress is in `quote.status`.
          example: draft
        actions_performed:
          type: array
          items:
            type: string
          example:
            - created
            - add_item
        items:
          type: array
          items:
            $ref: '#/components/schemas/TripResponseItem'
        travelers:
          type: array
          items:
            $ref: '#/components/schemas/TripTraveler'
        contact:
          type: object
          properties:
            email:
              type: string
            phone:
              type: string
            title:
              type: string
        hotel_room_guests:
          $ref: '#/components/schemas/HotelRoomGuests'
        totals:
          type: object
          properties:
            currency:
              type: string
              description: >-
                Deprecated: use `total_money` instead. ISO currency code of
                `total`.
              deprecated: true
            total:
              type: number
              description: >-
                Deprecated: use `total_money` instead. The trip total in major
                currency units. Absent on a mixed-currency trip.
              deprecated: true
            total_display:
              type: string
              description: >-
                Deprecated: use `total_money` instead. The trip total as a
                string ready to show, e.g. "USD 318.40". Absent with `total`.
              example: USD 318.40
              deprecated: true
            total_money:
              allOf:
                - $ref: '#/components/schemas/MoneyValue'
                - description: >-
                    The trip total. Absent when the trip holds items priced in
                    more than one currency, and while nothing is priced.
          example:
            currency: USD
            total: 318.4
      required:
        - trip_id
    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
    TripStateResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - TRIP_EXPIRED
                - TRIP_STATE_CONFLICT
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
        status:
          type: string
          enum:
            - draft
            - quoting
            - quoted
            - fulfillment_prepared
            - fulfilling
            - fulfilled
            - partially_fulfilled
            - failed
            - cancelled
            - expired
          description: >-
            The trip state that refused the write. `expired` on TRIP_EXPIRED; on
            TRIP_STATE_CONFLICT it is whichever state the trip is actually in.
            Nothing was changed, so re-reading the trip returns this same state.
          example: expired
      required:
        - error
    Traveler:
      type: object
      properties:
        first_name:
          type: string
          description: >-
            For flights, the airline must be able to print the name on the
            ticket: Latin letters (accents allowed), spaces, hyphens and
            apostrophes only. The last name holds at most 29 characters (the
            airline cannot ticket a longer surname), and first, middle and last
            name together at most 63. Two travellers in one trip cannot share
            the same full name. A name that breaks these rules is refused at
            upsert_travelers or checkout with 400 BAD_REQUEST and `error.field`
            naming the traveller.
        last_name:
          type: string
          description: >-
            For flights, the airline must be able to print the name on the
            ticket: Latin letters (accents allowed), spaces, hyphens and
            apostrophes only. The last name holds at most 29 characters (the
            airline cannot ticket a longer surname), and first, middle and last
            name together at most 63. Two travellers in one trip cannot share
            the same full name. A name that breaks these rules is refused at
            upsert_travelers or checkout with 400 BAD_REQUEST and `error.field`
            naming the traveller.
        date_of_birth:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: >-
            Date of birth (YYYY-MM-DD, nothing before or after it). Required for
            flights, and for a `child` or `infant` staying at a hotel; optional
            for an adult on a hotel-only trip. For flights it cannot be in the
            future and must agree with `traveler_type` on the trip's flight
            dates; otherwise upsert_travelers or checkout answers 400
            BAD_REQUEST with `error.field` naming the traveller and field.
        gender:
          type: string
          enum:
            - MALE
            - FEMALE
          description: >-
            Required for flights; optional for hotel-only trips. Accepted in
            either case (`male` reads as `MALE`).
        traveler_type:
          type: string
          enum:
            - adult
            - child
            - infant
          description: >-
            Accepted in either case (`Adult` reads as `adult`). For flights, the
            traveller's age on the date the booking ages travellers on decides
            the type — the trip's first flight, or for some bookings the return
            flight of a round trip: `adult` 12 or older, `child` 2 to 11,
            `infant` under 2, and an `infant` must still be under 2 on the
            trip's last flight. A type the `date_of_birth` contradicts is
            refused at upsert_travelers (once the trip holds the flight) or at
            checkout with 400 BAD_REQUEST and `error.field` naming the
            traveller. A flight searched for another party is re-priced for
            these travellers at checkout, on the same flights and fare family;
            when that fare is not sold for them, checkout answers 409
            `OFFER_UNAVAILABLE`. Each hotel in the trip is booked with these
            travellers (a `room_bundle` hotel whose rooms `hotel_room_guests`
            names is booked for those room guests instead), so they cannot name
            more adults or more children than its rooms were priced for (the
            hotel_search `occupancies`: `adults` and `children_ages`), and each
            child's age at check-in must be one of the priced `children_ages`.
            The hotel counts a traveller by age at check-in, 18 or older being
            an adult, and a traveller with no `date_of_birth` as an adult.
            upsert_travelers or checkout answers 400 BAD_REQUEST naming the
            first traveller over a count or with an age the room was not priced
            for; search the hotel again for the party.
        nationality:
          type: string
        passport_number:
          type: string
        passport_expiry:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          description: >-
            Passport expiry (YYYY-MM-DD, nothing before or after it). For
            flights it cannot be before the trip's last flight; otherwise
            upsert_travelers or checkout answers 400 BAD_REQUEST with
            `error.field` naming the traveller.
        passport_country:
          type: string
        frequent_flyer:
          $ref: '#/components/schemas/FrequentFlyer'
        known_traveler_number:
          type: string
          description: >-
            US trusted-traveler Known Traveler Number (TSA PreCheck / Global
            Entry). Flights only; sent to the airline as Secure Flight data so
            PreCheck eligibility prints on the boarding pass.
          example: '998765432'
        known_traveler_issuing_country:
          type: string
          description: >-
            ISO 3166-1 alpha-2 country that issued the Known Traveler Number.
            Defaults to `US` downstream; ignored without known_traveler_number.
          example: US
        redress_number:
          type: string
          description: >-
            DHS redress control number (TRIP program). Flights only; sent to the
            airline as Secure Flight data.
          example: '1234567'
        redress_issuing_country:
          type: string
          description: >-
            ISO 3166-1 alpha-2 country that issued the redress number. Defaults
            to `US` downstream; ignored without redress_number.
          example: US
      required:
        - first_name
        - last_name
        - traveler_type
    Contact:
      type: object
      properties:
        email:
          type: string
          format: email
          description: >-
            Contact email for booking confirmations. A trip with a flight needs
            it before payment: without a contact email, checkout answers 422
            `MISSING_CUSTOMER_DETAILS` with `email` in `missing_fields`.
        phone:
          type: string
          description: >-
            Contact phone in international format: a leading `+` and country
            code, e.g. `+12025550147`. Spaces, hyphens, dots and parentheses are
            accepted and removed. A number without the leading `+` is rejected
            with `INVALID_PHONE_NUMBER`. Required to complete a booking.
          example: '+12025550147'
        title:
          type: string
          description: >-
            Honorific of the booking contact (e.g. "mr", "ms", "mx"). Free text,
            resolved downstream per provider. Required to book a car rental;
            optional otherwise.
          example: mr
        flight_number:
          type: string
          description: >-
            The driver's arriving flight for a CAR rental, as an IATA flight
            designator: a two- or three-character airline code then 1 to 4
            digits and an optional letter (`BA472`, `AF1234`, `RUS1727`). Spaces
            and hyphens are accepted and removed; a value that is not a
            designator is rejected with `INVALID_FLIGHT_NUMBER`. Always optional
            — a car offer's `pick_up.requires_flight_number` says whether the
            rental desk asks for one, and a quote lists `flight_number` in that
            item's required details, but no branch policy blocks checkout
            without it. Supply it when you have it: the rental company can then
            hold the car for a delayed flight. Ignored by flights, hotels and
            ground.
          example: BA472
      required:
        - email
        - phone
      description: >-
        Booking contact (email + phone, optionally title). Optional while
        building the trip, but required before booking.
    HotelRoomGuests:
      type: object
      additionalProperties:
        type: array
        items:
          $ref: '#/components/schemas/HotelRoomPrimaryGuest'
        minItems: 1
      description: >-
        Optional primary adult room-contact overrides keyed by the returned
        hotel item_id/product_id. Each product array is non-empty and
        occupancy_number values are unique positive room slots; omitted slots
        use persisted adult travelers in order with the trip contact email. The
        trip must already exist because the keys refer to its items.
    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
    TripResponseItem:
      type: object
      properties:
        collector:
          type: string
          enum:
            - jinko
            - supplier
          description: >-
            Who charges the card: Jinko (merchant of record) or the supplier
            (channel mode).
        item_id:
          type: string
          example: itm_4b91c2
        kind:
          type: string
          description: >-
            What the item is: "flight", "hotel", "car" or "ground". Same field
            name as on get_trip and checkout.
          example: flight
        type:
          type: string
          description: 'Deprecated: use `kind` (same value).'
          deprecated: true
          example: flight
        description:
          type: string
          description: A summary of the selected item.
        offer_id:
          type: string
          description: >-
            Deprecated: use `trip_item_token` instead. The offer handle this
            item was created from, exactly as it was submitted to
            `trip(add_item)`. On a hotel item it is the `htl_…` rate token; on a
            flight item it is the `offer_id` of the search result the token came
            from. One caveat when reconciling: on a hotel whose occupancy the
            provider re-shopped, this stays the token you SUBMITTED even though
            the priced rate moved. A trip never holds two flights the same
            travellers cannot both take: adding a flight whose segments overlap
            a flight already in the trip, another fare of the same flights
            included, is refused with 409 naming the item already there.
          example: htl_2d67a7441c60e5de
          deprecated: true
        trip_item_token:
          type: string
          description: >-
            The handle `trip(add_item)` took, echoed verbatim. On a hotel or car
            item it is the offer’s `trip_item_token` from the search. On a
            flight item it is the itinerary id and the fare joined by a colon,
            absent when the fare half was never resolved (a caller-supplied
            snapshot skips the resolver); read that absence as "the platform
            cannot name the fare", never as a different fare.
          example: of_9c1d2e:FARE_ABC
        hotel_id:
          type: string
          description: >-
            The property this hotel item books — the same id `hotel_search`
            publishes, so an item joins straight back to the search result it
            came from. Hotel items only.
          example: lp1f2c3
        special_requests:
          type: array
          items:
            type: string
          description: >-
            The special requests submitted with `trip(add_item)` for this hotel
            item, as stored — trimmed, blank entries dropped — and forwarded to
            the hotel supplier at booking. Requests only — the hotel may not
            honour them, and a confirmed booking does not imply it will. Hotel
            items only; absent when none were given (JIN-2499).
        booking_scope:
          type: string
          description: >-
            `room_bundle` means the submitted hotel offer token covers every
            room in `rooms`. Absent on every other hotel item, a single room
            included: read `rooms` for the rooms an item covers, and
            `booking_scope` only to learn whether one token books them all.
          example: room_bundle
        num_rooms:
          type: integer
          minimum: 1
          description: >-
            Number of rooms this hotel item covers: 1 for a single room, the
            bundle size for a room bundle. Hotel items only; absent when the
            platform cannot state the party the item was priced for.
          example: 1
        rooms:
          type: array
          items:
            $ref: '#/components/schemas/HotelBundleRoom'
          description: >-
            One entry per room this hotel item covers, single room or bundle
            (JIN-2565). Each entry states in `occupancy` the party that room was
            priced for — adults and children’s ages — so a checkout page can
            show the guest who the rate is for before payment, and a wrong child
            age, which changes the price and the room, is caught before the
            money moves. On a single room the entry’s room, board, refundability
            and tax lines are the item’s own, the same figures `hotel_terms`
            states; on a room bundle each entry carries that room’s details from
            the supplier. The item price remains the authoritative customer
            total for every room together. Absent when the platform holds no
            party for the item.
        price:
          type: number
          description: >-
            Deprecated: use `price_money` instead. Item total as a number in
            major currency units, with currency in the separate `currency`
            field. Absent until pricing is available; absence does not mean
            free.
          example: 545.55
          deprecated: true
        currency:
          type: string
          description: >-
            Deprecated: use `price_money` instead. ISO currency code for the
            item price. Absent until pricing is available.
          example: EUR
          deprecated: true
        price_display:
          type: string
          description: >-
            Deprecated: use `price_money` instead. The item price as a string
            ready to show, when X-Money-Display: iso is requested.
          example: EUR 545.55
          deprecated: true
        price_money:
          allOf:
            - $ref: '#/components/schemas/MoneyValue'
            - description: >-
                Item total. Absent until pricing is available; absence does not
                mean free.
    TripTraveler:
      type: object
      properties:
        traveler_ref:
          type: string
          description: >-
            The reference to send as `traveler_ref` when selecting a
            per-traveler ancillary: `pax_<N>`, the traveler's 1-based position
            in `travelers`.
          example: pax_1
        pax_ref_id:
          type: string
          description: 'Deprecated: use `traveler_ref` instead. Same value.'
          example: pax_1
          deprecated: true
        first_name:
          type: string
          example: John
        last_name:
          type: string
          example: Doe
        date_of_birth:
          type: string
          example: '1990-01-15'
        gender:
          type: string
          example: MALE
        traveler_type:
          type: string
          enum:
            - adult
            - child
            - infant
          example: adult
        passenger_type:
          type: string
          description: 'Deprecated: use `traveler_type` instead. The same type in uppercase.'
          example: ADULT
          deprecated: true
        identity_documents:
          type: object
          properties:
            passport:
              $ref: '#/components/schemas/TripIdentityDocument'
            known_traveler_number:
              $ref: '#/components/schemas/TripIdentityDocument'
            redress_number:
              $ref: '#/components/schemas/TripIdentityDocument'
          required:
            - passport
            - known_traveler_number
            - redress_number
          description: >-
            Whether each travel document sent on `upsert_travelers` was saved
            and will be sent with a flight booking. The passport, Known Traveler
            and redress numbers themselves are not returned. `upsert_travelers`
            replaces the whole traveler list, so a document left out of a later
            upsert reads `absent`.
      description: >-
        A traveler stored on the trip. A `frequent_flyer` sent on write is
        echoed back alongside these when present; travel documents are reported
        in `identity_documents`, without their values.
    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.
    FrequentFlyer:
      type: object
      properties:
        airline:
          type: string
          description: >-
            IATA code of the loyalty program issuer (e.g. `LH` for Lufthansa
            Miles & More), not necessarily the operating carrier — alliances
            credit miles on partner flights.
          example: LH
        number:
          type: string
          description: Membership / account number for that loyalty program.
          example: '992100100'
      required:
        - airline
        - number
      description: >-
        Optional per-passenger frequent-flyer membership so airline miles are
        credited on the booking. Flights only; when present, both airline and
        number are required.
    HotelRoomPrimaryGuest:
      type: object
      properties:
        occupancy_number:
          type: integer
          minimum: 1
          description: Stable one-based room slot within the selected room bundle.
          example: 1
        first_name:
          type: string
        last_name:
          type: string
        email:
          type: string
          format: email
      required:
        - occupancy_number
        - first_name
        - last_name
        - email
      additionalProperties: false
    HotelBundleRoom:
      type: object
      properties:
        occupancy_number:
          type: integer
          minimum: 1
          description: Stable one-based room slot within this bundle.
          example: 1
        room_id:
          type: string
        mapped_room_id:
          type: integer
        room_name:
          type: string
          example: Superior Double
        rate_id:
          type: string
        occupancy:
          $ref: '#/components/schemas/Occupancy'
        board_type:
          type: string
          example: BB
        board_name:
          type: string
          example: Breakfast Included
        max_occupancy:
          type: integer
        taxes_and_fees:
          type: array
          items:
            $ref: '#/components/schemas/TaxLine'
        policies:
          type: array
          items:
            $ref: '#/components/schemas/HotelBundleRoomPolicy'
        is_refundable:
          type: boolean
        cancellation_policy:
          type: array
          items:
            $ref: '#/components/schemas/CancellationStep'
        free_cancellation_until:
          type: string
        payment_types:
          type: array
          items:
            $ref: '#/components/schemas/HotelPaymentType'
          description: How the rate can be settled. Each value appears at most once.
          example:
            - pay_now
        remarks:
          type: string
      required:
        - occupancy_number
        - occupancy
      description: >-
        One room of a hotel item — the single room a one-room item books, or one
        slot of a room-bundle rate — with the party it was priced for
        (`occupancy`) and its display and policy details. The containing item
        owns the customer-facing total; supplier net, suggested retail,
        commission and room-local supplier price figures are intentionally not
        part of this public shape.
    TripIdentityDocument:
      type: object
      properties:
        status:
          type: string
          description: >-
            `absent`: none of the document's fields were sent. `saved`: stored,
            and sent to the airline with the flight booking (this does not mean
            the airline accepted it). `invalid`: received, but it cannot be sent
            as is, so the booking goes ahead without it; `invalid_fields` names
            what to correct. More values may be added: treat one you do not know
            as not usable.
          example: saved
        invalid_fields:
          type: array
          items:
            type: string
          description: >-
            The missing or failing fields, by their `upsert_travelers` names.
            Sent only when `status` is `invalid`.
          example:
            - passport_expiry
      required:
        - status
    Occupancy:
      type: object
      properties:
        adults:
          type: integer
          minimum: 1
        children_ages:
          type: array
          items:
            type: integer
            minimum: 0
            maximum: 17
      required:
        - adults
      description: >-
        The party one room is requested or priced for: the number of adults and
        the age of each child.
    TaxLine:
      type: object
      properties:
        amount:
          type: number
          description: >-
            Deprecated: use `amount_money` instead. The tax in MAJOR units of
            `currency`.
          example: 164.49
          deprecated: true
        currency:
          type: string
          description: 'Deprecated: use `amount_money` instead. The currency of `amount`.'
          example: EUR
          deprecated: true
        amount_money:
          allOf:
            - $ref: '#/components/schemas/MoneyValue'
            - description: >-
                The tax. When the supplier named no currency for the line, it is
                the currency the rate is priced in.
        description:
          type: string
          description: The provider’s own wording for the tax. Free text, not a code.
          example: 19, VAT National taxes on accommodation
        included:
          type: boolean
          description: >-
            True when the amount is ALREADY inside `total_amount_money`; false
            when the guest pays it at the property on top. Getting this
            backwards misquotes the trip.
          example: 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: EUR 164.49
          deprecated: true
    HotelBundleRoomPolicy:
      type: object
      properties:
        type:
          type: string
        description:
          type: string
        fee_amount:
          type: number
          description: >-
            Deprecated: use `fee_amount_money` instead. Customer policy fee in
            MAJOR units of `fee_currency`.
          deprecated: true
        fee_currency:
          type: string
          description: >-
            Deprecated: use `fee_amount_money` instead. The currency of
            `fee_amount`.
          deprecated: true
        fee_amount_money:
          allOf:
            - $ref: '#/components/schemas/MoneyValue'
            - description: >-
                Customer cancellation or policy fee, with exact minor units and
                currency precision.
    CancellationStep:
      type: object
      properties:
        cancel_time:
          type: string
          description: >-
            Deadline after which this tier applies. RFC 3339 with the supplier’s
            declared UTC offset. Steps whose deadline has no declared timezone
            are omitted from the ladder — the platform never invents an offset —
            so a schedule can be shorter than the supplier’s own. Tiers are
            chronological, earliest first, so the first entry is the deadline
            that matters.
          example: '2026-08-18T10:00:00+02:00'
        amount:
          type: number
          description: >-
            Deprecated: use `amount_money` instead. Read `amount_money`,
            `percent` or `nights`, whichever this step carries. What the guest
            is charged on or after `cancel_time`: a sum in MAJOR units of
            `currency`, a percentage or a number of nights, as `type` says.
          example: 606.13
          deprecated: true
        currency:
          type: string
          description: 'Deprecated: use `amount_money` instead. The currency of `amount`.'
          example: EUR
          deprecated: true
        type:
          type: string
          description: >-
            How the charge is expressed — a sum ("amount", "flat_fee"; read
            `amount_money`), a percentage ("percent", "percentage"; read
            `percent`) or a number of nights ("nights"; read `nights`).
          example: amount
        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: EUR 606.13
          deprecated: true
        amount_money:
          allOf:
            - $ref: '#/components/schemas/MoneyValue'
            - description: >-
                What the guest is charged on or after `cancel_time`, when this
                step is a sum. Absent on a percentage or nights step, and when
                the supplier named no currency.
        percent:
          type: number
          description: >-
            The charge as a percentage of the stay price, when this step is a
            percentage, on the 0–100 scale the supplier states it in: 50 is half
            the stay price, 100 the whole of it. Never a 0–1 fraction. Absent
            otherwise.
          example: 50
        nights:
          type: number
          description: >-
            The charge as a number of nights of the stay, when this step is
            expressed in nights. Absent otherwise.
          example: 1
    HotelPaymentType:
      type: string
      enum:
        - pay_now
        - pay_at_property
        - deposit
      description: >-
        How the rate can be settled. `pay_now` — paid when the booking is made.
        `pay_at_property` — paid to the hotel at the property. `deposit` — a
        deposit is taken.
  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.