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

# select-ancillaries

> Select ancillaries (baggage, seats, meals) for a trip item

Add baggage, seat selections, or meals to a flight item before checkout. Use it after the trip has a flight item and travelers attached but before `book`, for example when a user requests "two checked bags and a window seat for the outbound leg". Selections use full-replacement semantics: include everything the user wants kept on the trip in a single call.


## OpenAPI

````yaml api-reference/public-api.yaml POST /v1/select_ancillaries
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.1.0
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.
servers: []
security: []
paths:
  /v1/select_ancillaries:
    post:
      tags:
        - Pricing & booking
      summary: Select ancillaries (baggage, seats, meals) for a trip item
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AncillaryRequest'
      responses:
        '200':
          description: Updated ancillary selection
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AncillaryResponse'
        '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
        '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: Upstream service error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_ERROR
                  message: Upstream travel provider returned an error. Please retry.
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
        - BearerAuth: []
components:
  schemas:
    AncillaryRequest:
      type: object
      properties:
        trip_id:
          type: string
        item_id:
          type: string
        selections:
          type: array
          items:
            type: object
            properties:
              offer_id:
                type: string
              category:
                type: string
              pax_ref_id:
                type: string
              segment_ref_ids:
                type: array
                items:
                  type: string
              journey_ref_id:
                type: string
              quantity:
                type: number
              provider_metadata:
                type: object
                additionalProperties:
                  type: string
            required:
              - offer_id
        intent:
          $ref: '#/components/schemas/IntentInput'
      required:
        - trip_id
        - item_id
        - selections
      example:
        trip_id: trip_1048576
        item_id: itm_4b91c2
        selections:
          - offer_id: anc_bag_20kg
            category: baggage
            quantity: 1
    AncillaryResponse:
      type: object
      properties:
        trip_id:
          type: string
          example: trip_1048576
        quoted_item_id:
          type: number
          example: 8810231
        selected_ancillaries:
          type: array
          items:
            nullable: true
        total_with_ancillaries:
          type: object
          properties:
            amount:
              type: number
              example: 318.4
            value:
              type: number
            currency:
              type: string
              example: USD
            decimal_places:
              type: integer
              example: 2
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
    BearerAuth:
      type: http
      scheme: bearer

````