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

# Change Flight Status

> Transition a flight status with automatic timestamp tracking

Change a flight's operational status. The endpoint automatically stamps `ActualDepartureTime` when switching to `departed`/`in_flight` and `ActualArrivalTime` when switching to `landed`/`arrived` if not explicitly supplied.

## Request

```bash theme={null}
curl -X POST "https://api.series.hr/flights/change-status/flt_1740000000000_abcde" \
  -H "apikey: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "Status": "departed",
    "Remarks": "Departed Gate A1"
  }'
```

## Parameters

<ParamField path="flightId" type="string" required>
  The `FlightId` or `FlightNumber` of the flight.
</ParamField>

<ParamField body="Status" type="string" required>
  Target flight status. Must be one of:

  * `scheduled`: Flight is on schedule
  * `boarding`: Passengers are boarding
  * `gate_closed`: Boarding closed, preparing for pushback
  * `departed`: Flight has pushed back / departed
  * `in_flight`: Aircraft is airborne
  * `landed`: Aircraft has touched down
  * `arrived`: Flight reached destination gate
  * `delayed`: Flight is experiencing delay
  * `cancelled`: Flight has been cancelled
</ParamField>

<ParamField body="DelayMinutes" type="integer">
  Optional delay duration in minutes.
</ParamField>

<ParamField body="DelayReason" type="string">
  Optional delay reason description.
</ParamField>

<ParamField body="ActualDepartureTime" type="string">
  Optional custom actual departure timestamp (ISO 8601).
</ParamField>

<ParamField body="ActualArrivalTime" type="string">
  Optional custom actual arrival timestamp (ISO 8601).
</ParamField>

<ParamField body="Remarks" type="string">
  Optional display note or gate announcement text.
</ParamField>

## Response

<ResponseField status={200} name="200">
  ```json theme={null}
  {
    "success": true,
    "data": {
      "Message": "Flight status updated to 'departed'",
      "Flight": {
        "FlightId": "flt_1740000000000_abcde",
        "FlightNumber": "RA 101",
        "Status": "departed",
        "ActualDepartureTime": "2026-09-01T14:02:10.000Z",
        "Remarks": "Departed Gate A1",
        "UpdatedAt": "2026-09-01T14:02:10.000Z"
      }
    }
  }
  ```
</ResponseField>

## Status Codes

* `200`: Flight status updated successfully
* `400`: Invalid status value
* `401`: API key is required
* `404`: Flight not found
