Booked out

This API is used to read the list of aircraft booked out. For information about how to get started using the APIs available, see API Access.

Parameters

  • page (integer)
    Zero-based page number. The query returns up to 50 rows per page. Based on has_more you might increment the page and request the next set of results.

 

Output

  • total (integer)
    Total number of records available (not affected by the page parameter).
  • has_more (boolean)
    True if there are more records available by incrementing the page parameter. When false you have read the whole list.
  • change_id (string)
    A string value which indicates whether any records have changed. If you have read all data previously and the next read returns the same change_id, nothing has changed. However, if the value changes you might discard your current result set and read again from the first page.
  • rows  (array)
    Each row contains information about a booked out aircraft.

 

Each row contains the following fields.

  • id (integer)
  • url (string)
  • created_at (integer)
  • out_time (integer)
  • eta_time (integer)
  • booking (object)
    If the booking out record is linked to a booking, see Bookings.
  • originator_id (integer)
  • originator_name (string)
  • aircraft_id (integer)
  • aircraft (string)
  • pilot_id (integer)
  • pilot_name (string)
  • pilot_role (string)
    The role of the pilot at the time of the flight. One of instructor, member, student.
  • student_id (integer)
  • student_name (string)
  • student_role (string)
    The role of the student at the time of the flight. One of air_experience, instructor, member, student.
  • passengers (string)
  • departed (string)
  • destination (string)
  • pob (integer)
  • fuel_added (decimal)
  • p1_in (integer)
    Present if the flight was booked in (either flight or aborted flight)
  • notes (string)

 

Notes

Because schools typically have less than ten aircraft you will not normally need to read more than the first page!

Example

curl -H "Accept: application/json" -H "Authorization: Bearer fb1f233e08aeef0a213dc87cea70cedbd7dbcd0a2229cac4f64e14e3c462cc8e" "https://acme.flightschoolbooking.com/club/booked-out"

(Use your own site's URL, replacing acme with the name of your subdomain and use your own token)

The output looks like this:

{"total":"1","has_more":false,"change_id":"de2b52af6a442955","rows":[{"url":"https:\/\/acme.flightschoolbooking.com\/club\/bookings\/booking\/137\/movement\/32","outTime":"1602007500","etaTime":"1602011100","aircraft":"G-LOLZ","pilot":"Sarah Smith","student":"","departed":"Kemble","destination":"Local","pob":1,"notes":""}]}