Back

e-allocator™

How the data fits together

This guide explains the ideas behind the e-allocator member API, for a developer deciding whether and how to use it. For every endpoint and field, see the specification, openapi.yaml. To try the API in a minute, see the developers page.

A day on the bookings grid

Members see their group's bookings as a grid, one day at a time, in the web and mobile apps. The API is built around the same grid, so it is the quickest way in.

One day on the bookings grid Tuesday 15 December 2026 for a group with three aircraft. Columns are primary resources, rows are the Tuesday time slots, and each row on this date has a booked time slot, except the 14:00 row, where nothing is booked. Cells hold bookings: Local flying on G-ABCD from 08:00 with an instructor added as a secondary resource; a cross-country block on G-EFGH covering 10:00 to 14:00; maintenance on G-IJKL from 10:00; a booking by J. Smith on G-ABCD from 12:00. The other cells are free. Tuesday 15 December 2026 booking_date 2026-12-15 Time slots day_of_week 3 (Tuesday) G-ABCD resource_id 3301 G-EFGH resource_id 3303 G-IJKL resource_id 3304 Booked time slot on this date 08:00 - 10:00 time_slot_id 1201 id 880412 10:00 - 12:00 time_slot_id 1202 id 880413 12:00 - 14:00 time_slot_id 1203 id 880414 14:00 - 17:00 time_slot_id 1204 None yet: nothing is booked in this row free free free free free free free Local flying booking 912345 + Instructor (secondary) Cross-country booking 912350 booking 912351 same block_uuid: one block Maintenance booking 912352 J. Smith booking 912353
Figure 1. One Tuesday for a flying group with three aircraft. The labels in a typewriter font are the ids and fields the API returns for each part of the grid. Open full size

A booking doesn't contain its date or time. Its booked_time_slot_id leads to the booked time slot, which has the booking_date and the time_slot_id, and the time slot has the times. GET /bookings/range does that joining for you: it returns each booking with its booking_date, time_slot_id, time_slot_description and resource_description.

The data model

Figure 2 shows each kind of object the member API returns, with its main fields, and how they refer to one another. Each one is a schema of the same name in the specification.

The member API's data model Everything belongs to one group. A time slot has many booked time slots, one for each date on which something is booked. A booked time slot has many bookings, and so does a resource. A member makes many bookings and posts notices. A primary booking has many secondary bookings, which point back to it with primary_booking_id. Group a club or syndicate: each group is private, and a member sees only their own id · groupname · timezone · on_hold · max_advance_booking_days · max_bookings_per_day · max_future_bookings secondary bookings Time slot TimeSlot id day_of_week sequence_num description prime Resource Resource id description primary_flag symbol sequence_num redact_booking_text Member User id username name administrator allow_edits allow_alter_others member_details_private Booked time slot BookedTimeSlot id time_slot_id → TimeSlot booking_date Booking Booking id resource_id → Resource booked_time_slot_id → BookedTimeSlot booked_by_user_id → User primary_booking_id → Booking block_uuid description booked_when secondary_bookings (list) Notice Notice id user_id → User notice_text submit_date_time How to read it one to many resource_id → Resource holds the id of a Resource Names in code are the fields and schemas in openapi.yaml
Figure 2. The member API's data model. A field such as resource_id → Resource holds the id of a Resource. Each line joins one object (the end with a bar) to many (the end with three prongs). Open full size
ObjectRead withChange with
Me (the caller)GET /me
GroupGET /groups/{group_id}
MemberGET /users
GET /users/{user_id}
ResourceGET /resources
GET /resources/{resource_id}
Time slotGET /time_slots
GET /time_slots/{time_slot_id}
Booked time slotGET /booked_time_slots/day/{year}/{month}/{day}
GET /booked_time_slots/week/{year}/{month}/{day}
GET /booked_time_slots/month/{year}/{month}
GET /booked_time_slots/{booked_time_slot_id}
POST /booked_time_slots (gets or creates)
BookingGET /bookings/range (with dates)
GET /bookings/day/{year}/{month}/{day}
GET /bookings/week/{year}/{month}/{day}
GET /bookings/month/{year}/{month}
GET /bookings/{booking_id}
POST /bookings
PUT /bookings/{booking_id}
DELETE /bookings/{booking_id}
POST /utilities/delete_block/{block_uuid}
NoticeGET /notices
GET /notices/{notice_id}

A group's administrators manage its members, resources, time slots and settings in the app, and notices are posted in the app. Those endpoints are not part of the member API, so through it these can only be read.

Making a booking

Figure 3 shows how a client checks that aircraft G-ABCD (resource 3301) is free from 08:00 on Tuesday 15 December 2026 (time slot 1201), then books it: this is how booking 912345 in figure 1 was made.

Checking availability and making a booking The client signs in with POST /sessions and keeps the session cookie. It reads resources and time slots once. To check 15 December 2026 it reads that day's bookings with GET /bookings/range, each with its date and time slot. To book, it calls POST /booked_time_slots with the date and time slot, which returns the booked time slot, then POST /bookings with the resource and booked time slot. The API emails members who asked to be told. A booking can be refused with 400, marked booking_rule when it breaks a group rule. Your script, tool or assistant e-allocator API 1. Sign in POST /sessions {groupname, username, password} 200: Set-Cookie: session=... (send it with every request) 2. Read once and reuse GET /resources resources: the columns of the grid GET /time_slots time_slots: the rows, for each day_of_week 3. Check 15 December 2026 GET /bookings/range?from=2026-12-15&to=2026-12-15 that day's bookings, with dates and time slots: is 3301 booked in time slot 1201? 4. Book POST /booked_time_slots {booking_date, time_slot_id} {"id": 880412, ...} (created if it did not exist) POST /bookings {resource_id, booked_time_slot_id, description} 200: {"id": 912345, ...}, the booking or 400 with "booking_rule": true and a message for the member (a group rule) or 400 "Bad request" (already booked, look-only member, group on hold) Emails members who asked to be told
Figure 3. Checking availability and making a booking. Solid arrows are requests; dashed arrows are their responses. Open full size
  1. Sign in with POST /sessions and keep the session cookie it sets. Or, instead, send a member's access key with every request.
  2. Read the resources and time slots. They rarely change, so read them once and reuse them.
  3. Check the date. GET /bookings/range?from=2026-12-15&to=2026-12-15 returns that day's bookings, each with its time_slot_id. The resource is free unless one of them has resource_id 3301 and time_slot_id 1201.
  4. Book. POST /booked_time_slots returns the booked time slot, creating it if needed; asking twice is harmless. Then POST /bookings with the resource_id and booked_time_slot_id.

Checking first shows the member what is free, but it doesn't reserve anything: if someone else books the resource in the meantime, POST /bookings is refused with 400.

A booking that breaks one of the group's rules for members (booking too far ahead, too many bookings on one day, or too many upcoming bookings) is refused with 400, "booking_rule": true and a message to show the member. The limits are the group's max_advance_booking_days, max_bookings_per_day and max_future_bookings, where 0 means no limit. They don't apply to administrators, except when an administrator's access key is used.

To change a booking's description, or move it to another resource in the same slot, use PUT /bookings/{booking_id}. To move it to another date or time, cancel it with DELETE /bookings/{booking_id} and book again. Cancelling a primary booking also cancels the secondary resources booked with it, and POST /utilities/delete_block/{block_uuid} cancels a whole block.

Dates and times

Who can do what

You act as the member you signed in as, or whose access key you use, with exactly that member's permissions (and never more than an ordinary member's with a key). GET /me tells you who that is and whether you can book now. Read the member's permissions with GET /users/{user_id} (your own user_id, from GET /me or signing in) and the group's with GET /groups/{group_id}.

Every memberReads the group's resources, time slots, bookings, members and notices. Makes, changes and cancels their own bookings, within the group's rules.
allow_edits falseCan only look: cannot make, change or cancel bookings.
allow_alter_others trueCan also change and cancel other members' bookings.
administrator trueIs not limited by the group's booking rules, and sees every member's details.
Group on_holdNobody can make, change or cancel bookings.
An access keyActs as its member, but as an ordinary member even when an administrator made it: the booking rules apply, and other members are listed without their email addresses. A look-only key cannot make, change or cancel bookings. See Using an access key.

Privacy within a group

Ready to try it? The developers page has a quick start against the public demo group, and openapi.yaml has every endpoint. If the API doesn't do something you need, tell us.

Back