The Services module extends Gobarau Academy’s backend with two core student support systems: the school library and the student transport network. The library sub-domain manages the full book lifecycle — cataloguing titles, tracking who has borrowed what and when, and recording overdue fines for unreturned books. The transport sub-domain handles route definitions, the vehicle fleet, and per-student subscription enrollments that map a student to a specific bus route and direction for an academic session. All endpoints require authentication andDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/muhammadbugaje/gobarau_backend/llms.txt
Use this file to discover all available pages before exploring further.
IsStaffOrAdmin permissions.
Library
Books
TheBook model represents the library’s physical inventory. Each title carries availability counters so staff can instantly see how many copies are on the shelf versus checked out.
GET /api/services/books/
Returns the full catalogue of library books ordered alphabetically by title.
Permissions: IsAuthenticated, IsStaffOrAdmin
Auto-incrementing primary key of the book record.
Globally unique UUID identifier.
Full title of the book (max 200 characters).
Author name(s). Optional — defaults to
"".ISBN number (max 20 characters). Must be unique across the catalogue. Optional — defaults to
"".Genre or subject classification (max 100 characters). Optional — defaults to
"".Total number of copies owned by the library. Defaults to
1.Number of copies currently available for borrowing. Defaults to
1.Shelf or section location within the library (max 100 characters). Optional — defaults to
"".Timestamp when the record was created.
Timestamp of the last update.
POST /api/services/books/
Adds a new book to the library catalogue.
Permissions: IsAuthenticated, IsStaffOrAdmin
Full title of the book. Maximum 200 characters.
Author name(s). Optional.
Unique ISBN. Optional but must be unique if provided.
Genre or subject area. Optional.
Total copies acquired. Defaults to
1.Copies currently available. Defaults to
1. Should not exceed quantity_total.Shelf/section location (e.g.,
"Shelf B-3"). Optional.Borrow Records
ABorrowRecord is created each time a patron checks out a book. It tracks the expected return date and the actual return date, and its status moves through borrowed → returned (or overdue if the due date passes without a return).
The
borrow_date field is set automatically to today’s date on creation (auto_now_add=True) and cannot be supplied in the request body.GET /api/services/borrow-records/
Returns all borrow records ordered by most recent borrow date first.
Permissions: IsAuthenticated, IsStaffOrAdmin
Auto-incrementing primary key of the borrow record.
Globally unique UUID identifier.
ID of the
Book that was borrowed.ID of the
Person (from accounts.Person) who borrowed the book.Date the book was checked out. Set automatically on creation.
Expected return date in
YYYY-MM-DD format.Actual return date.
null while the book is still out.Current status of the borrow. One of:
borrowed, returned, overdue.Timestamp when the record was created.
Timestamp of the last update.
ID of the staff member who created this record (from
AuditMixin).ID of the staff member who last modified this record.
POST /api/services/borrow-records/
Creates a new borrow record, i.e., checks a book out to a borrower.
Permissions: IsAuthenticated, IsStaffOrAdmin
ID of the
Book being borrowed.ID of the
Person checking out the book.Expected return date in
YYYY-MM-DD format.Actual return date. Supply when recording a return. Defaults to
null.Borrow status. Defaults to
borrowed. Options: borrowed, returned, overdue.Library Fines
Library fines are levied against overdue borrow records. They are tracked independently of the main Finance payments module — a fine here captures the overdue debt, while settlement through the Finance module is handled separately.Library fines are not automatically linked to a
Payment record in the Finance module. They represent the outstanding debt only. Staff must reconcile fine payments separately through the finance workflow if required.GET /api/services/library-fines/
Returns all library fine records ordered by most recently created.
Permissions: IsAuthenticated, IsStaffOrAdmin
Auto-incrementing primary key of the fine record.
Globally unique UUID identifier.
ID of the
BorrowRecord this fine was levied against.Fine amount (up to 10 digits, 2 decimal places), e.g.,
"200.00".Whether the fine has been paid. Defaults to
false.Timestamp of when the fine was cleared.
null until paid.Timestamp when the fine was raised.
Timestamp of the last update.
POST /api/services/library-fines/
Creates a new fine record against an overdue borrow record.
Permissions: IsAuthenticated, IsStaffOrAdmin
ID of the
BorrowRecord triggering the fine.Fine amount, e.g.,
"150.00".Set to
true to immediately mark as settled. Defaults to false.Timestamp of payment. Required if
paid is true. Defaults to null.Transport
Bus Routes
ABusRoute defines a named corridor between an origin and destination, with optional intermediate stops stored as a JSON array. Multiple vehicles can be assigned to a single route.
GET /api/services/bus-routes/
Returns all defined bus routes ordered alphabetically by name.
Permissions: IsAuthenticated, IsStaffOrAdmin
Auto-incrementing primary key of the route.
Globally unique UUID identifier.
Route name (max 200 characters), e.g.,
"Northern Zone Route".Starting point of the route (max 200 characters).
End point of the route (max 200 characters).
JSON array of intermediate stop names. Defaults to
[].Total route distance in kilometres (up to 5 digits, 2 decimal places). Defaults to
"0.00".Timestamp when the route was created.
Timestamp of the last update.
POST /api/services/bus-routes/
Creates a new bus route.
Permissions: IsAuthenticated, IsStaffOrAdmin
Display name for the route. Maximum 200 characters.
Starting location of the route.
End location of the route.
Optional JSON array of intermediate stop strings, e.g.,
["Kofar Wambai", "Rijiyar Zaki"]. Defaults to [].Route distance in km. Defaults to
"0.00".Bus Vehicles
EachBusVehicle record tracks a physical school bus identified by its unique registration number. A vehicle is optionally assigned a driver and a route.
GET /api/services/bus-vehicles/
Returns all registered vehicles ordered by registration number.
Permissions: IsAuthenticated, IsStaffOrAdmin
Auto-incrementing primary key of the vehicle record.
Globally unique UUID identifier.
Official vehicle registration plate (max 20 characters). Must be unique.
Maximum passenger capacity. Defaults to
30.ID of the
Person (accounts) assigned as driver. Nullable.ID of the
BusRoute this vehicle currently serves. Nullable.Timestamp when the vehicle was registered.
Timestamp of the last update.
POST /api/services/bus-vehicles/
Registers a new school bus vehicle.
Permissions: IsAuthenticated, IsStaffOrAdmin
Vehicle registration plate. Must be unique. Maximum 20 characters.
Passenger capacity. Defaults to
30.Optional ID of the assigned driver (
Person). Can be null.Optional ID of the assigned
BusRoute. Can be null.Transport Subscriptions
ATransportSubscription enrolls a student on a specific bus route for an academic session, capturing the travel direction and the subscription fee charged.
GET /api/services/transport-subscriptions/
Returns all transport subscriptions ordered by most recently created.
Permissions: IsAuthenticated, IsStaffOrAdmin
Auto-incrementing primary key of the subscription.
Globally unique UUID identifier.
ID of the subscribed
StudentProfile.ID of the
BusRoute the student is enrolled on.ID of the
AcademicSession this subscription covers.Travel direction. One of:
to_school, from_school, both. Defaults to both.Transport fee charged for this subscription.
Timestamp when the record was created.
Timestamp of the last update.
ID of the staff member who created this record (from
AuditMixin).ID of the staff member who last updated this record.
POST /api/services/transport-subscriptions/
Enrolls a student on a bus route for the given session.
Permissions: IsAuthenticated, IsStaffOrAdmin
ID of the
StudentProfile to enroll.ID of the
BusRoute to subscribe to.ID of the
AcademicSession this subscription covers.Transport fee for the subscription, e.g.,
"30000.00".Direction of travel. Defaults to
both. Options: to_school, from_school, both.