openapi: 3.0.3

info:
    title: 🚋 Public Transport
    description: >-
        <p>
            This is a placeholder description that is automatically replaced in the build process, see <a href="https://gitlab.com/operator-ict/golemio/code/vp/output-gateway/-/blob/development/docs/openapi-header.yaml" target="_blank">/vp/output-gateway/docs/openapi-header.yaml</a>.
        </p>
    version: 1.0.0
    contact:
        name: Golemio Prague Data Platform
        email: golemio@operatorict.cz
        url: https://golemio.cz

servers:
    - url: https://api.golemio.cz
      description: Main (production) server
    - url: https://rabin.golemio.cz
      description: Test (development) server

tags:
    - name: 🧾 GTFS Static (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> General Transit Feed Specification data about the city's public transportation schedules in form of an API.

    - name: 🗺 GTFS Realtime (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> Protobuf feeds of GTFS Realtime data. The feeds are updated every 20 seconds. Proto definitions can be found at [gtfs-realtime-OVapi.proto](https://gitlab.com/operator-ict/golemio/code/ovapi-gtfs-realtime-bindings/-/blob/master/src/gtfs-realtime-OVapi.proto). You can inspect the data in human-readable form using the [GTFS Realtime Inspector](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/tree/master/toolkit/gtfs-realtime-inspector).

    - name: 🛤 PID Realtime Positions (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> Realtime positions of vehicles in custom GeoJSON format.

    - name: 🚏 PID Departure Boards (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />

    - name: 🚏 PID Departure Boards (v3)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> <img src="https://img.shields.io/badge/stability-experimental-orange" alt="golemioapi-stability-badge" />
    - name: 🚏 PID Departure Boards (v3) - internal
      description: Endpoints for internal use

    - name: 🚏 PID Departure Boards (v4)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" /> <img src="https://img.shields.io/badge/stability-experimental-orange" alt="golemioapi-stability-badge" />

    - name: 🗓️ Public GTFS Static Lookup (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />

    - name: 🕐 Public Vehicle Positions (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />

    - name: 🕒 Public Departures (v2)
      description: <img src="https://img.shields.io/badge/opendata-available-green" alt="golemioapi-opendata-badge" />
    - name: ⚠ JIS (v1) - internal
      description: Endpoints for internal use

paths:
    /v2/gtfs/services:
        get:
            summary: GET GTFS Services
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: date
                  in: query
                  description: Filter services by specific date in format (YYYY-MM-DD).
                  required: false
                  schema:
                      type: string
                      example: 2019-01-01
                - name: limit
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000 (default value).
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 10
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 0

            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/GTFSService"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/routes:
        get:
            summary: GET All GTFS Routes
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: limit
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000 (default value).
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 10
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 0
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/GTFSRoute"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/routes/{id}:
        get:
            summary: GET GTFS Route
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: id
                  in: path
                  required: true
                  schema:
                      type: string
                      example: "L991"
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/GTFSRoute"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/trips:
        get:
            summary: GET All GTFS Trips
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: stopId
                  in: query
                  description: Filter trips that include specific stop.
                  required: false
                  schema:
                      type: string
                      example: "U953Z102P"
                - name: date
                  in: query
                  description: Filter trips by specific date.
                  required: false
                  schema:
                      type: string
                      example: "2018-01-01"
                - name: limit
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000 (default value).
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 10
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 0
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/GTFSTrip"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/trips/{id}:
        get:
            summary: GET GTFS Trip
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: id
                  in: path
                  required: true
                  schema:
                      type: string
                      example: "991_1151_190107"
                - name: includeShapes
                  in: query
                  description: Enrich trip response object with shapes.
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: includeStops
                  in: query
                  description: Enrich trip response object with stops.
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: includeStopTimes
                  in: query
                  description: Enrich trip response object with stops times.
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: includeService
                  in: query
                  description: Enrich trip response object with service.
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: includeRoute
                  in: query
                  description: Enrich trip response object with routes.
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: date
                  in: query
                  description: Filter trips by specific date in format (YYYY-MM-DD).
                  required: false
                  schema:
                      type: string
                      example: "2019-01-01"
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - $ref: "#/components/schemas/GTFSTrip"
                                    - type: object
                                      properties:
                                          stop_times:
                                              type: array
                                              items:
                                                  $ref: "#/components/schemas/GTFSStopTime"
                                    - type: object
                                      properties:
                                          shapes:
                                              type: array
                                              items:
                                                  allOf:
                                                      - $ref: "#/components/schemas/FeaturePoint"
                                                      - type: object
                                                        properties:
                                                            properties:
                                                                $ref: "#/components/schemas/GTFSShape"
                                    - type: object
                                      properties:
                                          service:
                                              $ref: "#/components/schemas/GTFSService"
                                    - type: object
                                      properties:
                                          route:
                                              $ref: "#/components/schemas/GTFSRoute"

                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/shapes/{id}:
        get:
            summary: GET GTFS Shape
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: id
                  in: path
                  required: true
                  schema:
                      type: string
                      example: "L991V2"
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    type:
                                        type: string
                                        example: "FeatureCollection"
                                    features:
                                        type: array
                                        items:
                                            allOf:
                                                - $ref: "#/components/schemas/FeaturePoint"
                                                - type: object
                                                  properties:
                                                      properties:
                                                          $ref: "#/components/schemas/GTFSShape"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/stops:
        get:
            summary: GET All GTFS Stops
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: names
                  in: query
                  description: Name of station. Use with square brackets `names[]=NAME1&names[]=NAME2`.
                  required: false
                  schema:
                      type: string
                      example: "Prosecká"
                - name: ids
                  in: query
                  description: Get stops by stop_id. Use with square brackets `ids[]`.
                  required: false
                  schema:
                      type: string
                      example: "U476Z103P"
                - name: aswIds
                  in: query
                  description: Get stops by ASW, use `_` instead of `/` or encode the slash sign with `%2F`. Use with square brackets `aswId[]`.
                  required: false
                  schema:
                      type: string
                      example: "1833_12"
                - name: cisIds
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000 (default value).
                  required: false
                  schema:
                      type: number
                      example: 12345
                - name: limit
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000 (default value).
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 10
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 0
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    type:
                                        type: string
                                        example: "FeatureCollection"
                                    features:
                                        type: array
                                        items:
                                            allOf:
                                                - $ref: "#/components/schemas/FeaturePoint"
                                                - type: object
                                                  properties:
                                                    properties:
                                                      $ref: "#/components/schemas/GTFSStop"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/stops/{id}:
        get:
            summary: GET GTFS Stop
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: id
                  in: path
                  required: true
                  schema:
                      type: string
                      example: "U476Z104P"
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - $ref: "#/components/schemas/FeaturePoint"
                                    - type: object
                                      properties:
                                          properties:
                                              $ref: "#/components/schemas/GTFSStop"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/gtfs/stoptimes/{id}:
        get:
            summary: GET GTFS Stop times
            description: ""
            tags:
                - 🧾 GTFS Static (v2)
            parameters:
                - name: id
                  in: path
                  description: ""
                  required: true
                  schema:
                      type: string
                      example: "U118Z101P"
                - name: date
                  in: query
                  description: Filter stop times by specific date in format (YYYY-MM-DD).
                  required: false
                  schema:
                      type: string
                      example: "2019-01-01"
                - name: from
                  in: query
                  description: Filter stop times by time departure in format (H:mm:ss).
                  required: false
                  schema:
                      type: string
                      example: "07:12:33"
                - name: to
                  in: query
                  description: Filter stop times by time arrival in format (H:mm:ss).
                  required: false
                  schema:
                      type: string
                      example: "12:12:33"

                - name: includeStop
                  in: query
                  description: Enrich stop times response object with stop.
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: limit
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000 (default value).
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 10
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 0
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/GTFSStopTime"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/vehiclepositions:
        get:
            summary: GET All Vehicle Positions
            description: |
                Positions in one the following states are included by default:
                - `at_stop` - The position is tracking and the closest anchor point or metro rail track segment is a stop.
                - `on_track` - The position is tracking, but is neither `at_stop` nor `off_track`.

                Using the `includeNotTracking` parameter, positions in one the following states can be additionally included:
                - `after_track` - The position is not tracking and the trip's last known position is tracking. For metro positions, this can also mean that it is tracking, the vehicle is 200+ meters from the closest metro rail track segment of its track and the vehicle's message attributes `tm` and `odch` or higher than the arrival to the final stop. For other positions from TCP sources (DPP buses and trams), this can also mean that it is tracking and the vehicle sent a message while at the final stop or sent a message with the `tjr` attribute higher than the arrival to the final stop.
                - `after_track_delayed` - The same as `after_track`, but the position always has defined delay (not null) if possible to deduct from GTFS static data and origin timestamp. Essentially, it means the vehicle is `at_stop` at the very last stop of the trip. The delay is also propagated to the next trip of the vehicle, unlike the `after_track` state.
                - `before_track` - The position is not tracking and either the trip's previous position is not known, or the previous position's state is `at_stop` or `on_track`.
                - `before_track_delayed` - The position has a delay prediction based on the vehicle's previous trip.
                - `canceled` - The position is canceled.
                - `off_track` - The position is tracking and the vehicle is 200+ meters from the closest anchor point or metro rail track segment of its track. For metro positions, it is additionally required that the vehicle's message attributes `tm` and `odch` or less than or equal to the arrival to the final stop.

                Using the `includeNotPublic` parameter, positions in the following state can be additionally included:
                - `not_public` - The position belongs to a non-public trip (trip without run schedule).

                The following states also exist internally but are excluded from the API output:
                - `duplicate` - The position is not tracking, the trip's last known position is tracking and there is another position with identical `origin_timestamp`.
                - `invisible` - The position is not tracking and either:
                    - the trip's previous position is not known or the previous position's state is `at_stop` or `on_track`, and the vehicle is on its way from the garage;
                    - or the trip's last known position is tracking and the vehicle is on its way to the garage.
                - `mismatched` - The position does not make sense (e.g. it was sent late and thus has a mismatched stop sequence).
                - `unknown` - The position is not yet processed (or was determined to never be processed) or has been invalidated (e.g. due to a vehicle repeating some part of the trip).
            tags:
                - 🛤 PID Realtime Positions (v2)
            parameters:
                - name: limit
                  in: query
                  description: Limits number of retrieved items. The maximum is 10000.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 10
                      default: 100
                - name: offset
                  in: query
                  description: Number of the first items that are skipped.
                  required: false
                  schema:
                      type: number
                      format: int64
                      example: 0
                - name: includeNotTracking
                  in: query
                  description: Enrich result dataset with not tracking trip (those trips not being on track - before and after trip)
                  schema:
                      type: boolean
                      example: true
                - name: includeNotPublic
                  in: query
                  description: Enrich result dataset with not public trips (trips without run schedule)
                  schema:
                        type: boolean
                        default: false
                        example: true
                - name: cisTripNumber
                  in: query
                  description: Filter result by CIS trip number
                  required: false
                  schema:
                      type: number
                      example: 1020
                - name: preferredTimezone
                  in: query
                  description: Preferred timezone offset by given Country/City (use encoded slash sign with `%2F` or use `_` sign)
                  required: false
                  schema:
                      type: string
                      example: "Europe_Prague"
                - name: routeId
                  in: query
                  description: Filter result by route id
                  required: false
                  schema:
                      type: string
                      example: "L301"
                - name: routeShortName
                  in: query
                  description: Filter result by short name
                  required: false
                  schema:
                      type: string
                      example: "381"
                - name: updatedSince
                  in: query
                  description: Limit results to the ones updated after (timestamp greater than)
                  required: false
                  schema:
                      type: string
                      example: "2020-04-07T06:32:29.000Z"
                - in: header
                  name: Accept-Encoding
                  description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                  required: false
                  schema:
                        oneOf:
                            - type: string
                              enum:
                                - gzip
                                - identity
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                        x-last-modified:
                            description: Timestamp of the latest resource update. Use it as `?updatedSince` query parameter to obtain only newer data than this value.
                            schema:
                                type: string
                                example: "2024-06-03T09:16:16.973Z"
                    content:
                        application/json:
                            schema:
                                type: object
                                properties:
                                    type:
                                        type: string
                                        example: "FeatureCollection"
                                    features:
                                        type: array
                                        items:
                                            allOf:
                                                - $ref: "#/components/schemas/FeaturePoint"
                                                - type: object
                                                  properties:
                                                    properties:
                                                      $ref: "#/components/schemas/VehiclepositionCompound"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/vehiclepositions/{gtfsTripId}:
        get:
            summary: GET Vehicle Position
            description: ""
            tags:
                - 🛤 PID Realtime Positions (v2)
            parameters:
                - name: gtfsTripId
                  in: path
                  description: "Filter result by trip id (gtfs_trip_id)"
                  required: true
                  schema:
                      type: string
                      example: "115_107_180501"
                - name: includeNotTracking
                  in: query
                  description: Enrich result dataset with not tracking trip (last tracked vehicle after its trip)
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: includePositions
                  in: query
                  description: Enrich result dataset with positions
                  required: false
                  schema:
                      type: boolean
                      example: true
                - name: preferredTimezone
                  in: query
                  description: Preferred timezone offset by given Country/City (use encoded slash sign by %2F or use _ sign)
                  required: false
                  schema:
                      type: string
                      example: "Europe_Prague"
                - in: header
                  name: Accept-Encoding
                  description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                  required: false
                  schema:
                        oneOf:
                            - type: string
                              enum:
                                - gzip
                                - identity
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        application/json:
                            schema:
                                allOf:
                                    - $ref: "#/components/schemas/FeaturePoint"
                                    - type: object
                                      properties:
                                          properties:
                                              $ref: "#/components/schemas/VehiclepositionCompound"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/vehiclepositions/gtfsrt/trip_updates.pb:
        get:
            summary: GET GTFS-RT Trip Updates Feed
            description: ""
            tags:
                - 🗺 GTFS Realtime (v2)
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            $ref: "#/components/headers/CacheControlNoCache"
                        Last-Modified:
                            $ref: "#/components/headers/LastModified"
                    content:
                        application/octet-stream:
                            schema:
                                type: string
                                format: binary
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/vehiclepositions/gtfsrt/vehicle_positions.pb:
        get:
            summary: GET GTFS-RT Vehicle Positions Feed
            description: ""
            tags:
                - 🗺 GTFS Realtime (v2)
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            $ref: "#/components/headers/CacheControlNoCache"
                        Last-Modified:
                            $ref: "#/components/headers/LastModified"
                    content:
                        application/octet-stream:
                            schema:
                                type: string
                                format: binary
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/vehiclepositions/gtfsrt/pid_feed.pb:
        get:
            summary: GET GTFS-RT PID Feed (trip updates and vehicle positions, combined)
            description: ""
            tags:
                - 🗺 GTFS Realtime (v2)
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            $ref: "#/components/headers/CacheControlNoCache"
                        Last-Modified:
                            $ref: "#/components/headers/LastModified"
                    content:
                        application/octet-stream:
                            schema:
                                type: string
                                format: binary
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/vehiclepositions/gtfsrt/alerts.pb:
        get:
            summary: GET GTFS-RT Service Alerts Feed
            description: ""
            tags:
                - 🗺 GTFS Realtime (v2)
            responses:
                "200":
                    description: successful operation
                    headers:
                        Cache-Control:
                            $ref: "#/components/headers/CacheControlNoCache"
                        Last-Modified:
                            $ref: "#/components/headers/LastModified"
                    content:
                        application/octet-stream:
                            schema:
                                type: string
                                format: binary
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/pid/departureboards:
        get:
            summary: GET Departure Boards
            description: >-
                You have to use query parameters `ids`, `cisIds`, `aswIds` or `names` in array format - eg. `ids[]=1&ids[]=3`.
                **At least one of these IDs is required.** The maximum is 100 stops combined in one request.
            tags:
                - 🚏 PID Departure Boards (v2)
            parameters:
                - $ref: "#/components/parameters/DepartureBoardsIds"
                - $ref: "#/components/parameters/DepartureBoardsAswIds"
                - $ref: "#/components/parameters/DepartureBoardsCisIds"
                - $ref: "#/components/parameters/DepartureBoardsNames"
                - $ref: "#/components/parameters/DepartureBoardsMinutesBefore"
                - $ref: "#/components/parameters/DepartureBoardsMinutesAfter"
                - $ref: "#/components/parameters/DepartureBoardsTimeFrom"
                - $ref: "#/components/parameters/DepartureBoardsIncludeMetroTrains"
                - $ref: "#/components/parameters/DepartureBoardsAirCondition"
                - $ref: "#/components/parameters/DepartureBoardsPreferredTimezone"
                - name: mode
                  in: query
                  description: >-
                      Valid entries: `departures` (default), `arrivals`, `mixed`. Set how to handle behaviour in end stops. `departures` (default) returns all connections that depart from selected stops (does not return connections for which it is the final stop). `arrivals` returns all connections that arrive into the stops (does not return connections for which it is the first stop). `mixed` returns everything. Use `arrivals` to create dedicated arrival boards. Use `departures` for all other cases. Using `mixed` is not recomended as departures of adjoined routes will be returned twice.
                  required: false
                  schema:
                      type: string
                      example: "departures"
                - $ref: "#/components/parameters/DepartureBoardsOrder"
                - $ref: "#/components/parameters/DepartureBoardsFilter"
                - $ref: "#/components/parameters/DepartureBoardsSkip"
                - $ref: "#/components/parameters/DepartureBoardsLimit"
                - $ref: "#/components/parameters/DepartureBoardsTotal"
                - $ref: "#/components/parameters/DepartureBoardsOffset"
                - $ref: "#/components/parameters/DepartureBoardsAppendHeadsignsLimit"

            responses:
                "200":
                    description: Can return empty data in departures property (empty array []) if no departures were found
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                        X-Golemio-Preset-Metadata:
                            description: Preset metadata indicating air condition possibility (1=possible, 0=not possible)
                            schema:
                                type: string
                                example: airConditionPossible=1
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/schemas/PIDDepartureBoard"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v2/pid/departureboards/xml:
        get:
            summary: "[DEPRECATED] GET Departure Boards (legacy MPVnet XML)"
            description: |
                **DEPRECATED.** Legacy MPVnet XML for ROPID information panels that cannot consume JSON.
                For new integrations use `/v2/pid/departureboards` (JSON).

                UTF-8, no `<?xml ...?>` prologue. Only `mode=departures` is supported (others return 400).
                Same query parameters and identifier rules as the JSON endpoint
                (`ids` / `cisIds` / `aswIds` / `names`, at least one required, max 100 stops).

                See the example response below for the exact attribute set.
            deprecated: true
            tags:
                - 🚏 PID Departure Boards (v2)
            parameters:
                - $ref: "#/components/parameters/DepartureBoardsIds"
                - $ref: "#/components/parameters/DepartureBoardsAswIds"
                - $ref: "#/components/parameters/DepartureBoardsCisIds"
                - $ref: "#/components/parameters/DepartureBoardsNames"
                - $ref: "#/components/parameters/DepartureBoardsMinutesBefore"
                - $ref: "#/components/parameters/DepartureBoardsMinutesAfter"
                - $ref: "#/components/parameters/DepartureBoardsTimeFrom"
                - $ref: "#/components/parameters/DepartureBoardsIncludeMetroTrains"
                - $ref: "#/components/parameters/DepartureBoardsAirCondition"
                - $ref: "#/components/parameters/DepartureBoardsPreferredTimezone"
                - name: mode
                  in: query
                  description: >-
                      Only `departures` is supported for this XML endpoint; other values return 400.
                      Valid entries: `departures` (default), `arrivals`, `mixed`.
                  required: false
                  schema:
                      type: string
                      example: "departures"
                - $ref: "#/components/parameters/DepartureBoardsOrder"
                - $ref: "#/components/parameters/DepartureBoardsFilter"
                - $ref: "#/components/parameters/DepartureBoardsSkip"
                - $ref: "#/components/parameters/DepartureBoardsLimit"
                - $ref: "#/components/parameters/DepartureBoardsTotal"
                - $ref: "#/components/parameters/DepartureBoardsOffset"
                - $ref: "#/components/parameters/DepartureBoardsAppendHeadsignsLimit"

            responses:
                "200":
                    description: |
                        Single-line MPVnet XML response. Example body

                        ```xml
                        <TBL cas="2026-03-20T15:30:00" text="Odjezdy poskytuje Golemio">
                          <t id="458/1,458/2" zast="Smíchovské nádraží" zobraz_stan="True" stan="A,B">
                            <o stan="A" lin="129" alias="129" spoj="" smer="Baně"
                               odj="2026-03-20T15:31:00+01:00" sled="true" zpoz="0" np="true" nad="false" dd="3"/>
                            <o stan="A" lin="5" alias="5" spoj="" smer="Slivenec"
                               odj="2026-03-20T15:31:00+01:00" sled="true" zpoz="2" np="false" nad="false"
                               pz="Plzeňka" dd="2"/>
                            <o stan="B" lin="B" alias="B" spoj="" smer="Černý Most"
                               odj="2026-03-20T15:32:00+01:00" sled="true" zpoz="1" np="true" nad="false"
                               pz="Radlická" dd="1"/>
                            <o stan="A" lin="X22" alias="X22" spoj="" smer="Nádraží Hostivař"
                               odj="2026-03-20T15:33:00+01:00" sled="false" zpoz="0" np="false" nad="true"
                               info="nejede" dd="7"/>
                            <i stan="A">Výluka tramvají na Smíchově.</i>
                          </t>
                        </TBL>
                        ```
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        text/xml; charset=utf-8:
                            schema:
                                type: string
                "400":
                    $ref: "#/components/responses/BadRequestError"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found

    /v3/pid/transferboards:
        get:
            tags:
              - 🚏 PID Departure Boards (v3)
            summary: GET Transfer Boards
            description: |
                ⚠️ Note: This endpoint is experimental and may be subject to change.
                Tested and optimized for train transfers only (as in transfering from a train to other all kinds of transport).
            parameters:
                - name: cisId
                  in: query
                  description: CIS identifier of the stop. A list of CIS IDs can be found in [Prague Open data](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F6ac8381f-ea19-4ea9-8949-92076809dc5a).
                  required: true
                  schema:
                    type: number
                    example: 5454956 # Praha-Uhříněves
                - name: tripNumber
                  in: query
                  description: Trip number of the vehicle in which the transfer is planned. Use to filter out transfers for a specific trip. Represents the numeric part of the GTFS `trip_short_name` (Os 2547 -> 2547).
                  required: false
                  schema:
                    type: number
                    example: 2547
                - name: timeFrom
                  in: query
                  description: Set initial timestamp for time interval given by `minutesBefore` (hardcoded to 0) and `minutesAfter` (hardcoded to 60). Use to simulate query time different from now. Use ISO 8601 time format and URL encoded symbols - `%3A` for `:`, `%2B` for `.`, `%2F` for `+`. Time zone is set to `Europe/Prague`. Applicable range is -6 hours +2 days from now.
                  required: false
                  schema:
                      type: string
                      example: "2024-11-04T16:51:00"
            responses:
                "200":
                    description: List of all active transfer boards
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        application/json:
                            schema:
                                type: object
                                required:
                                  - departures
                                  - infotexts
                                properties:
                                    departures:
                                        type: array
                                        items:
                                            type: object
                                            required:
                                              - departure_timestamp
                                              - route
                                              - stop
                                              - trip
                                            properties:
                                                departure_timestamp:
                                                    type: object
                                                    required:
                                                      - minutes
                                                    properties:
                                                        minutes:
                                                            type: string
                                                            example: "<1"
                                                            nullable: true
                                                route:
                                                    type: object
                                                    required:
                                                      - short_name
                                                      - type
                                                    properties:
                                                        short_name:
                                                            type: string
                                                            example: "S9"
                                                            nullable: true
                                                        type:
                                                            type: number
                                                            example: 2
                                                            nullable: true
                                                stop:
                                                    type: object
                                                    required:
                                                      - platform_code
                                                    properties:
                                                        platform_code:
                                                            type: string
                                                            example: "2/3"
                                                            nullable: true
                                                trip:
                                                    type: object
                                                    required:
                                                      - headsign
                                                      - id
                                                    properties:
                                                        headsign:
                                                            type: string
                                                            example: "Benešov u Prahy"
                                                            nullable: false
                                                        id:
                                                            type: string
                                                            example: "1309_2547_231210"
                                                            nullable: false
                                    infotexts:
                                        type: array
                                        items:
                                            type: object
                                            required:
                                              - text
                                              - text_en
                                              - display_type
                                            properties:
                                                text:
                                                    type: string
                                                    example: "Nehoda na trase, odklon linek mimo tuto stanici."
                                                    nullable: false
                                                text_en:
                                                    type: string
                                                    example: "Trips are cancelled due to accident on route."
                                                    nullable: true
                                                display_type:
                                                    type: string
                                                    example: "inline"
                                                    enum:
                                                      - "inline"
                                                      - "general"
                                                    nullable: false

                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found - no valid GTFS stop found for the given CIS ID
                    content:
                      application/json:
                        schema:
                            type: object
                            required:
                              - departures
                              - infotexts
                            properties:
                                departures:
                                    type: array
                                    example: []
                                    items:
                                        type: object
                                infotexts:
                                    type: array
                                    example: []
                                    items:
                                        type: object

    /v3/pid/infotexts:
        get:
            summary: GET Infotexts (export from the VYMI (JIS) Infotexts system)
            description: ""
            parameters:
                - name: includeFuture
                  in: query
                  description: "If set to true, the endpoint returns both active and future infotexts. If false or omitted, only active infotexts are returned."
                  required: false
                  schema:
                    type: boolean
                    example: false
            tags:
                - 🚏 PID Departure Boards (v3)
            responses:
                "200":
                    description: List of all active infotexts
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=10, stale-while-revalidate=10
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    allOf:
                                        - $ref: "#/components/schemas/PIDDepartureBoardInfotext"
                                        - type: object
                                          required:
                                            - priority
                                            - related_stops
                                            - id
                                            - repeat
                                          properties:
                                              priority:
                                                  type: string
                                                  description: |
                                                    Priority of the infotext. If multiple infotexts are active for the same stop, the ones with higher priority will be displayed.
                                                    Mapped from the VYMI (JIS) system's severity level in the following way:
                                                    - "INFO" -> "low"
                                                    - "WARNING" -> "normal"
                                                    - "SEVERE" -> "high"
                                                  enum:
                                                    - "low"
                                                    - "normal"
                                                    - "high"
                                                  example: "high"
                                              related_stops:
                                                type: array
                                                description: ""
                                                items:
                                                    type: object
                                                    required:
                                                      - id
                                                      - name
                                                      - platform_code
                                                    properties:
                                                      id:
                                                        type: string
                                                        example: "U118S1"
                                                        description: GTFS station IDs for which the infotexts apply.
                                                      name:
                                                        type: string
                                                        example: "Flora"
                                                        description: GTFS station name.
                                                      platform_code:
                                                        type: string
                                                        nullable: true
                                                        example: null
                                                        description: GTFS station platform code.
                                              id:
                                                  type: string
                                                  format: uuid
                                                  description: VYMI (JIS) Infotexts identifier.
                                                  example: 40507cee-6468-488e-ba78-e36d9c20e67c
                                              repeat:
                                                  $ref: "#/components/schemas/RepeatOnlyTimes"
                "401":
                    $ref: "#/components/responses/UnauthorizedError"
                "404":
                    description: Not found
    /v3/pid/departurepresets:
        get:
            summary: Get ROPID departures presets linked with gtfs stops
            tags:
                - 🚏 PID Departure Boards (v3) - internal

            responses:
              200:

                description: A list of ROPID departures presets linked with gtfs stops
                headers:
                    Cache-Control:
                        description: Cache control directive for caching proxies
                        schema:
                            type: string
                            example: public, s-maxage=25, stale-while-revalidate=10
                content:
                  application/json:
                    schema:
                      type: array
                      items:
                        type: object
                        properties:
                          note:
                            type: string
                            example: "Nádraží Klánovice vlaky"
                          route_name:
                            type: string
                            example: "nadrazi-klanovice-vlaky-xxxx"
                          is_testing:
                            type: boolean
                            example: false
                          stops:
                            type: array
                            items:
                              type: string
                            example: ["U454Z301"]
                          stops_routes:
                            type: array
                            items:
                              type: object
                              properties:
                                stop_id:
                                  type: string
                                  example: "U454Z301"
                                routes:
                                  type: array
                                  items:
                                    type: object
                                    properties:
                                      type:
                                        type: integer
                                        example: 0
                                      name:
                                        type: string
                                        example: "S7"

    /v4/pid/transferboards:
      get:
        tags:
          - 🚏 PID Departure Boards (v4)
        summary: GET Transfer Boards
        parameters:
          - name: cisId
            in: query
            description: |
              CIS identifier of the stop or node. A list of CIS IDs can be found in [Prague Open data](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F6ac8381f-ea19-4ea9-8949-92076809dc5a).
              Includes departures from all stops at the given CIS ID.
              Required if `aswId` is not provided. Only one of `cisId` or `aswId` can be used.
            required: false
            examples:
              cisId1:
                value: 58759
                summary: Anděl
              cisId2:
                value: 13035
                summary: Jesenice
              cisId3:
                value: 5454956
                summary: Praha-Uhříněves
            schema:
              type: number
          - name: aswId
            in: query
            description: |
              ASW identifier of the stop. The format is `nodeId/stopId` where stopId is not mandatory.
              You can use `_` instead of `/` or encode the slash sign with `%2F`,
              Includes departures from the given stop, plus from all stops at the given node (1330_1 -> 1330 -> 1330_1, 1330_2, ...),
              plus from all stops sharing the same name. Departures from associated metro and train stations are also included (Na Knížecí -> Anděl).
              Required if `cisId` is not provided. Only one of `cisId` or `aswId` can be used.
            required: false
            examples:
              aswId1:
                value: "1040_1"
                summary: "Anděl A (tram stop)"
              aswId2:
                value: "1040_14"
                summary: "Anděl G (bus stop)"
              aswId3:
                value: "1330_1"
                summary: "Jesenice A (bus stop - regional)"
              aswId4:
                value: "461_301"
                summary: "Praha-Uhříněves (train station)"
            schema:
              type: string
              maxLength: 20
          - name: tripNumber
            in: query
            description: |
              Trip number of the vehicle in which the transfer is planned.
              Use to filter out transfers for a specific trip.
              Represents the numeric part of the GTFS `trip_short_name` (`Os 2547` -> `2547`).
              Generally, `trip_short_name` is available only for train services.
              Required if `vehicleRegistrationNumber` is not provided. Only one of `tripNumber` or `vehicleRegistrationNumber` can be used.
            required: false
            examples:
              tripNumber1:
                value: 2547
                summary: Os 2547
            schema:
              type: number
          - name: vehicleRegistrationNumber
            in: query
            description: |
              Registration number of the vehicle in which the transfer is planned.
              Use to filter out transfers for a specific vehicle.
              Required if `tripNumber` is not provided. Only one of `tripNumber` or `vehicleRegistrationNumber` can be used.
            required: false
            examples:
              vehicleRegistrationNumber1:
                value: "1001"
                summary: "Vehicle registration number"
            schema:
              type: string
              maxLength: 20
          - name: routeType
            in: query
            description: |
              Transport type of the route in which the transfer is planned. This parameter is required to distinguish between different vehicle types, as trams and buses can share the same registration number. The value is represented by the following enum from GTFS:
              - 0: Tram
              - 1: Subway
              - 2: Train
              - 3: Bus
              - 4: Ferry
              - 7: Funicular
              - 11: Trolleybus
              For example, if you want to get a tram with registration number "1001", use routeType=0. For a bus with the same registration number, use routeType=3.
              When routeType=3 is used and no vehicle position is found, the system automatically falls back to looking up the vehicle as a trolleybus.
            required: true
            examples:
              routeType1:
                value: 2
                summary: "Train"
              routeType2:
                value: 3
                summary: "Bus"
            schema:
              type: number
              enum:
                - 0
                - 1
                - 2
                - 3
                - 4
                - 7
                - 11
          - name: timeFrom
            in: query
            description: |
              Set initial timestamp for time interval given by `minutesBefore` (hardcoded to 0) and `minutesAfter` (hardcoded to 60). Use to simulate query time different from now. Use ISO 8601 time format and URL encoded symbols - `%3A` for `:`, `%2B` for `.`, `%2F` for `+`. Time zone is set to `Europe/Prague`. Applicable range is -6 hours +2 days from now.
            required: false
            schema:
              type: string
              example: "2024-11-04T16:51:00"
          - name: limit
            in: query
            description: |
              Limit the number of rows of departures returned. The total number of departures is a union across individual types of departures. The default value is 8. The maximum value is 30.
            required: false
            schema:
              type: number
              format: int64
              default: 8
              minimum: 1
              maximum: 30
        responses:
          "200":
            description: List of possible transfers at the provided stop/node (identified by cisId or aswId)
            headers:
              Cache-Control:
                description: Cache control directive for caching proxies
                schema:
                  type: string
                  example: public, s-maxage=5, stale-while-revalidate=5
            content:
              application/json:
                schema:
                  type: object
                  required:
                    - stop_name
                    - platform_code
                    - icons
                    - departures
                    - infotexts
                  properties:
                    stop_name:
                      type: string
                      example: "Anděl"
                      nullable: true
                    platform_code:
                      type: string
                      example: "2/3"
                      nullable: true
                    icons:
                      $ref: "#/components/schemas/Icons"
                      description: "Icons for possible transfer types on the stop"
                    departures:
                      type: array
                      description: |
                        List of departures from the stop.
                        The list is sorted by:
                        - route type - subway and then other
                          - subway is sorted alphabetically, then by departure time, then by direction id
                        - departure time
                      items:
                        $ref: '#/components/schemas/TransferboardsDeparture'
                    infotexts:
                      type: array
                      items:
                        type: object
                        required:
                          - text
                          - display_type
                        properties:
                          text:
                            type: object
                            required:
                              - cs
                            properties:
                              cs:
                                type: string
                                example: "Nehoda na trase, odklon linek mimo tuto stanici."
                                nullable: false
                              en:
                                type: string
                                example: "Trips are cancelled due to accident on route."
                            nullable: true
                          display_type:
                            type: string
                            example: "inline"
                            enum:
                              - "inline"
                              - "general"
                            nullable: false

          "400":
            description: |
              Bad request - invalid query parameters, including:
              * `cisId` and `aswId` are missing or invalid
              * Both `cisId` and `aswId` are provided
              * `timeFrom` is invalid or out of range
            content:
              application/json:
                schema:
                  type: object
                  properties:
                    error_message:
                      type: string
                      example: "Bad request"
                      nullable: false
                    error_status:
                      type: integer
                      example: 400
                      nullable: false
                    error_info:
                      type: string
                      example: "{...}"
                      nullable: true
                  required:
                    - error_message
                    - error_status
          "401":
            $ref: "#/components/responses/UnauthorizedError"
          "404":
            description: Not found - no valid GTFS stop found for the given CIS ID or ASW ID
            content:
              application/json:
                schema:
                  type: object
                  required:
                    - departures
                    - infotexts
                  properties:
                    departures:
                      type: array
                      example: []
                      items:
                        type: object
                    infotexts:
                      type: array
                      example: []
                      items:
                        type: object

    /v2/public/gtfs/trips/{gtfsTripId}:
        get:
            tags:
                - 🗓️ Public GTFS Static Lookup (v2)
            summary: GET GTFS Trip
            description: |
                Get GTFS static trip info by trip ID, including associated stop times (without no stop waypoints) and shapes.

                ℹ️ Note: This endpoint is optimized for client applications serving many users simultaneously. It provides streamlined data structures and caching strategies suitable for client-side consumption. Rate limits can be adjusted upon request - contact us if you need higher limits. Note: Despite the 'public' prefix, this endpoint requires an API key for access control and usage monitoring.
            parameters:
                - name: gtfsTripId
                  in: path
                  description:
                    Filter result by GTFS trip ID.
                  required: true
                  schema:
                    type: string
                    example: "115_107_180501"
                - name: scopes
                  in: query
                  schema:
                      type: array
                      items:
                          type: string
                          enum:
                              - info
                              - stop_times
                              - shapes
                              - vehicle_descriptor
                  description: "Choose which scopes to include in response."
                  required: true
                  example: ["info"]
                - in: header
                  name: Accept-Encoding
                  description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                  required: false
                  schema:
                        oneOf:
                            - type: string
                              enum:
                                - gzip
                                - identity
            responses:
                200:
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=14400, stale-while-revalidate=60
                    content:
                        application/json; charset=utf-8:
                            schema:
                                allOf:
                                  - $ref: "#/components/schemas/ScopeStaticInfo"
                                  - $ref: "#/components/schemas/ScopeStaticStopTimes"
                                  - $ref: "#/components/schemas/ScopeShapes"
                                  - $ref: "#/components/schemas/ScopeStaticVehicleDescriptor"

                401:
                    $ref: "#/components/responses/UnauthorizedError"
                404:
                    description: Not found

    /v2/public/vehiclepositions:
        get:
            tags:
                - 🕐 Public Vehicle Positions (v2)
            summary: GET All Vehicle Positions
            description: |
                ℹ️ Note: This endpoint is optimized for client applications serving many users simultaneously. It provides streamlined data structures and caching strategies suitable for client-side consumption. Rate limits can be adjusted upon request - contact us if you need higher limits. Note: Despite the 'public' prefix, this endpoint requires an API key for access control and usage monitoring.
            parameters:
              - name: boundingBox
                in: query
                schema:
                  type: string
                example: '50.123,14.243,50.017,14.573'
                description: |
                    Filter by bounding box in format "topLeft.lat,topLeft.lon,bottomRight.lat,bottomRight.lon". Latitude must be in range -85.05112878 to 85.05112878 (supported by Redis GEO commands), longitude in range -180 to 180. Polygons that fit only partially to selected bounding box are included.
              - name: routeShortName
                in: query
                schema:
                    type: array
                    items:
                        type: string
                example: ['381', 'X1']
                description: 'Filter by short name of route. URL: `?routeShortName=381&routeShortName=X1`'
              - name: routeType
                in: query
                schema:
                  type: array
                  items:
                    type: string
                    enum:
                      - tram
                      - metro
                      - train
                      - bus
                      - ferry
                      - funicular
                      - trolleybus
                example: 'metro'
                description: 'filter by transport type'
              - in: header
                name: Accept-Encoding
                description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                required: false
                schema:
                    oneOf:
                        - type: string
                          enum:
                            - gzip
                            - identity
            responses:
                200:
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        application/json; charset=utf-8:
                            schema:
                                type: object
                                properties:
                                    features:
                                        type: array
                                        items:
                                            $ref: '#/components/schemas/VehiclePositionsFeature'
                                    type:
                                        type: string
                                        example: FeatureCollection
                401:
                    $ref: "#/components/responses/UnauthorizedError"
                404:
                    description: Not found

    /v2/public/vehiclepositions/{vehicleId}:
        get:
            tags:
                - 🕐 Public Vehicle Positions (v2)
            summary: GET Vehicle Positions
            description: |
                ℹ️ Note: This endpoint is optimized for client applications serving many users simultaneously. It provides streamlined data structures and caching strategies suitable for client-side consumption. Rate limits can be adjusted upon request - contact us if you need higher limits. Note: Despite the 'public' prefix, this endpoint requires an API key for access control and usage monitoring.
            parameters:
                - name: vehicleId
                  in: path
                  description:
                    Filter result by vehicle ID (same as *vehicle_id* from the `/public/vehiclepositions` EP or *id* from GTFS-RT `VehicleDescriptor`)
                    No stop waypoints are not included.
                  required: true
                  schema:
                      type: string
                      example: "service-3-1001"
                - name: scopes
                  in: query
                  schema:
                      type: array
                      items:
                          type: string
                          enum:
                              - info
                              - stop_times
                              - shapes
                              - vehicle_descriptor
                  description: "Choose which scopes to include in response."
                  required: true
                  example: ["info"]
                - in: header
                  name: Accept-Encoding
                  description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                  required: false
                  schema:
                    oneOf:
                        - type: string
                          enum:
                            - gzip
                            - identity
            responses:
                200:
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        application/json; charset=utf-8:
                            schema:
                                allOf:
                                  - $ref: "#/components/schemas/ScopeInfo"
                                  - $ref: "#/components/schemas/ScopeStopTimes"
                                  - $ref: "#/components/schemas/ScopeShapes"
                                  - $ref: "#/components/schemas/ScopeVehicleDescriptor"

                401:
                    $ref: "#/components/responses/UnauthorizedError"
                404:
                    description: Not found

    /v2/public/vehiclepositions/{vehicleId}{gtfsTripId}:
        get:
            tags:
                - 🕐 Public Vehicle Positions (v2)
            summary: GET Vehicle RT data (additional lookup)
            description: |
                Same as `/public/vehiclepositions/{vehicleId}` but with additional lookup by GTFS trip ID. This may be useful when vehicle is serving the previous trip and you want to get info about the next trip.
                Combination of `vehicleId` and `gtfsTripId` is needed because multiple vehicles can serve the same trip, and we want to select the correct one.
                `gtfsTripId` is specified as a path matrix parameter.
                <br><br>Example: `/public/vehiclepositions/service-3-1001;gtfsTripId=115_107_180501`

                ℹ️ Note: This endpoint is optimized for client applications serving many users simultaneously. It provides streamlined data structures and caching strategies suitable for client-side consumption. Rate limits can be adjusted upon request - contact us if you need higher limits. Note: Despite the 'public' prefix, this endpoint requires an API key for access control and usage monitoring.
            parameters:
                - name: vehicleId
                  in: path
                  description:
                    Filter result by vehicle ID (same as *vehicle_id* from the `/public/vehiclepositions` EP or *id* from GTFS-RT `VehicleDescriptor`).
                  required: true
                  schema:
                      type: string
                      example: "service-3-1001"
                - name: gtfsTripId
                  in: path
                  style: matrix
                  explode: false
                  description:
                    Perform additional lookup by GTFS trip ID.
                  required: true
                  schema:
                    type: string
                    example: "115_107_180501"
                - name: scopes
                  in: query
                  schema:
                      type: array
                      items:
                          type: string
                          enum:
                              - info
                              - stop_times
                              - shapes
                              - vehicle_descriptor
                  description: "Choose which scopes to include in response."
                  required: true
                  example: ["info"]
                - in: header
                  name: Accept-Encoding
                  description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                  required: false
                  schema:
                        oneOf:
                            - type: string
                              enum:
                                - gzip
                                - identity
            responses:
                200:
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        application/json; charset=utf-8:
                            schema:
                                allOf:
                                  - $ref: "#/components/schemas/ScopeInfo"
                                  - $ref: "#/components/schemas/ScopeStopTimes"
                                  - $ref: "#/components/schemas/ScopeShapes"
                                  - $ref: "#/components/schemas/ScopeVehicleDescriptor"

                401:
                    $ref: "#/components/responses/UnauthorizedError"
                404:
                    description: Not found

    /v2/public/departureboards:
        get:
            tags:
                - 🕒 Public Departures (v2)
            summary: Get Departure Boards
            description: |
                ℹ️ Note: This endpoint is optimized for client applications serving many users simultaneously. It provides streamlined data structures and caching strategies suitable for client-side consumption. Rate limits can be adjusted upon request - contact us if you need higher limits. Note: Despite the 'public' prefix, this endpoint requires an API key for access control and usage monitoring.
            parameters:
                -   in: query
                    name: stopIds
                    required: true
                    schema:
                        type: array
                        items:
                            type: string
                    example: ["{\"0\": [\"U717Z5P\"]}", "{\"1\": [\"U718Z5P\", \"U719Z5P\"]}"]
                    description: |
                        Groups of stop IDs formatted as JSON (index/priority -> stop IDs). For example ?stopIds[]={\"0\": [\"U717Z5P\"]}&stopIds[]={\"1\": [\"U718Z5P\", \"U719Z5P\"]}.
                        The maximum number of groups is 50. The maximum number of stops in one group is 50. The maximum number of stops combined is 50.
                -   in: query
                    name: limit
                    required: false
                    schema:
                        type: integer
                    description: Limit for each group of departures. Default is 5. Maximum is 30.
                    example: 5
                -   in: query
                    name: routeShortNames
                    required: false
                    schema:
                        type: array
                        items:
                            type: string
                    example: ["27"]
                    description: Default is null
                -   in: query
                    name: minutesAfter
                    required: false
                    schema:
                        type: integer
                        minimum: 0
                        maximum: 360
                    description: Default is 60. Maximum is 360 (6 hours)
                    example: 60
                -   in: query
                    name: minutesBefore
                    required: false
                    schema:
                        type: integer
                        minimum: -359
                        maximum: 30
                    description: "Set the starting point of the departure retrieval window, in minutes, relative to now (or to timeFrom, if used). Positive values will return departures starting earlier in the past. Negative values will return departures starting later in the future. This setting helps account for walking time to the stop. Example: 2 returns departures that left 2 minutes ago. -10 returns departures no earlier than 10 minutes from now. Default is set to 0. Maximum value is 30. Minimum value is -359."
                    example: 0
                -   in: header
                    name: Accept-Encoding
                    description: Indicate the content encoding (usually a compression algorithm) that the client can understand. See [mdn](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding) for more details. Note that for this endpoint, if no value is given, gzip compression will be used by default (the `identity` value can be used to opt out of the default compression).
                    required: false
                    schema:
                        oneOf:
                          - type: string
                            enum:
                              - gzip
                              - identity

            responses:
                200:
                    description: OK
                    headers:
                        Cache-Control:
                            description: Cache control directive for caching proxies
                            schema:
                                type: string
                                example: public, s-maxage=5, stale-while-revalidate=5
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/PublicDepartureGroup"

                400:
                    $ref: "#/components/responses/BadRequestError"
                401:
                    $ref: "#/components/responses/UnauthorizedError"
                404:
                    description: Not found - no stops found for the given query parameters
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    type: array
                                    maxItems: 0
                                    items:
                                        type: object
    /v1/jis/events/custom-format:
        get:
            tags:
                - ⚠ JIS (v1) - internal
            summary: Get all published events in custom format for external use
            parameters:
                - name: displayPeriodStart
                  in: query
                  required: false
                  schema:
                    type: string
                    format: date-time
                    example: "2024-02-29T11:22:20.958Z"
                  description: Sets the beginning of the query window; events are included in the response if any part of their display interval overlaps with the displayPeriodStart to displayPeriodEnd range.
                - name: displayPeriodEnd
                  in: query
                  required: false
                  schema:
                    type: string
                    format: date-time
                    example: "2024-03-03T14:22:20.958Z"
                  description: Sets the end of the query window; events are included in the response if any part of their display interval overlaps with the displayPeriodStart to displayPeriodEnd range.
                - name: organizationNames
                  in: query
                  required: false
                  schema:
                    type: array
                    items:
                      type: string
                      example: "ROPID"
                  description: List of organization names to filter events by.
                - name: type
                  in: query
                  required: false
                  schema:
                    type: string
                    example: "INCIDENT"
                    description: Type of events to filter by.
                    enum:
                      - INCIDENT
                      - DISRUPTION
                      - SERVICE_CHANGE
            responses:
                200:
                    description: OK
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: "#/components/schemas/EventCustomFormat"
                400:
                    $ref: "#/components/responses/BadRequestError"
                401:
                    $ref: "#/components/responses/UnauthorizedError"


components:
    headers:
        LastModified:
            description: Timestamp of the latest resource update.
            schema:
                type: string
                example: "2024-08-12T12:40:30.000Z"
        CacheControlNoCache:
            description: Cache control directive for caching proxies
            schema:
                type: string
                example: no-store, no-cache, must-revalidate
    responses:
        BadRequestError:
            description: Bad request - invalid query parameters
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            error_message:
                                type: string
                                example: "Bad request"
                                nullable: false
                            error_status:
                                type: integer
                                example: 400
                                nullable: false
                            error_info:
                                type: string
                                example: "{...}"
                                nullable: true
                        required:
                            - error_message
                            - error_status

        UnauthorizedError:
            description: API key is missing or invalid
            headers:
                WWW_Authenticate:
                    schema:
                        type: string
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            error_message:
                                type: string
                                example: "Unauthorized. Failed to authenticate user."
                                nullable: false
                            error_status:
                                type: integer
                                example: 401
                                nullable: false
                        required:
                            - error_message
                            - error_status


    parameters:
        DepartureBoardsIds:
            name: ids
            in: query
            description: Get result by GTFS stop_id. Can be used to retrive individual stops and to separate departures of Prague and intercity routes, even if they depart from the same physical stop. A list of GTFS stops can be found in `stops.txt` file of the [GTFS feed](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F9a6a1d8e-45b9-41de-b9ae-0bcec7126876).
            required: false
            schema:
                type: string
                example: "U458Z101P"
        DepartureBoardsAswIds:
            name: aswIds
            in: query
            description: "Get result by ASW ID. First part of the number represents the whole node. Usually it groups the stops of the same name or all stops associated with a metro station. Also returns related train stations in the node. The second part of the number is optional and represents individual stops in the node. Use `_` instead of `/` as a separator or encode the slash sign with `%2F`. A list of ASW IDs can be found in [Prague Open data](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F6ac8381f-ea19-4ea9-8949-92076809dc5a). ⚠️ Note: combination with `includeMetroTrains` is currently not supported, see [issue pid#222](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/222)."
            required: false
            schema:
                type: string
                example: "458_101"
        DepartureBoardsCisIds:
            name: cisIds
            in: query
            description: Get result by CIS ID. A list of CIS IDs can be found in [Prague Open data](https://opendata.praha.eu/datasets/https%3A%2F%2Fapi.opendata.praha.eu%2Flod%2Fcatalog%2F6ac8381f-ea19-4ea9-8949-92076809dc5a).
            required: false
            schema:
                type: number
                example: 28004
        DepartureBoardsNames:
            name: names
            in: query
            description: Get results by exact name of stop (case and whitespace sensitive). May return stops of the same name from different towns. Using `names` in combination with other identifiers will return an intersection of stops with `names` and stops of ASW, CIS or GTFS identifiers in the same node. Use this feature to filter out a subset of stops of the same name while guaranteeing them to be from the desired node only.
            required: false
            schema:
                type: string
                example: "Smíchovské nádraží"
        DepartureBoardsMinutesBefore:
            name: minutesBefore
            in: query
            description: Set the start of interval from which to retrieve departures. Positive numbers are set in past relative to the time of request or `timeFrom` timestamp, negative numbers set the start in the future. Use to compensate for walking distance to a stop. Default is set to 0. Maximum value is 30 because of implemented data retention. Minimum value is -4320 (0 - 3 days GTFS calendar maximum).
            required: false
            schema:
                type: number
                example: 10
        DepartureBoardsMinutesAfter:
            name: minutesAfter
            in: query
            description: Set the end of interval from which to retrieve departures. Positive numbers are set in future relative to the time of request or `timeFrom` timestamp, negative are in the past. The sum of minutesBefore and minutesAfter must be larger than zero. Default is set to 180. Maximum value is 4320 (GTFS calendar maximum). Minimum value is -4350 (0 - 3 days GTFS calendar maximum - 30 minutes data retention).
            required: false
            schema:
                type: number
                example: 60
        DepartureBoardsTimeFrom:
            name: timeFrom
            in: query
            description: Set initial timestamp for time interval given by `minutesBefore` and `minutesAfter`. Use to simulate query time different from now. Use ISO 8601 time format and URL encoded symbols - `%3A` for `:`, `%2B` for `.`, `%2F` for `+`. Time zone is set according to the `preferredTimezone` parameter. Applicable range is -6 hours +2 days from now.
            required: false
            schema:
                type: string
                example: "2021-01-21T06:00:00"
        DepartureBoardsIncludeMetroTrains:
            name: includeMetroTrains
            in: query
            description: "When selecting a node by `name`, when `true`, will include metro and/or train stops that are a member of the same node. I.e. when querying _Na Knížecí_, setting this to `true` will add the metro station _Anděl_ to results as well because both have the same ASW node number 1040. ⚠️ Note: combination with `aswIds` is currently not supported, see [issue pid#222](https://gitlab.com/operator-ict/golemio/code/modules/pid/-/issues/222)."
            required: false
            schema:
                type: boolean
                example: true
        DepartureBoardsAirCondition:
            name: airCondition
            in: query
            description: Enrich departures with vehicle air condition information. Setting to `false` will force all items to be `null`. Useful for disabling the indication of air condition during cold season.
            required: false
            schema:
                type: boolean
                example: true
                default: true
        DepartureBoardsPreferredTimezone:
            name: preferredTimezone
            in: query
            description: Preferred timezone offset as defined in the IANA Time zone database in the form of Country/City (use an URL encoded slash sign `%2F` or use an underscore _ symbol), default is Europe/Prague
            required: false
            schema:
                type: string
                example: "Europe_Prague"
        DepartureBoardsOrder:
            name: order
            in: query
            description: >-
                Valid entries: `real` (default), `timetable`. Order results by predicted time including trip delay or by timetable time.
            required: false
            schema:
                type: string
                example: "real"
        DepartureBoardsFilter:
            name: filter
            in: query
            description: >-
                Valid entries: `none` (default), `routeOnce`, `routeOnceFill`, `routeHeadingOnce`, `routeHeadingOnceFill`, `routeHeadingOnceNoGap`, `routeHeadingOnceNoGapFill`. Defines how should be the list of departures returned. `none` returns all departures within the time and item limit. `routeOnce` returns exactly one occurence of departure for each `route_id`. Works best when querying a single stop. `routeHeadingOnce` returns one entry for each pair of `route_id` and `trip_headsign`, i.e. returns departures for routes that have multiple end stops. Works well when quering one or more stops in a node. `...NoGap` will ensure that departures with a distinct trip headsign will not be displayed if they should arrive too far in the future. `...Fill` attributes will behave the same as their namesakes but afterwards will fill the rest of request up to `total/limit` with further departures. Use to have every line/destination represented and have the display filled with departures at the same time.
            required: false
            schema:
                type: string
                example: "routeOnce"
        DepartureBoardsSkip:
            name: skip
            in: query
            description: |
                Filters out trips matching the given states.
                Multiple filters can be applied using array syntax, e.g., `&skip[]=canceled&skip[]=atStop`.
                Using both `untracked` and `missing` will exclude all untracked vehicles, as missing vehicles are a subset of untracked vehicles.
                We recommend using `missing` instead of `untracked`, as skipping all untracked vehicles may result in departures not appearing in the API response until the last few minutes before departure, especially for departure boards near the starting station/stop.
            required: false
            schema:
                type: string
                example: "canceled"
                enum:
                  - canceled
                  - atStop
                  - untracked
                  - missing
        DepartureBoardsLimit:
            name: limit
            in: query
            description: Limits the number of items in response. The maximum is 1000 (default value is 20).
            required: false
            schema:
                type: number
                format: int64
                example: 0
        DepartureBoardsTotal:
            name: total
            in: query
            description: Sets the number of items that will be queried. Use in conjunction with `offset`. Up to `total - offset`, but not more than `limit` items will be then returned. If unset, is same as `limit`. The maximum is 1000 (default value is 20).
            required: false
            schema:
                type: number
                format: int64
                example: 0
        DepartureBoardsOffset:
            name: offset
            in: query
            description: Number of the initial departures that are skipped. Useful for multi-page displays.
            required: false
            schema:
                type: number
                format: int64
                example: 0
        DepartureBoardsAppendHeadsignsLimit:
            name: appendHeadsignsLimit
            in: query
            description: >-
                Number of stops before route switch at which headsign is enriched with continuation info.
                When set and a departure has route-switch data, headsign becomes `&lt;headsign&gt; → &lt;next_route&gt; &lt;next_headsign&gt;`.
            required: false
            schema:
                type: integer
                minimum: 0
                example: 3

    schemas:
        RepeatOnlyTimes:
            title: Repeat Only Times
            type: object
            description: Daily repeat schedule for the infotext.
            required:
                - time_start
                - time_end
            properties:
                time_start:
                    type: string
                    nullable: true
                    description: Daily repeat window start time (HH:MM:SS, Europe/Prague). Null when repeat is disabled.
                    example: "23:00:00"
                time_end:
                    type: string
                    nullable: true
                    description: Daily repeat window end time (HH:MM:SS, Europe/Prague). When start >= end the window wraps around midnight. Null when repeat is disabled.
                    example: "04:30:00"

        GTFSService:
            title: GTFS Service
            type: object
            properties:
                end_date:
                    type: string
                    example: "20190311"
                last_modify:
                    type: string
                    example: "2018-09-09 12:32:45"
                    nullable: true
                monday:
                    type: number
                    format: int64
                    example: 1
                tuesday:
                    type: number
                    format: int64
                    example: 1
                wednesday:
                    type: number
                    format: int64
                    example: 1
                thursday:
                    type: number
                    format: int64
                    example: 1
                friday:
                    type: number
                    format: int64
                    example: 1
                saturday:
                    type: number
                    format: int64
                    example: 1
                sunday:
                    type: number
                    format: int64
                    example: 1
                service_id:
                    type: string
                    example: "1111111-1"
                start_date:
                    type: string
                    example: "20190226"
            required:
                - end_date
                - monday
                - tuesday
                - wednesday
                - thursday
                - friday
                - saturday
                - sunday

        GTFSTrip:
            title: GTFS Trip
            type: object
            properties:
                trip_id:
                    type: string
                    example: "991_1165_190107"
                bikes_allowed:
                    type: number
                    format: int64
                    example: 1
                block_id:
                    type: string
                    nullable: true
                    example: ""
                direction_id:
                    type: number
                    format: int64
                    example: 0
                exceptional:
                    type: number
                    format: int64
                    example: 0
                last_modify:
                    type: string
                    example: "2018-09-09 12:32:45"
                    nullable: true
                route_id:
                    type: string
                    example: "L991"
                service_id:
                    type: string
                    example: "1111100-1"
                shape_id:
                    type: string
                    example: "L991V3"
                trip_headsign:
                    type: string
                    example: "Nemocnice Motol"
                wheelchair_accessible:
                    type: number
                    format: int64
                    example: 1
            required:
                - trip_id
                - bikes_allowed
                - route_id
                - service_id
                - shape_id
                - trip_headsign
                - wheelchair_accessible

        GTFSStop:
            title: GTFS Stop
            type: object
            properties:
                location_type:
                    type: number
                    format: int64
                    example: 0
                parent_station:
                    type: string
                    nullable: true
                    example: "U118S1"
                platform_code:
                    type: string
                    example: "A"
                stop_id:
                    type: string
                    example: "U118Z101P"
                stop_name:
                    type: string
                    example: "Flora"
                wheelchair_boarding:
                    type: number
                    format: int64
                    example: 2
                zone_id:
                    type: string
                    example: "P"
                level_id:
                    type: string
                    nullable: true
                    example: "U118L2"
            required:
                - location_type
                - parent_station
                - platform_code
                - stop_id
                - stop_name
                - wheelchair_boarding
                - zone_id
                - level_id

        GTFSStopTime:
            title: GTFS Stop Time
            type: object
            properties:
                arrival_time:
                    type: string
                    example: "13:12:05"
                departure_time:
                    type: string
                    example: "13:12:35"
                drop_off_type:
                    type: string
                    example: "0"
                last_modify:
                    type: string
                    example: "2018-09-09 12:32:45"
                    nullable: true
                pickup_type:
                    type: string
                    example: "0"
                shape_dist_traveled:
                    type: number
                    format: float
                    example: 3.73622
                stop_headsign:
                    type: string
                    example: " "
                stop_id:
                    type: string
                    example: "U921Z102P"
                stop_sequence:
                    type: number
                    format: int64
                    example: 4
                trip_id:
                    type: string
                    example: "991_1156_180709"
            required:
                - arrival_time
                - departure_time
                - drop_off_type
                - pickup_type
                - shape_dist_traveled
                - stop_id
                - stop_sequence
                - trip_id

        GTFSShape:
            title: GTFS Shape
            type: object
            properties:
                shape_dist_traveled:
                    type: number
                    format: float
                    example: 16.46309
                shape_id:
                    type: string
                    example: "L991V2"
                shape_pt_sequence:
                    type: number
                    format: int64
                    example: 123
            required:
                - shape_dist_traveled
                - shape_id
                - shape_pt_sequence

        GTFSRoute:
            title: GTFS Route
            type: object
            properties:
                agency_id:
                    type: string
                    example: "99"
                is_night:
                    type: boolean
                    example: false
                is_regional:
                    type: boolean
                    example: false
                is_substitute_transport:
                    type: boolean
                    example: false
                last_modify:
                    type: string
                    example: "2018-09-09 12:32:45"
                    nullable: true
                route_color:
                    type: string
                    example: "00A562"
                route_desc:
                    type: string
                    example: null
                    nullable: true
                route_id:
                    type: string
                    example: "L991"
                route_long_name:
                    type: string
                    example: "Nemocnice Motol - Petřiny - Skalka - Depo Hostivař"
                route_short_name:
                    type: string
                    example: "A"
                route_text_color:
                    type: string
                    example: "FFFFFF"
                route_type:
                    type: number
                    example: 1
                route_url:
                    type: string
                    example: "https://pid.cz/linka/A"
            required:
                - agency_id
                - is_night
                - is_regional
                - is_substitute_transport
                - route_color
                - route_id
                - route_long_name
                - route_short_name
                - route_text_color
                - route_type
                - route_url

        Point:
            title: Point
            type: array
            minItems: 2
            maxItems: 2
            items:
                type: number
                format: float
            example:
                - 14.4633
                - 50.07827

        FeaturePoint:
            title: Feature Point
            type: object
            properties:
                geometry:
                    type: object
                    properties:
                        type:
                            type: string
                            example: "Point"
                        coordinates:
                            $ref: "#/components/schemas/Point"
                    required:
                        - coordinates
                        - type
                properties:
                    type: object
                type:
                    type: string
                    example: "Feature"
            required:
                - geometry
                - properties
                - type

        VehiclepositionCompound:
            title: Vehicleposition Compound
            type: object
            properties:
                trip:
                    description: Trip properties
                    $ref: "#/components/schemas/VehiclepositionTrip"
                last_position:
                    description: Properties of last known position
                    $ref: "#/components/schemas/VehiclepositionPosition"
                all_positions:
                    type: object
                    description: All known positions with their properties
                    properties:
                        type:
                            type: string
                            example: "FeatureCollection"
                        features:
                            type: array
                            items:
                                allOf:
                                    - $ref: "#/components/schemas/FeaturePoint"
                                    - type: object
                                      properties:
                                          properties:
                                              $ref: "#/components/schemas/VehiclepositionPosition"
                    required:
                        - type

        VehiclepositionTrip:
            title: Vehicleposition Trip
            type: object
            properties:
                agency_name:
                    type: object
                    properties:
                        real:
                            type: string
                            description: Agency name that normally operates the trip
                            example: "OAD KO Kolín"
                        scheduled:
                            type: string
                            description: Agency name that currently operates the trip (normally identical to planned_agency_name)
                            example: "OAD KO Kolín"
                    required:
                        - real
                        - scheduled
                cis:
                    type: object
                    description: All properties that come from nation central information system
                    properties:
                        line_id:
                            type: string
                            description: Full line number
                            example: "100381"
                        trip_number:
                            type: number
                            format: int64
                            description: Trip number (unique within specific cis_line_id)
                            example: 29
                    required:
                        - line_id
                        - trip_number
                sequence_id:
                    type: number
                    format: int64
                    description: Identifier of trip sequence operated by a single vehicle
                    example: 1
                origin_route_name:
                    type: string
                    description: Name of the route from which the vehicle originates
                    example: "381"
                gtfs:
                    type: object
                    description: All properties tied with GTFS data format
                    properties:
                        route_id:
                            type: string
                            description: Identifier of the owner route in the GTFS Static feed
                            example: "L381"
                        route_short_name:
                            type: string
                            description: Identification of the line used for the public
                            example: "381"
                        route_type:
                            type: number
                            description: Identifier of the route type in the GTFS Static feed
                            example: 1
                        trip_id:
                            type: string
                            description: Identifier of the trip in the GTFS Static feed
                            example: "381_51_180728"
                        trip_headsign:
                            type: string
                            description: Heading of the trip (identical to what is shown on the bus)
                            nullable: true
                            example: "Sídliště Modřany"
                    required:
                        - route_id
                        - route_short_name
                        - route_type
                        - trip_id
                start_timestamp:
                    type: string
                    description: Timestamp of arrival time in first stop (UTC)
                    example: "2019-03-18T11:00:00.000Z"
                vehicle_type:
                    description: Type of vehicle
                    $ref: "#/components/schemas/VehiclepositionVehicleType"
                vehicle_registration_number:
                    type: number
                    format: int64
                    description: Four-digit identifier of the vehicle in the system
                    example: 8635
                wheelchair_accessible:
                    type: boolean
                    description: Determines whether the vehicle has wheelchair access
                    example: true
                air_conditioned:
                    type: boolean
                    description: Determines whether the vehicle has air conditioning. If `null`, the information is not available or the vehicle's registration number is not known.
                    nullable: true
                    example: false
                usb_chargers:
                    type: boolean
                    description: Determines whether the vehicle has USB chargers. If `null`, the information is not available or the vehicle's registration number is not known.
                    nullable: true
                    example: false
            required:
                - sequence_id
                - origin_route_name
                - start_timestamp
                - vehicle_registration_number
                - wheelchair_accessible
                - air_conditioned

        VehiclepositionVehicleType:
            title: Vehicleposition Vehicle Type
            type: object
            properties:
                id:
                    type: number
                    format: int64
                    description: Unique id code of type
                    example: 1
                description_cs:
                    type: string
                    description: Description of type in Czech
                    example: "Autobus"
                description_en:
                    type: string
                    description: Description of type in English
                    example: "Bus"
            required:
                - id
                - description_cs
                - description_en

        VehiclepositionPosition:
            title: Vehicleposition Position
            type: object
            properties:
                bearing:
                    type: number
                    format: int64
                    nullable: true
                    description: Bearing, in degrees (0 = north, 90 = east, 180 = south, 270 = west)
                    example: 34
                delay:
                    type: object
                    properties:
                        actual:
                            type: number
                            format: int64
                            nullable: true
                            description: Current delay, in seconds, based on actual location of a trip on its shape between stops
                            example: 213
                        last_stop_arrival:
                            type: number
                            format: int64
                            nullable: true
                            description: Delay, in seconds, at the last confirmed stop on arrival. Null, if the arrival time to the last stop equal departure time
                            example: 23
                        last_stop_departure:
                            type: number
                            format: int64
                            nullable: true
                            description: Delay, in seconds, at the last confirmed stop on departure. Null, if it was a terminal stop.
                            example: -84
                last_stop:
                    description: Properties for last stop passed
                    properties:
                        id:
                            type: string
                            nullable: true
                            description: GTFS Static identifier of the last stop passed on the route of the trip
                            example: "331"
                        sequence:
                            type: number
                            nullable: true
                            description: Sequence number of the last stop passed on the route of the trip
                            example: 11
                        arrival_time:
                            type: string
                            nullable: true
                            description: Scheduled arrival time to the last passed stop (UTC)
                            example: "2019-03-18T11:00:00.000Z"
                        departure_time:
                            type: string
                            nullable: true
                            description: Scheduled departure time from the last passed stop (UTC)
                            example: "2019-03-18T11:04:00.000Z"
                    required:
                        - id
                        - sequence
                        - arrival_time
                        - departure_time
                next_stop:
                    description: Properties of the next stop on the route of the trip
                    properties:
                        id:
                            type: string
                            nullable: true
                            description: GTFS Static identifier of the next stop on the route of the trip
                            example: "334"
                        sequence:
                            type: number
                            nullable: true
                            description: Sequence number of the next stop on the route of the trip
                            example: 12
                        arrival_time:
                            type: string
                            nullable: true
                            description: Scheduled arrival time of the next stop on the route of the trip
                            example: "2019-03-18T11:10:00.000Z"
                        departure_time:
                            type: string
                            nullable: true
                            description: Scheduled departure time of the next stop on the route of the trip
                            example: "2019-03-18T11:14:00.000Z"
                    required:
                        - id
                        - sequence
                        - arrival_time
                        - departure_time
                is_canceled:
                    type: boolean
                    nullable: true
                    description: True, if the trip was canceled. Other fields about the position have non-defined values in case this value is true
                    example: false
                origin_timestamp:
                    type: string
                    description: >
                        Transmission time of the message from the vehicle (UTC).
                        Corresponds to the lat/lng position reported in the same message.
                    example: "2019-03-18T11:00:00.000Z"
                speed:
                    type: number
                    format: int64
                    nullable: true
                    description: Current speed of the vehicle (kilometers per hour)
                    example: 34
                shape_dist_traveled:
                    type: string
                    nullable: true
                    description: Number of kilometers traveled on the route
                    example: "12.3"
                tracking:
                    type: boolean
                    description: True if trip is tracked, meaning that trip is on its track.
                    example: false
            required:
                - bearing
                - is_canceled
                - origin_timestamp

        PIDDepartureBoard:
            title: PID Departure Board
            type: object
            properties:
                stops:
                    type: array
                    description: List of stops in the requested set and their properties.
                    items:
                        $ref: "#/components/schemas/PIDDepartureBoardStop"
                departures:
                    type: array
                    description: List of departures.
                    items:
                        $ref: "#/components/schemas/PIDDepartureBoardDeparture"
                infotexts:
                    type: array
                    description: List of active infotexts for selected stops.
                    items:
                        allOf:
                            - $ref: "#/components/schemas/PIDDepartureBoardInfotext"
                            - type: object
                              properties:
                                related_stops:
                                    type: array
                                    description: ""
                                    items:
                                        type: string
                                        example: "U118S1"
                                        description: GTFS station IDs for which the infotexts apply.


        PIDDepartureBoardDeparture:
            title: PID Departure Board Departure
            type: object
            properties:
                arrival_timestamp:
                    $ref: "#/components/schemas/PIDDepartureBoardStopTime"
                delay:
                    $ref: "#/components/schemas/PIDDepartureBoardDelay"
                departure_timestamp:
                    $ref: "#/components/schemas/PIDDepartureBoardStopTime"
                last_stop:
                    $ref: "#/components/schemas/PIDDepartureBoardLastStop"
                route:
                    $ref: "#/components/schemas/PIDDepartureBoardRoute"
                stop:
                    $ref: "#/components/schemas/PIDDepartureBoardStopReference"
                trip:
                    $ref: "#/components/schemas/PIDDepartureBoardTrip"

        PIDDepartureBoardInfotext:
            title: PID Departure Board Infotext
            type: object
            properties:
                valid_from:
                    type: string
                    description: Intended time of infotext publishing in ISO String.
                    nullable: true
                    example: "2024-02-07T13:11:00+01:00"
                valid_to:
                    type: string
                    description: Intended time of infotext removal in ISO String. If `null`, the infotext is valid indefinitely
                    nullable: true
                    example: "2024-02-08T13:11:00+01:00"
                text:
                    type: string
                    description: Information text in Czech.
                    example: "Nehoda na trase, odklon linek mimo tuto stanici."
                text_en:
                    type: string
                    description: Information text in English.
                    nullable: true
                    example: "Trips are cancelled due to accident on route."
                display_type:
                    type: string
                    enum:
                      - inline
                      - general
                    description: Type of display on board by the intended form of presentation (where applicable). Enumerating `inline` (to be presented along with departures, usually in a marquee), `general` (to be displayed full screen instead of departures).
                    example: "inline"

            required:
                - valid_from
                - valid_to
                - text
                - text_en
                - display_type

        PIDDepartureBoardTrip:
            title: PID Departure Board Trip
            type: object
            properties:
                direction:
                    type: string
                    nullable: true
                    description: >-
                        The equivalent of arrows that are printed on stop signs. Indicates the direction the vehicle will continue at stops where routes split up relative to the direction of motion of the vehicle. Valid values: `null` (do not display the arrow), `top`, `top-right`, `right`, `bottom-right`, `bottom`, `bottom-left`, `left`, `top-left`.
                    example: "top-left"
                headsign:
                    type: string
                    description: >-
                        Trip headsign (usually the final stop). When the `appendHeadsignsLimit` parameter is used and the departure
                        has route-switch data, this field may contain appended continuation info in the form
                        `&lt;headsign&gt; → &lt;next_route&gt; &lt;next_headsign&gt;`.
                    example: "Chodov"
                id:
                    type: string
                    description: GTFS trip ID.
                    example: "140_224_200302"
                is_at_stop:
                    type: boolean
                    description: True if vehicle is physically present in the stop. Applicable only to connections with delay available.
                    example: true
                is_canceled:
                    type: boolean
                    description: True if the trip is canceled.
                    example: false
                is_wheelchair_accessible:
                    type: boolean
                    description: True if the vehicle being used on this trip is wheelchair accessible. Metro trips are deemed accessible if the station is accessible.
                    example: false
                is_air_conditioned:
                    type: boolean
                    description: Determines whether the vehicle has air conditioning. If `null`, the information is not available or the vehicle's registration number is not known.
                    nullable: true
                    example: false
                short_name:
                    type: string
                    nullable: true
                    description: The number of a particular train, otherwise `null`.
                    example: "Os 9327"
            required:
                - direction
                - headsign
                - id
                - is_at_stop
                - is_canceled
                - is_wheelchair_accessible
                - is_air_conditioned
                - short_name

        PIDDepartureBoardLastStop:
            title: PID Departure Board Last Stop
            type: object
            properties:
                name:
                    type: string
                    nullable: true
                    description: Name of the last stop the vehicle reported from.
                    example: "Prosecká"
                id:
                    type: string
                    nullable: true
                    description: GTFS ID of the stop.
                    example: "U754Z1P"
            required:
                - name
                - id

        PIDDepartureBoardStop:
            title: PID Departure Board Stop
            type: object
            properties:
                level_id:
                    type: string
                    nullable: true
                    description: Level of metro stops.
                    example: "U118L2"
                location_type:
                    type: number
                    description: Describes the type of stop, is always `0`.
                    example: 0
                parent_station:
                    type: string
                    description: A GTFS identifier of the parent station for metro platforms.
                    example: "U118S1"
                platform_code:
                    type: string
                    description: Human-friendly code used to distinguish a stop inside a node. Multiple GTFS codes can share a platform code.
                    example: "A"
                stop_lat:
                    type: number
                    format: float
                    description: Latitude of the stop marker or the center of metro or train station platform.
                    example: 50.4
                stop_lon:
                    type: number
                    format: float
                    description: Longitude of the stop marker or the center of metro or train station platform.
                    example: 50.4
                asw_id:
                    $ref: "#/components/schemas/ASWid"
                    description: ASW ID of the stop.
                    nullable: true
                stop_id:
                    type: string
                    description: GTFS ID of the stop. Stops that will be valid in the future have the date of the start of their validity appended, i.e. `U476Z51P_210401`.
                    example: "U118Z101P"
                stop_name:
                    type: string
                    description: Name of the stop.
                    example: "Flora"
                wheelchair_boarding:
                    type: number
                    description: Indicates accessibility of the stop by wheelchairs. `0` – unknown, `1` – accessible, `2` – inaccessible
                    example: 2
                zone_id:
                    type: string
                    description: PID fare zone. Multiple zones are separated by a comma.
                    example: "P"
            required:
                - level_id
                - location_type
                - parent_station
                - platform_code
                - stop_lat
                - stop_lon
                - asw_id
                - stop_id
                - stop_name
                - wheelchair_boarding
                - zone_id

        ASWid:
            title: ASW id
            type: object
            properties:
                node:
                    type: number
                    description: ASW ID of node
                    example: 100
                stop:
                    type: number
                    description: Identification of the stop within the node.
                    example: 2
            required:
                - node
                - stop

        Icons:
            type: array
            example: ["metro", "c"]
            minItems: 0
            items:
                type: string
                nullable: false
                enum:
                    - metro
                    - tram
                    - bus
                    - trolleybus
                    - train
                    - funicular
                    - aerial
                    - ferry
                    - airport
                    - airport_bus
                    - airport_trolleybus
                    - airport_train
                    - a
                    - b
                    - c
                    - d
                    - s_bahn
                    - space

        PIDDepartureBoardStopReference:
            title: PID Departure Board Stop Reference
            type: object
            properties:
                id:
                    type: string
                    description: GTFS ID of the stop the vehicle is stopping at.
                    example: "U754Z1P"
                platform_code:
                    type: string
                    nullable: true
                    description: For trains it is the platform number the train is stopping at. Is `null` if not known. For other modes of transport, returns the platform code from `stops[]`.
                    example: "B"
            required:
                - id
                - platform_code

        PIDDepartureBoardDelay:
            title: PID Departure Board Delay
            type: object
            properties:
                is_available:
                    type: boolean
                    description: True if information about trip's delay is available.
                    example: false
                minutes:
                    type: number
                    nullable: true
                    description: Delay rounded down to minutes.
                    example: 3
                seconds:
                    type: number
                    nullable: true
                    description: Delay in seconds.
                    example: 176
            required:
                - is_available
                - minutes
                - seconds

        PIDDepartureBoardStopTime:
            title: PID Departure Board Stop Time
            type: object
            properties:
                predicted:
                    type: string
                    description: Time of arrival/departure including realtime delay as an ISO String (UTC). Is `null` on start/end stops. Is same as scheduled time when no delay is available. Is `null` on first/last stops.
                    example: "2019-05-18T07:38:20.000Z"
                scheduled:
                    type: string
                    description: Time of arrival/departure as ISO string (UTC).
                    example: "2019-05-18T07:38:00.000Z"
                minutes:
                    type: string
                    description: Number of minutes till departure. If it is less than 30 second it returns value "<1".
                    example: "<1"
            required:
                - predicted
                - scheduled

        PIDDepartureBoardRoute:
            title: PID Departure Board Route
            type: object
            properties:
                short_name:
                    type: string
                    nullable: true
                    description: Route designation used by PID.
                    example: "140"
                type:
                    type: number
                    nullable: true
                    description: GTFS route type. `0` – tram, `1` – metro, `2` – train, `3` – bus, `4` – ferry, `7` – funicular, `11` – trolleybus
                    example: 3
                is_night:
                    type: boolean
                    description: True if route is a designated night route.
                    example: true
                is_regional:
                    type: boolean
                    description: True if route serves areas outside Prague boundaries.
                    example: true
                is_substitute_transport:
                    type: boolean
                    description: True if route provides substitute service for another route.
                    example: true
            required:
                - short_name
                - type
                - is_night
                - is_regional
                - is_substitute_transport

        VehiclePositionsFeature:
            type: object
            properties:
                geometry:
                    type: object
                    description: GeoJson geometry
                    properties:
                        coordinates:
                            oneOf:
                                -   type: array
                                    items:
                                        type: number
                                    example: [14.441252, 50.109318]
                                    description: Point
                                -   type: array
                                    items:
                                        type: array
                                        items:
                                            type: array
                                            items:
                                                type: number
                                    example:
                                      [[
                                          [14.50823156003554, 50.10498927328214],
                                          [14.505782430390298, 50.1031042405622],
                                          [14.509701037821998, 50.1029471511537],
                                          [14.50823156003554, 50.10498927328214]
                                      ]]
                                    description: Polygon
                                -   type: array
                                    items:
                                        type: array
                                        items:
                                            type: array
                                            items:
                                                type: array
                                                items:
                                                    type: number
                                    example:
                                      [
                                          [[
                                              [14.50823156003554, 50.10498927328214],
                                              [14.505782430390298, 50.1031042405622],
                                              [14.509701037821998, 50.1029471511537],
                                              [14.50823156003554, 50.10498927328214]
                                          ]],
                                          [[
                                              [14.50823156003554, 50.10498927328214],
                                              [14.505782430390298, 50.1031042405622],
                                              [14.509701037821998, 50.1029471511537],
                                              [14.50823156003554, 50.10498927328214]
                                          ]]
                                      ]
                                    description: MultiPolygon
                        type:
                            type: string
                            enum:
                                - Point
                                - Polygon
                                - MultiPolygon
                properties:
                    type: object
                    properties:
                        gtfs_trip_id:
                          type: string
                          example: "705_735_231002"
                        route_type:
                          type: string
                          example: bus
                        gtfs_route_short_name:
                          type: string
                          example: '705'
                        bearing:
                          type: number
                          nullable: true
                          example: 221
                        delay:
                          type: number
                          nullable: true
                          example: 20
                        vehicle_id:
                            type: string
                            example: "service-3-8585"
                        state_position:
                            $ref: "#/components/schemas/StatePosition"
                    required:
                        - gtfs_trip_id
                        - route_type
                        - gtfs_route_short_name
                type:
                    type: string
                    example: Feature

        ScopeInfo:
            type: object
            properties:
                gtfs_trip_id:
                    type: string
                    nullable: false
                    example: "115_107_180501"
                route_type:
                    type: string
                    nullable: false
                    enum: ["tram", "metro", "train", "bus", "ferry", "funicular", "trolleybus", "ext_miscellaneous"]
                    example: "bus"
                route_short_name:
                    type: string
                    nullable: false
                    example: "22"
                shape_id:
                    type: string
                    nullable: true
                    example: "L22V3"
                origin_route_name:
                    type: string
                    nullable: true
                    example: "22"
                run_number:
                    type: integer
                    nullable: true
                    example: 1
                trip_headsign:
                    type: string
                    nullable: true
                    example: "Bílá Hora"
                geometry:
                    $ref: "#/components/schemas/GeometryPoint"
                shape_dist_traveled:
                    type: number
                    nullable: true
                    description: "Distance travelled from the first stop of the trip."
                    example: 22.804
                bearing:
                    type: integer
                    nullable: true
                    description: "Bearing of the vehicle in degrees (0-360)."
                    example: 45
                delay:
                    type: integer
                    nullable: true
                    description: "Delay of the vehicle in seconds."
                    example: 10
                state_position:
                    nullable: true
                    $ref: "#/components/schemas/StatePosition"
                last_stop_sequence:
                    type: integer
                    nullable: true
                    description: index of last stop passed by the vehicle
                    example: 3
                origin_timestamp:
                    type: string
                    nullable: true
                    description: >
                        Transmission time of the last message from the vehicle.
                        Corresponds to the lat/lng position reported in the same message.
                    example: "2023-12-06T12:00:00+01:00"

        ScopeStaticInfo:
            type: object
            properties:
                gtfs_trip_id:
                    type: string
                    nullable: false
                    example: "115_107_180501"
                route_type:
                    type: string
                    nullable: false
                    enum: ["tram", "metro", "train", "bus", "ferry", "funicular", "trolleybus", "ext_miscellaneous"]
                    example: "bus"
                route_short_name:
                    type: string
                    nullable: false
                    example: "22"
                shape_id:
                    type: string
                    nullable: true
                    example: "L22V3"
                origin_route_name:
                    type: string
                    nullable: true
                    example: "22"
                run_number:
                    type: integer
                    nullable: true
                    example: 1
                trip_headsign:
                    type: string
                    nullable: true
                    example: "Bílá Hora"

        ScopeStopTimes:
            type: object
            properties:
                stop_times:
                    $ref: "#/components/schemas/PublicTripStopTimeFeatureCollection"

        ScopeStaticStopTimes:
            type: object
            properties:
                stop_times:
                    $ref: "#/components/schemas/PublicTripStaticStopTimeFeatureCollection"

        ScopeShapes:
            type: object
            properties:
                shapes:
                    $ref: "#/components/schemas/PublicTripShapeFeatureCollection"

        ScopeVehicleDescriptor:
            type: object
            properties:
                vehicle_descriptor:
                    type: object
                    properties:
                        operator:
                            type: string
                            nullable: true
                            example: "DPP"
                        vehicle_type:
                            type: string
                            nullable: true
                            description: "Vehicle manufacturer and type (model)"
                            example: "Solaris Urbino 8.9 LE"
                        is_wheelchair_accessible:
                            type: boolean
                            nullable: true
                            example: true
                        is_air_conditioned:
                            type: boolean
                            nullable: true
                            example: false
                        has_usb_chargers:
                            type: boolean
                            nullable: true
                            example: false
                        vehicle_registration_number:
                            type: string
                            nullable: true
                            example: "1001"

        ScopeStaticVehicleDescriptor:
            type: object
            properties:
                vehicle_descriptor:
                    type: object
                    properties:
                        is_wheelchair_accessible:
                            type: boolean
                            nullable: true
                            example: true

        StatePosition:
            type: string
            example: at_stop
            enum:
                - at_stop
                - before_track
                - before_track_delayed
                - canceled
                - off_track
                - on_track
            description: |
                - `at_stop` - The position is tracking and the closest anchor point or metro rail track segment is a stop.
                - `before_track` - The position is not tracking and either the trip's previous position is not known, or the previous position's state is `at_stop` or `on_track`.
                - `before_track_delayed` - The position has a delay prediction based on the vehicle's previous trip.
                - `canceled` - The position is canceled.
                - `off_track` - The position is tracking and the vehicle is 200+ meters from the closest anchor point or metro rail track segment of its track. For metro positions, it is additionally required that the vehicle's message attributes `tm` and `odch` or less than or equal to the arrival to the final stop.
                - `on_track` - The position is tracking, but is neither `at_stop` nor `off_track`.

                The following states also exist internally but are excluded from the API output:
                - `after_track` - The position is not tracking and the trip's last known position is tracking. For metro positions, this can also mean that it is tracking, the vehicle is 200+ meters from the closest metro rail track segment of its track and the vehicle's message attributes `tm` and `odch` or higher than the arrival to the final stop. For other positions from TCP sources (DPP buses and trams), this can also mean that it is tracking and the vehicle sent a message while at the final stop or sent a message with the `tjr` attribute higher than the arrival to the final stop.
                - `after_track_delayed` - The same as `after_track`, but the position always has defined delay (not null) if possible to deduct from GTFS static data and origin timestamp. Essentially, it means the vehicle is `at_stop` at the very last stop of the trip. The delay is also propagated to the next trip of the vehicle, unlike the `after_track` state.
                - `duplicate` - The position is not tracking, the trip's last known position is tracking and there is another position with identical `origin_timestamp`.
                - `invisible` - The position is not tracking and either:
                    - the trip's previous position is not known or the previous position's state is `at_stop` or `on_track`, and the vehicle is on its way from the garage;
                    - or the trip's last known position is tracking and the vehicle is on its way to the garage.
                - `mismatched` - The position does not make sense (e.g. it was sent late and thus has a mismatched stop sequence).
                - `not_public` - The position belongs to a non-public trip (trip without run schedule).
                - `unknown` - The position is not yet processed (or was determined to never be processed) or has been invalidated (e.g. due to a vehicle repeating some part of the trip).

        PublicTripShapeFeatureCollection:
            type: object
            properties:
                features:
                    type: array
                    items:
                        type: object
                        properties:
                            geometry:
                                $ref: "#/components/schemas/GeometryPoint"
                            properties:
                                type: object
                                properties:
                                    shape_dist_traveled:
                                        type: number
                                        nullable: false
                                        description: "Distance from the first stop of the trip."
                                        example: 0
                            type:
                                type: string
                                example: Feature
                type:
                    type: string
                    example: FeatureCollection

        PublicTripStopTimeFeatureCollection:
            type: object
            description: "List of stop and arrival, departure times for the trip."
            properties:
                features:
                    type: array
                    items:
                        type: object
                        properties:
                            geometry:
                                $ref: "#/components/schemas/GeometryPoint"
                            properties:
                                type: object
                                properties:
                                    stop_name:
                                        type: string
                                        nullable: false
                                        example: "Nádraží Veleslavín"
                                    stop_sequence:
                                        type: number
                                        nullable: false
                                        example: 3
                                    zone_id:
                                        type: string
                                        nullable: true
                                        example: "P"
                                    is_wheelchair_accessible:
                                        type: boolean
                                        nullable: true
                                        example: true
                                    shape_dist_traveled:
                                        type: number
                                        nullable: false
                                        example: 0
                                    arrival_time:
                                        type: string
                                        nullable: false
                                        description: "Time for arrival to the stop according to trip schedule."
                                        example: "12:00:00"
                                    departure_time:
                                        type: string
                                        nullable: false
                                        description: "Time for departure from the stop according to trip schedule."
                                        example: "12:00:10"
                                    realtime_arrival_time:
                                        type: string
                                        nullable: true
                                        description: "Time for arrival to the stop according to realtime data or prediction based on current delay."
                                        example: "12:00:20"
                                    realtime_departure_time:
                                        type: string
                                        nullable: true
                                        description: "Time for departure from the stop according to realtime data or prediction based on current delay."
                                        example: "12:00:25"
                            type:
                                type: string
                                example: Feature

                type:
                    type: string
                    example: FeatureCollection

        PublicTripStaticStopTimeFeatureCollection:
            type: object
            description: "List of stop and arrival, departure times for the trip. No stop waypoints are not included."
            properties:
                features:
                    type: array
                    items:
                        type: object
                        properties:
                            geometry:
                                $ref: "#/components/schemas/GeometryPoint"
                            properties:
                                type: object
                                properties:
                                    stop_name:
                                        type: string
                                        nullable: false
                                        example: "Nádraží Veleslavín"
                                    stop_sequence:
                                        type: number
                                        nullable: false
                                        example: 3
                                    zone_id:
                                        type: string
                                        nullable: true
                                        example: "P"
                                    is_wheelchair_accessible:
                                        type: boolean
                                        nullable: true
                                        example: true
                                    shape_dist_traveled:
                                        type: number
                                        nullable: false
                                        example: 0
                                    arrival_time:
                                        type: string
                                        nullable: false
                                        description: "Time for arrival to the stop according to trip schedule."
                                        example: "12:00:00"
                                    departure_time:
                                        type: string
                                        nullable: false
                                        description: "Time for departure from the stop according to trip schedule."
                                        example: "12:00:10"
                            type:
                                type: string
                                example: Feature

                type:
                    type: string
                    example: FeatureCollection

        GeometryPoint:
            type: object
            description: GeoJson point
            properties:
                coordinates:
                    type: array
                    items:
                        type: number
                    example: [14.441252, 50.109318]
                    description: Point
                type:
                    type: string
                    enum:
                        - Point

        PublicDepartureGroup:
            type: array
            items:
                type: object
                properties:
                    departure:
                        $ref: "#/components/schemas/PublicDeparture"
                    stop:
                        $ref: "#/components/schemas/PublicDepartureStop"
                    route:
                        $ref: "#/components/schemas/PublicDepartureRoute"
                    trip:
                        $ref: "#/components/schemas/PublicDepartureTrip"
                    vehicle:
                        $ref: "#/components/schemas/PublicDepartureVehicle"
                required:
                    - departure
                    - stop
                    - route
                    - trip
                    - vehicle

        PublicDeparture:
            type: object
            properties:
                timestamp_scheduled:
                    type: string
                    format: date-time
                    example: "2024-04-05T16:09:00+02:00"
                    nullable: false
                timestamp_predicted:
                    type: string
                    format: date-time
                    example: "2024-04-05T16:09:16+02:00"
                    nullable: false
                delay_seconds:
                    type: number
                    description: Delay in seconds
                    example: 0
                    nullable: true
                minutes:
                    type: number
                    description: Minutes until the departure
                    example: 0
                    nullable: false
            required:
                - timestamp_scheduled
                - timestamp_predicted
                - minutes

        PublicDepartureStop:
            type: object
            properties:
                id:
                    type: string
                    example: "U717Z5P" # Strossmayerovo náměstí
                    nullable: false
                sequence:
                    type: number
                    example: 8
                    nullable: false
                platform_code:
                    type: string
                    example: "E"
                    nullable: true
            required:
                - id
                - sequence

        PublicDepartureRoute:
            type: object
            properties:
                type:
                    type: string
                    example: "tram"
                    enum: ["tram", "metro", "train", "bus", "ferry", "funicular", "trolleybus", "ext_miscellaneous"]
                    nullable: false
                short_name:
                    type: string
                    example: "27"
                    nullable: false
            required:
                - type
                - short_name

        PublicDepartureTrip:
            type: object
            properties:
                id:
                    type: string
                    example: "27_3206_240318"
                    nullable: false
                headsign:
                    type: string
                    example: "Libuš"
                    nullable: false
                is_canceled:
                    type: boolean
                    example: false
                    nullable: true
            required:
                - id
                - headsign

        PublicDepartureVehicle:
            type: object
            properties:
                id:
                    type: string
                    example: "service-0-9072"
                    nullable: true
                is_wheelchair_accessible:
                    type: boolean
                    example: true
                    nullable: true
                is_air_conditioned:
                    type: boolean
                    example: false
                    nullable: true
                has_charger:
                    type: boolean
                    example: true
                    nullable: true

        EventId:
            type: string
            format: uuid
            example: 1b75c16b-d5a3-40ca-8560-5a7dc011655d

        Effect:
            type: object
            properties:
              cs:
                  type: string
                  example: Zpoždění
              en:
                  type: string
                  example: Delay
                  nullable: true
            required:
              - cs

        TransferboardsDeparture:
            type: object
            required:
              - departure_timestamp
              - route
              - stop
              - trip
              - icons
            properties:
              departure_timestamp:
                type: object
                required:
                  - minutes
                properties:
                  minutes:
                    type: array
                    items:
                      type: string
                      nullable: false
                    example: ["<1", "8"]
                    minItems: 1
              route:
                type: object
                required:
                  - short_name
                  - type
                properties:
                  short_name:
                    type: string
                    example: "B"
                    nullable: false
                  type:
                    type: number
                    example: 1
                    nullable: false
              stop:
                type: object
                required:
                  - platform_code
                properties:
                  platform_code:
                    type: string
                    example: "2/3"
                    nullable: true
              trip:
                $ref: "#/components/schemas/TransferboardsDepartureTrip"
              icons:
                $ref: "#/components/schemas/Icons"
                description: "Icons for possible transfer types on last stop of the trip (connected to headsign of the trip)"
              substitution_text:
                type: object
                required:
                  - cs
                properties:
                  cs:
                    type: string
                    example: "Provoz metra přerušen."
                    nullable: false
                  en:
                    type: string
                    example: "Metro service interrupted."
                    nullable: true

        TransferboardsDepartureTrip:
            type: object
            required:
              - headsign
              - id
              - is_wheelchair_accessible
              - is_guaranteed_transfer
            properties:
              headsign:
                type: string
                example: "Zličín"
                nullable: false
                description: "If more than one trips are available, the first one is taken. Trips are grouped by direction_id."
              id:
                type: string
                example: "1309_2547_231210"
                nullable: false
                description: "If more than one trips are available, the first one is taken. Trips are grouped by direction_id."
              is_wheelchair_accessible:
               type: boolean
               description: True if the vehicle being used on this trip is wheelchair accessible. Metro trips are deemed accessible if the station is accessible.
               nullable: true
               example: false
              is_guaranteed_transfer:
               type: boolean
               nullable: false
               description: True if the transfer is marked as guaranteed and it can be waiting for current arriving trip identified in request query parameters.
               example: false

        RouteType:
            type: number
            example: 0
            enum:
                - 0
                - 1
                - 2
                - 3
                - 4
                - 7
                - 11
            description: |
                0 - tram \
                1 - metro \
                2 - rail \
                3 - bus \
                4 - ferry \
                7 - funicular \
                11 - trolleybus

        InformedEntityRoute:
            type: object
            properties:
                id:
                    type: string
                    example: L13
                route_short_name:
                    type: string
                    example: "13"
                route_long_name:
                    type: string
                    example: "Čechovo náměstí - Olšanské hřbitovy"
                route_type:
                    $ref: "#/components/schemas/RouteType"
            required:
                - id
                - route_short_name
                - route_type
                - route_long_name

        EventCustomFormat:
            type: object
            required:
                - id
                - type
                - header_text
                - cause
                - cause_detail
                - severity_level
                - active_period
                - display_period
                - effects
                - description_text
                - description_html
                - informed_entity
                - organization_name
                - created_timestamp
                - last_modified_timestamp
            properties:
                id:
                    $ref: "#/components/schemas/EventId"
                    description: Unique identifier of the event in the UUIDv4 format
                type:
                    type: string
                    example: INCIDENT
                    enum:
                        - INCIDENT
                        - DISRUPTION
                        - SERVICE_CHANGE
                header_text:
                    type: object
                    properties:
                        cs:
                            type: string
                            example: Nehoda Jiřího z Poděbrad
                        en:
                            type: string
                            example: Accident at Jiřího z Poděbrad
                            nullable: true
                    required:
                        - cs
                cause:
                    type: object
                    properties:
                        cs:
                            type: string
                            example: Nehoda
                        en:
                            type: string
                            example: Accident
                            nullable: true
                    required:
                        - cs
                cause_detail:
                    type: object
                    properties:
                        cs:
                            type: string
                            example: Nehoda na křižovatce
                            nullable: true
                        en:
                            type: string
                            example: Accident at the intersection
                            nullable: true
                severity_level:
                    type: string
                    example: SEVERE
                    enum:
                        - INFO
                        - WARNING
                        - SEVERE
                    description: |
                        INFO - priority 3 \
                        WARNING - priority 2 \
                        SEVERE - priority 1
                active_period:
                    type: object
                    required:
                        - start
                        - end
                    properties:
                        start:
                            type: string
                            format: date-time
                            example: "2024-02-29T11:22:20.958Z"
                        end:
                            type: string
                            format: date-time
                            nullable: true
                            example: "2024-03-03T14:22:20.958Z"
                    description: The start and end date/time of the event validity
                display_period:
                    type: object
                    required:
                        - start
                        - end
                    properties:
                        start:
                            type: string
                            format: date-time
                            example: "2024-02-29T11:22:20.958Z"
                        end:
                            type: string
                            format: date-time
                            nullable: true
                            example: "2024-03-03T14:22:20.958Z"
                    description: The start and end date/time when the event should be displayed
                effects:
                    type: array
                    minItems: 1
                    items:
                        $ref: "#/components/schemas/Effect"
                description_text:
                    type: object
                    properties:
                      cs:
                        type: string
                        description: Event description in Czech in plain text
                      en:
                        type: string
                        nullable: true
                        description: Event description in English in plain text
                    required:
                      - cs
                    description: Localized descriptions of the event in plain text
                description_html:
                    type: object
                    properties:
                      cs:
                        type: string
                        description: Event description in Czech in HTML format
                      en:
                        type: string
                        nullable: true
                        description: Event description in English in HTML format
                    required:
                      - cs
                    description: Localized descriptions of the event in HTML format
                organization_name:
                    type: string
                    example: ROPID
                informed_entity:
                    type: object
                    nullable: true
                    properties:
                      routes:
                        type: array
                        nullable: true
                        items:
                          type: object
                          $ref: "#/components/schemas/InformedEntityRoute"
                last_modified_timestamp:
                    type: string
                    format: date-time
                    example: "2024-02-29T12:22:20.958Z"
                    description: Timestamp from when the event was last modified in VYMI
                created_timestamp:
                    type: string
                    format: date-time
                    example: "2024-02-29T12:22:20.958Z"
                    description: Timestamp from when the event was created in VYMI
