Schedules

List Schedules

GET /schedules.json

Retrieve upcoming schedule records and status definitions.

Response

{
  "future": [
    {
      "Schedule": {
        "id": "789",
        "status": "confirmed",
        "title": "Training Flight",
        "departure_airport": "LEMD",
        "landing_airport": "LEMD",
        "start": "2025-03-15 08:00:00",
        "end": "2025-03-15 10:00:00",
        "notes": "Circuit training",
        "aircraft_id": "45",
        "pic_id": "123",
        "sic_id": null,
        "supervisor_id": null,
        "flight_type_id": "1",
        "flight_id": null,
        "pic_status": "accepted",
        "sic_status": "pending",
        "user_status": "accepted",
        "notified": true,
        "borderColor": "#3498db"
      },
      "Pic": {
        "id": "123",
        "email": "[email protected]",
        "user_group_id": "110",
        "UserGroup": { "name": "Pilot" },
        "UserDetail": { "name": "John", "surname": "Doe", "id": "123" }
      },
      "Sic": null,
      "Supervisor": null,
      "Flight": null,
      "Aircraft": {
        "registration": "EC-ABC",
        "photo": "https://...",
        "aircraft_model_id": "10",
        "AircraftModel": {
          "id": "10",
          "icao": "C172",
          "name": "C172",
          "type": "SEP",
          "AircraftManufacturer": { "name": "Cessna" }
        }
      },
      "FlightType": { "name": "Training", "color": "#3498db" },
      "PicTrainingFlight": null,
      "SicTrainingFlight": null
    }
  ],
  "canCreate": true,
  "status": {
    "confirmed": { "color": "#2ecc71", "class": "success", "name": "Confirmed" },
    "pending": { "color": "#f39c12", "class": "warning", "name": "Pending" },
    "cancelled": { "color": "#e74c3c", "class": "danger", "name": "Cancelled" }
  },
  "crewstatus": {
    "accepted": { "color": "#2ecc71", "class": "success", "name": "Accepted" },
    "pending": { "color": "#f39c12", "class": "warning", "name": "Pending" },
    "declined": { "color": "#e74c3c", "class": "danger", "name": "Declined" }
  }
}

View Schedule

GET /schedules/view/{id}.json

Retrieve full details for a single schedule record, including history.

Path Parameters

Parameter
Type
Description

id

string

Schedule ID

Response

Same structure as a single item in the future array, plus:


Dispatch Schedule

GET /schedules/flight/{scheduleId}.json

Create a flight record from a schedule (dispatch function). Converts the schedule entry into an actual flight.

Path Parameters

Parameter
Type
Description

scheduleId

string

Schedule ID to dispatch


Availability

Get Availability

GET /schedules/get_availability.json

Retrieve pilot availability records within a date range.

Query Parameters

Parameter
Type
Required
Description

start

string

Yes

Start date (YYYY-MM-DD)

end

string

Yes

End date (YYYY-MM-DD)

timeZone

string

Yes

IANA timezone name (e.g. Europe/Madrid)

Response

Availability Types

Type
Description

AVAILABLE

Pilot is available for scheduling

UNAVAILABLE

Pilot is not available

MAYBE

Pilot may be available (conditional)

ALWAYS

Pilot is always available (default)

Add Availability

POST /schedules/add_availability.json

Create a new availability record.

Request Body

Field
Type
Required
Description

start

string

Yes

Start datetime

end

string

Yes

End datetime

type

string

Yes

AVAILABLE, UNAVAILABLE, or MAYBE

Edit Availability

POST /schedules/edit_availability.json

Update an existing availability record.

Request Body

Field
Type
Required
Description

id

string

Yes

Availability record ID

start

string

Yes

Start datetime

end

string

Yes

End datetime

type

string

Yes

AVAILABLE, UNAVAILABLE, or MAYBE

Delete Availability

GET /schedules/delete_availability/{id}.json

Delete a specific availability record.

Delete All Availability

GET /schedules/delete_availability/all.json

Delete all availability records for the authenticated user.

Delete "Always Available"

GET /schedules/delete_availability/always.json

Remove the "always available" default setting.


Calendar Events

GET /events/calendar.json

Retrieve calendar events (schedules, classes, exams) within a date range.

Query Parameters

Parameter
Type
Required
Description

start

string

Yes

Start date

end

string

Yes

End date

timeZone

string

Yes

IANA timezone name

Response


Events Index

GET /events/index.json

Retrieve events for the dashboard view.

Query Parameters

Parameter
Type
Required
Description

start

string

Yes

Start date

end

string

Yes

End date

Last updated