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

# Aircraft a pilot may switch to for a bid

> Aircraft eligible for this bid's flight, narrowed server-side by the VA's rank / typerating / location / booking rules (the reference module reuses `FlightService::filterSubfleets`). The Stratos client renders this as a dropdown on the booking card when the `allow_aircraft_changes` airline setting is on. `changeable` is false when the authenticated pilot has their own SimBrief OFP for this flight — the lock is per-pilot, so another pilot's OFP does not affect it.



## OpenAPI

````yaml /api-reference/openapi.json get /flights/bookings/{bid}/aircraft
openapi: 3.1.0
info:
  title: Stratos Core API
  version: 0.3.0
  summary: >-
    The Stratos VA API contract — auth, pilot identity, reference data, and the
    flight lifecycle.
  description: >-
    The contract every Stratos desktop client speaks to a virtual airline's crew
    system. The reference implementation is the open-source [stratos-core-api
    phpVMS 7 module](https://github.com/SkyvexSoftware/stratos-core-api), but
    any backend can implement these endpoints — they're framework-agnostic.


    Every endpoint in this reference is documented under `/api/stratos` — that's
    the convention the phpVMS module uses, and what we recommend for
    consistency. You're free to mount the surface anywhere you like; the desktop
    client just uses whatever base URL is set in your Stratos airline
    configuration.


    ## Authentication


    Most endpoints require a Bearer token — the pilot's API key, obtained via
    `POST /pilot/login` or your OAuth flow. Send as `Authorization: Bearer
    <api_key>` on every authenticated request.


    Public (no token): `GET /` and `POST /pilot/login`.


    ## Conventions


    - JSON, `snake_case` field names.

    - Distances in nautical miles, weights in pounds, flight times in decimal
    hours (unless suffixed `_minutes`).

    - Coordinates are decimal degrees (WGS84).

    - CORS is wide-open; the client preflights every method.
servers:
  - url: '{baseUrl}'
    description: >-
      Your VA's Stratos API base — set this to whatever URL the Stratos client
      is pointed at, including any path prefix you chose to mount the surface
      under.
    variables:
      baseUrl:
        default: https://crew.example.com/api/stratos
        description: >-
          Full base URL including the path prefix (no trailing slash). The
          phpVMS reference module mounts under `/api/stratos`; if you mounted
          yours somewhere else (e.g. `https://api.youva.com/stratos/v1`), use
          that.
security:
  - BearerAuth: []
tags:
  - name: Pilot
    description: Authentication, profile, and career statistics.
  - name: Reference Data
    description: Static lookup data the client renders in UI.
  - name: Flights
    description: >-
      Browse the schedule, manage bids, and run the active-flight lifecycle
      (start, update, complete, cancel).
paths:
  /flights/bookings/{bid}/aircraft:
    get:
      tags:
        - Flights
      summary: Aircraft a pilot may switch to for a bid
      description: >-
        Aircraft eligible for this bid's flight, narrowed server-side by the
        VA's rank / typerating / location / booking rules (the reference module
        reuses `FlightService::filterSubfleets`). The Stratos client renders
        this as a dropdown on the booking card when the `allow_aircraft_changes`
        airline setting is on. `changeable` is false when the authenticated
        pilot has their own SimBrief OFP for this flight — the lock is
        per-pilot, so another pilot's OFP does not affect it.
      operationId: listEligibleAircraft
      parameters:
        - name: bid
          in: path
          required: true
          schema:
            type: integer
          description: The bid ID.
      responses:
        '200':
          description: Eligible aircraft for the bid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EligibleAircraftResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: The bid does not belong to the authenticated pilot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Bid not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    EligibleAircraftResponse:
      type: object
      required:
        - changeable
        - aircraft
      properties:
        changeable:
          type: boolean
          description: >-
            False when the authenticated pilot has their own SimBrief OFP for
            this flight, in which case `aircraft` is empty and the client shows
            static text.
        aircraft:
          type: array
          items:
            $ref: '#/components/schemas/EligibleAircraft'
    Error:
      type: object
      properties:
        error:
          type: string
        success:
          type: boolean
        message:
          type: string
    EligibleAircraft:
      type: object
      required:
        - id
        - name
        - registration
        - icao
        - subfleet
      properties:
        id:
          type: integer
          description: Aircraft ID to send to /flights/change-aircraft.
        name:
          type: string
          example: Boeing 737-800
        registration:
          type: string
          example: VH-VXA
        icao:
          type: string
          example: B738
        subfleet:
          type: string
          description: Subfleet type, for grouping/labelling.
          example: B738
  responses:
    Unauthorized:
      description: Missing or invalid Bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            success: false
            error: Invalid Token
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        The pilot's API key, obtained via `POST /pilot/login` or your OAuth
        flow. Send as `Authorization: Bearer <api_key>` on every authenticated
        request.

````