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

# Pilot career statistics

> Aggregate stats for the authenticated pilot. The client uses these to render the pilot dashboard.



## OpenAPI

````yaml /api-reference/openapi.json get /pilot/statistics
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:
  /pilot/statistics:
    get:
      tags:
        - Pilot
      summary: Pilot career statistics
      description: >-
        Aggregate stats for the authenticated pilot. The client uses these to
        render the pilot dashboard.
      operationId: pilotStatistics
      responses:
        '200':
          description: Statistics for the authenticated pilot.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PilotStatistics'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    PilotStatistics:
      type: object
      required:
        - hours_flown
        - flights_flown
        - average_landing_rate
        - pireps_filed
        - total_pay
        - flight_streak
        - location
        - ff_level
        - ff_status
        - rank_image
      properties:
        hours_flown:
          type: number
          format: float
          description: Career flight time in decimal hours.
        flights_flown:
          type: string
          description: >-
            Stringified PIREP count — kept as a string for backwards
            compatibility with older clients.
          example: '127'
        average_landing_rate:
          type: number
          format: float
          description: >-
            Average touchdown rate across all filed PIREPs (feet per minute,
            negative).
        pireps_filed:
          type: string
          description: Stringified PIREP count (currently identical to `flights_flown`).
          example: '127'
        total_pay:
          type: number
          description: Reserved. Always `0` in the reference implementation.
          default: 0
        flight_streak:
          type: integer
          description: Reserved. Always `0` in the reference implementation.
          default: 0
        location:
          type: string
          description: ICAO of the pilot's current airport.
          example: YSSY
        ff_level:
          type: integer
          description: Reserved. Always `0` in the reference implementation.
          default: 0
        ff_status:
          type: integer
          description: Reserved. Always `0` in the reference implementation.
          default: 0
        rank_image:
          type: string
          format: uri
          nullable: true
          description: >-
            URL to the pilot's rank insignia image (same field as
            `PilotSession.rank_image`). Rendered by the Stratos client as a rank
            badge. Return `null` if not set. The phpVMS reference resolves this
            from the rank's `image_url` column.
    Error:
      type: object
      properties:
        error:
          type: string
        success:
          type: boolean
        message:
          type: string
  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.

````