---
title: "Position and phase update"
method: POST
path: "/flights/update"
tags: ["Flights"]
---

# Position and phase update

`POST /flights/update`

Sent by the desktop client at the pilot's chosen position-update interval (currently 15, 30, or 60 seconds) while a flight is active. Each call appends a FLIGHT_PATH point to the PIREP and updates the PIREP's status based on the reported `phase`.

The server maps Stratos flight phases to phpVMS PIREP statuses:

| Stratos phase | phpVMS status |
|---|---|
| `boarding` | BOARDING |
| `push_back` | PUSHBACK_TOW |
| `taxi` | TAXI |
| `take_off` | TAKEOFF |
| `rejected_take_off` | TAXI |
| `climb` / `cruise` | ENROUTE |
| `descent` | APPROACH |
| `approach` | APPROACH_ICAO |
| `final` | LANDING |
| `landed` / `taxi_in` | LANDED |
| `go_around` | APPROACH |
| `arrived` / `deboarding` | ARRIVED |

The first update that transitions into a takeoff/climb/cruise status sets `block_off_time`. The first update transitioning into `LANDED`/`ARRIVED` sets `block_on_time`. The server's running flight time is recomputed from the first ACARS row's `created_at` each update.

Either `uuid` or `tracking_id` may carry the PIREP ID (the client uses them interchangeably).

## Request body

- UpdateFlightRequest
  - `uuid` string, uuid — PIREP ID returned by `/flights/start`. Use either this or `tracking_id`.
  - `tracking_id` string, uuid — Synonym for `uuid` — supplied for backwards compatibility.
  - `phase` 'boarding' | 'push_back' | 'taxi' | 'take_off' | 'rejected_take_off' | 'climb' | 'cruise' | 'descent' | 'approach' | 'final' | 'landed' | 'go_around' | 'taxi_in' | 'arrived' | 'deboarding', required — Current flight phase. Unknown values are treated as `cruise` (PirepStatus::ENROUTE) by the reference implementation.
  - `latitude` number, double, required
  - `longitude` number, double, required
  - `altitude` number, required — Indicated altitude in feet.
  - `heading` number, float, required — True heading in degrees.
  - `ground_speed` number, float — Ground speed in knots. Defaults to 0 if omitted.
  - `distance_remaining` number, float — Nautical miles remaining to destination. Used to compute the cumulative `distance` written to the FLIGHT_PATH row.

## Response `200`

Update accepted. The reference implementation returns an empty body.

- object, nullable

## Other responses

- `400` — Required `uuid` / `tracking_id` was not supplied.
- `401` — Missing or invalid Bearer token.
- `404` — No PIREP exists for the supplied tracking ID.

---

[API](https://skmtc.net/skyvexsoftware/apis/stratos-core-api.md) · [All operations](https://skmtc.net/skyvexsoftware/apis/stratos-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/skyvexsoftware/stratos-core-api/versions/0b7ba98ff0aa/schema)
