openapi: 3.0.3
info:
title: 'Laravel API Documentation'
description: ''
version: 1.0.0
servers:
-
url: 'http://localhost'
tags:
-
name: Classes
description: ''
-
name: Endpoints
description: ''
-
name: FeeTypes
description: ''
-
name: Grades
description: ''
-
name: Guardians
description: ''
-
name: Payments
description: ''
-
name: Staff
description: ''
-
name: Students
description: ''
paths:
/api/v1/classes:
get:
summary: 'Get a list of all classes.'
operationId: getAListOfAllClasses
description: 'This endpoint returns a list of all classes, including their associated grade and staff members.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
data:
-
id: 1
name: Mathematics
grade_id: 1
grade:
id: 1
name: Elementary
staff:
-
id: 1
name: 'John Doe'
properties:
success:
type: boolean
example: true
data:
type: array
example:
-
id: 1
name: Mathematics
grade_id: 1
grade:
id: 1
name: Elementary
staff:
-
id: 1
name: 'John Doe'
items:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: Mathematics
grade_id:
type: integer
example: 1
grade:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: Elementary
staff:
type: array
example:
-
id: 1
name: 'John Doe'
items:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: 'John Doe'
tags:
- Classes
post:
summary: 'Create a new class.'
operationId: createANewClass
description: 'This endpoint allows you to create a new class by providing its name, grade, and an optional list of staff members.'
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
data:
name: 'Class A'
grade_id: 1
updated_at: '2025-08-02T01:00:00.000000Z'
created_at: '2025-08-02T01:00:00.000000Z'
id: 1
properties:
success:
type: boolean
example: true
data:
type: object
properties:
name:
type: string
example: 'Class A'
grade_id:
type: integer
example: 1
updated_at:
type: string
example: '2025-08-02T01:00:00.000000Z'
created_at:
type: string
example: '2025-08-02T01:00:00.000000Z'
id:
type: integer
example: 1
422:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'The given data was invalid.'
errors:
name:
- 'The name field is required.'
properties:
message:
type: string
example: 'The given data was invalid.'
errors:
type: object
properties:
name:
type: array
example:
- 'The name field is required.'
items:
type: string
tags:
- Classes
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'The name of the class.'
example: 'Class A'
nullable: false
grade_id:
type: integer
description: 'The ID of the grade the class belongs to. Must exist in the `grades` table.'
example: 1
nullable: false
staff_ids:
type: array|null
description: 'An optional array of staff member IDs to be attached to the class. Each ID must exist in the `staff` table.'
example: '[1, 2, 3]'
nullable: false
required:
- name
- grade_id
'/api/v1/classes/{id}':
get:
summary: 'Get details for a specific class.'
operationId: getDetailsForASpecificClass
description: 'This endpoint returns the details for a single class, including its associated grade and staff members.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
data:
id: 1
name: Mathematics
grade_id: 1
grade:
id: 1
name: Elementary
staff:
-
id: 1
name: 'John Doe'
properties:
success:
type: boolean
example: true
data:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: Mathematics
grade_id:
type: integer
example: 1
grade:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: Elementary
staff:
type: array
example:
-
id: 1
name: 'John Doe'
items:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: 'John Doe'
404:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'No query results for model [App\Models\ClassModel] 100'
properties:
message:
type: string
example: 'No query results for model [App\Models\ClassModel] 100'
tags:
- Classes
put:
summary: 'Update an existing class.'
operationId: updateAnExistingClass
description: 'This endpoint updates an existing class, including its name, grade, and attached staff members.'
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
data:
id: 1
name: 'Class B'
grade_id: 2
updated_at: '2025-08-02T01:05:00.000000Z'
created_at: '2025-08-02T01:00:00.000000Z'
properties:
success:
type: boolean
example: true
data:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: 'Class B'
grade_id:
type: integer
example: 2
updated_at:
type: string
example: '2025-08-02T01:05:00.000000Z'
created_at:
type: string
example: '2025-08-02T01:00:00.000000Z'
404:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'No query results for model [App\Models\ClassModel] 1'
properties:
message:
type: string
example: 'No query results for model [App\Models\ClassModel] 1'
422:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'The given data was invalid.'
errors:
grade_id:
- 'The selected grade id is invalid.'
properties:
message:
type: string
example: 'The given data was invalid.'
errors:
type: object
properties:
grade_id:
type: array
example:
- 'The selected grade id is invalid.'
items:
type: string
tags:
- Classes
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'The new name of the class.'
example: 'Class B'
nullable: false
grade_id:
type: integer
description: 'The new grade ID. Must exist in the `grades` table.'
example: 2
nullable: false
staff_ids:
type: array|null
description: 'An optional array of staff member IDs to be attached. All existing staff will be replaced.'
example: '[4, 5]'
nullable: false
required:
- name
- grade_id
delete:
summary: 'Delete a class.'
operationId: deleteAClass
description: 'This endpoint deletes a specific class from the database.'
parameters: []
responses:
204:
description: ''
404:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'No query results for model [App\Models\ClassModel] 100'
properties:
message:
type: string
example: 'No query results for model [App\Models\ClassModel] 100'
tags:
- Classes
parameters:
-
in: path
name: id
description: 'The ID of the class.'
example: 17
required: true
schema:
type: integer
-
in: path
name: class
description: 'The ID of the class.'
example: 1
required: true
schema:
type: integer
/api/v1/register:
post:
summary: ''
operationId: postApiV1Register
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'Must not be greater than 255 characters.'
example: vmqeopfuudtdsufvyvddq
nullable: false
email:
type: string
description: 'Must be a valid email address. Must not be greater than 255 characters.'
example: kunde.eloisa@example.com
nullable: false
password:
type: string
description: 'Must be at least 8 characters.'
example: '4[*UyPJ"}6'
nullable: false
role:
type: string
description: ''
example: admin
nullable: false
enum:
- user
- admin
required:
- name
- email
- password
security: []
/api/v1/login:
post:
summary: ''
operationId: postApiV1Login
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
email:
type: string
description: 'Must be a valid email address.'
example: qkunze@example.com
nullable: false
password:
type: string
description: ''
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
required:
- email
- password
security: []
/api/v1/logout:
post:
summary: ''
operationId: postApiV1Logout
description: ''
parameters: []
responses: { }
tags:
- Endpoints
security: []
/api/v1/user:
get:
summary: ''
operationId: getApiV1User
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
/api/v1/attendances:
post:
summary: ''
operationId: postApiV1Attendances
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
staff_id:
type: integer
description: 'The id of an existing record in the staff table.'
example: 17
nullable: false
required:
- staff_id
security: []
get:
summary: ''
operationId: getApiV1Attendances
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
/api/v1/dashboard:
get:
summary: ''
operationId: getApiV1Dashboard
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
/api/v1/earnings-summary:
get:
summary: ''
operationId: getApiV1EarningsSummary
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
/api/v1/confirm-password:
post:
summary: ''
operationId: postApiV1ConfirmPassword
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
password:
type: string
description: ''
example: 'O[2UZ5ij-e/dl4m{o,'
nullable: false
required:
- password
security: []
/api/v1/profile:
get:
summary: ''
operationId: getApiV1Profile
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
put:
summary: ''
operationId: putApiV1Profile
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'Must not be greater than 255 characters.'
example: vmqeopfuudtdsufvyvddq
nullable: false
email:
type: string
description: ''
example: null
nullable: false
required:
- name
security: []
/api/v1/profile/update:
post:
summary: ''
operationId: postApiV1ProfileUpdate
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
name:
type: string
description: 'Must not be greater than 255 characters.'
example: vmqeopfuudtdsufvyvddq
nullable: false
email:
type: string
description: 'Must be a valid email address.'
example: kunde.eloisa@example.com
nullable: false
avatar:
type: string
format: binary
description: 'Must be an image. Must not be greater than 2048 kilobytes.'
nullable: true
required:
- name
- email
security: []
'/api/v1/payments/class/{class_id}':
get:
summary: ''
operationId: getApiV1PaymentsClassClass_id
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
parameters:
-
in: path
name: class_id
description: 'The ID of the class.'
example: consequatur
required: true
schema:
type: string
'/api/v1/payments/suspended/{studentId}':
get:
summary: ''
operationId: getApiV1PaymentsSuspendedStudentId
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
parameters:
-
in: path
name: studentId
description: ''
example: consequatur
required: true
schema:
type: string
/api/v1/payments/statuses:
get:
summary: ''
operationId: getApiV1PaymentsStatuses
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
/api/v1/transactions:
get:
summary: ''
operationId: getApiV1Transactions
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
post:
summary: ''
operationId: postApiV1Transactions
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
student_id:
type: number
description: ''
example: 11613.31890586
nullable: false
total_amount:
type: number
description: ''
example: 11613.31890586
nullable: false
status:
type: string
description: ''
example: consequatur
nullable: false
payment_method:
type: string
description: ''
example: consequatur
nullable: false
payments:
type: array
description: ''
example:
- []
items:
type: object
properties:
id:
type: string
description: 'The id of an existing record in the payments table.'
example: consequatur
nullable: false
amountToPay:
type: number
description: 'Must be at least 0.'
example: 45
nullable: false
remise:
type: number
description: 'Must be at least 0.'
example: 56
nullable: true
required:
- id
- amountToPay
required:
- student_id
- total_amount
- status
- payment_method
- payments
security: []
'/api/v1/transactions/{id}':
get:
summary: ''
operationId: getApiV1TransactionsId
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
parameters:
-
in: path
name: id
description: 'The ID of the transaction.'
example: consequatur
required: true
schema:
type: string
'/api/v1/transactions/{id}/payments':
get:
summary: 'Get payments for a specific transaction.'
operationId: getPaymentsForASpecificTransaction
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
parameters:
-
in: path
name: id
description: 'The ID of the transaction.'
example: consequatur
required: true
schema:
type: string
/api/v1/school-settings:
get:
summary: ''
operationId: getApiV1SchoolSettings
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
post:
summary: ''
operationId: postApiV1SchoolSettings
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: false
content:
multipart/form-data:
schema:
type: object
properties:
name:
type: string
description: 'Must not be greater than 255 characters.'
example: vmqeopfuudtdsufvyvddq
nullable: true
address:
type: string
description: ''
example: consequatur
nullable: true
phone:
type: string
description: 'Must not be greater than 20 characters.'
example: mqeopfuudtdsufvyv
nullable: true
email:
type: string
description: 'Must be a valid email address. Must not be greater than 255 characters.'
example: buckridge.adell@example.org
nullable: true
website:
type: string
description: 'Must not be greater than 255 characters.'
example: niihfqcoynlazghdtqtqx
nullable: true
logo:
type: string
format: binary
description: 'Must be an image. Must not be greater than 2048 kilobytes.'
nullable: true
security: []
/api/v1/school-settings/logo:
post:
summary: ''
operationId: postApiV1SchoolSettingsLogo
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
logo:
type: string
format: binary
description: 'Must be an image. Must not be greater than 2048 kilobytes.'
nullable: false
required:
- logo
security: []
get:
summary: ''
operationId: getApiV1SchoolSettingsLogo
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
/api/v1/school-years:
get:
summary: ''
operationId: getApiV1SchoolYears
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Endpoints
security: []
post:
summary: ''
operationId: postApiV1SchoolYears
description: ''
parameters: []
responses: { }
tags:
- Endpoints
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: ''
example: consequatur
nullable: false
start_year:
type: integer
description: ''
example: 17
nullable: false
end_year:
type: integer
description: ''
example: 17
nullable: false
is_active:
type: boolean
description: ''
example: true
nullable: false
required:
- name
- start_year
- end_year
- is_active
security: []
/api/v1/fee-types:
get:
summary: 'Display a listing of the resource.'
operationId: displayAListingOfTheResource
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
id: 1
name: Tuition
amount: 500
frequency: monthly
tags:
- FeeTypes
security: []
post:
summary: 'Store a newly created resource in storage.'
operationId: storeANewlyCreatedResourceInStorage
description: ''
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: Tuition
amount: 500
frequency: monthly
properties:
id:
type: integer
example: 1
name:
type: string
example: Tuition
amount:
type: integer
example: 500
frequency:
type: string
example: monthly
tags:
- FeeTypes
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'The name of the fee type.'
example: Tuition
nullable: false
amount:
type: numeric
description: 'The amount for the fee type.'
example: '500'
nullable: false
frequency:
type: string
description: 'The frequency of the fee.'
example: monthly
nullable: false
description:
type: string
description: ''
example: 'Dolores dolorum amet iste laborum eius est dolor.'
nullable: true
grade_id:
type: string
description: 'The id of an existing record in the grades table.'
example: null
nullable: true
required:
- name
- amount
- frequency
security: []
'/api/v1/fee-types/{id}':
get:
summary: 'Display the specified resource.'
operationId: displayTheSpecifiedResource
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: Tuition
amount: 500
frequency: monthly
properties:
id:
type: integer
example: 1
name:
type: string
example: Tuition
amount:
type: integer
example: 500
frequency:
type: string
example: monthly
tags:
- FeeTypes
security: []
put:
summary: 'Update the specified resource in storage.'
operationId: updateTheSpecifiedResourceInStorage
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: 'Updated Tuition'
amount: 600
frequency: annual
properties:
id:
type: integer
example: 1
name:
type: string
example: 'Updated Tuition'
amount:
type: integer
example: 600
frequency:
type: string
example: annual
tags:
- FeeTypes
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'The name of the fee type.'
example: 'Updated Tuition'
nullable: false
amount:
type: numeric
description: 'The updated amount for the fee type.'
example: '600'
nullable: false
frequency:
type: string
description: 'The updated frequency of the fee.'
example: annual
nullable: false
required:
- name
- amount
- frequency
security: []
delete:
summary: 'Remove the specified resource from storage.'
operationId: removeTheSpecifiedResourceFromStorage
description: ''
parameters: []
responses:
204:
description: ''
tags:
- FeeTypes
security: []
parameters:
-
in: path
name: id
description: 'The ID of the fee type.'
example: 17
required: true
schema:
type: integer
-
in: path
name: feeType
description: 'The ID of the fee type.'
example: 1
required: true
schema:
type: integer
/api/v1/grades:
get:
summary: 'Display a listing of the resource.'
operationId: displayAListingOfTheResource
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: Elementary
properties:
id:
type: integer
example: 1
name:
type: string
example: Elementary
tags:
- Grades
security: []
post:
summary: 'Store a newly created resource in storage.'
operationId: storeANewlyCreatedResourceInStorage
description: ''
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: Elementary
properties:
id:
type: integer
example: 1
name:
type: string
example: Elementary
tags:
- Grades
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'The name of the grade.'
example: Elementary
nullable: false
required:
- name
security: []
'/api/v1/grades/{id}':
get:
summary: 'Display the specified resource.'
operationId: displayTheSpecifiedResource
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: Elementary
properties:
id:
type: integer
example: 1
name:
type: string
example: Elementary
tags:
- Grades
security: []
put:
summary: 'Update the specified resource in storage.'
operationId: updateTheSpecifiedResourceInStorage
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
name: Secondary
properties:
id:
type: integer
example: 1
name:
type: string
example: Secondary
tags:
- Grades
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
name:
type: string
description: 'The name of the grade.'
example: Secondary
nullable: false
required:
- name
security: []
delete:
summary: 'Remove the specified resource from storage.'
operationId: removeTheSpecifiedResourceFromStorage
description: ''
parameters: []
responses:
204:
description: ''
tags:
- Grades
security: []
parameters:
-
in: path
name: id
description: 'The ID of the grade.'
example: 17
required: true
schema:
type: integer
-
in: path
name: grade
description: 'The ID of the grade.'
example: 1
required: true
schema:
type: integer
/api/v1/guardians/search:
get:
summary: "Search guardians by first or last name.\n\nThis endpoint allows you to search for guardians using a partial match of their first or last names."
operationId: searchGuardiansByFirstOrLastNameThisEndpointAllowsYouToSearchForGuardiansUsingAPartialMatchOfTheirFirstOrLastNames
description: ''
parameters:
-
in: query
name: search
description: 'The keyword to search in guardian names.'
example: John
required: true
schema:
type: string
description: 'The keyword to search in guardian names.'
example: John
nullable: false
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Guardians
security: []
/api/v1/guardians:
get:
summary: 'Display a listing of the guardians.'
operationId: displayAListingOfTheGuardians
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Guardians
security: []
post:
summary: 'Store a newly created guardian in storage.'
operationId: storeANewlyCreatedGuardianInStorage
description: ''
parameters: []
responses: { }
tags:
- Guardians
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
first_name:
type: string
description: 'Must not be greater than 255 characters.'
example: vmqeopfuudtdsufvyvddq
nullable: false
last_name:
type: string
description: 'Must not be greater than 255 characters.'
example: amniihfqcoynlazghdtqt
nullable: false
phone_number:
type: string
description: 'Must not be greater than 20 characters.'
example: qxbajwbpilpmufinl
nullable: false
email:
type: string
description: 'The email of the guardian.'
example: john@example.com
nullable: true
address:
type: string
description: 'Must not be greater than 255 characters.'
example: uydlsmsjuryvojcybzvrb
nullable: true
cin_front:
type: string
format: binary
description: 'Must be an image. Must not be greater than 4096 kilobytes.'
nullable: true
cin_back:
type: string
format: binary
description: 'Must be an image. Must not be greater than 4096 kilobytes.'
nullable: true
name:
type: string
description: 'The name of the guardian.'
example: 'John Doe'
nullable: false
phone:
type: string
description: 'The phone number of the guardian.'
example: 123-456-7890
nullable: false
required:
- first_name
- last_name
- phone_number
- email
- name
security: []
'/api/v1/guardians/{id}':
get:
summary: 'Display the specified guardian.'
operationId: displayTheSpecifiedGuardian
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Guardians
security: []
put:
summary: 'Update the specified guardian in storage.'
operationId: updateTheSpecifiedGuardianInStorage
description: ''
parameters: []
responses: { }
tags:
- Guardians
requestBody:
required: false
content:
multipart/form-data:
schema:
type: object
properties:
first_name:
type: string
description: 'Must not be greater than 255 characters.'
example: vmqeopfuudtdsufvyvddq
nullable: false
last_name:
type: string
description: 'Must not be greater than 255 characters.'
example: amniihfqcoynlazghdtqt
nullable: false
email:
type: string
description: 'The new email of the guardian.'
example: jane@example.com
nullable: true
phone_number:
type: string
description: 'Must not be greater than 20 characters.'
example: wbpilpmufinllwloa
nullable: true
address:
type: string
description: 'Must not be greater than 255 characters.'
example: uydlsmsjuryvojcybzvrb
nullable: true
cin_front:
type: string
format: binary
description: 'Must be an image. Must not be greater than 2048 kilobytes.'
nullable: true
cin_back:
type: string
format: binary
description: 'Must be an image. Must not be greater than 2048 kilobytes.'
nullable: true
name:
type: string
description: 'The new name of the guardian.'
example: 'Jane Doe'
nullable: false
phone:
type: string
description: 'The new phone number of the guardian.'
example: 098-765-4321
nullable: false
security: []
delete:
summary: 'Remove the specified guardian from storage.'
operationId: removeTheSpecifiedGuardianFromStorage
description: ''
parameters: []
responses: { }
tags:
- Guardians
security: []
parameters:
-
in: path
name: id
description: 'The ID of the guardian.'
example: 17
required: true
schema:
type: integer
-
in: path
name: guardian
description: 'The ID of the guardian.'
example: 1
required: true
schema:
type: integer
'/api/v1/guardians/{id}/cin/{side}':
get:
summary: "Get CIN image of a guardian.\n\nReturns the requested CIN image (front or back) of a guardian."
operationId: getCINImageOfAGuardianReturnsTheRequestedCINImagefrontOrBackOfAGuardian
description: ''
parameters: []
responses:
401:
description: ''
content:
application/json:
schema:
type: object
example:
message: Unauthenticated.
properties:
message:
type: string
example: Unauthenticated.
tags:
- Guardians
security: []
parameters:
-
in: path
name: id
description: 'The ID of the guardian.'
example: 1
required: true
schema:
type: integer
-
in: path
name: side
description: 'The side of the CIN image to retrieve. Must be `front` or `back`.'
example: front
required: true
schema:
type: string
'/api/v1/students/{student_id}/payments':
get:
summary: 'Get all payments for a specific student.'
operationId: getAllPaymentsForASpecificStudent
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
id: 1
amount: 100
payment_date: '2024-09-01'
status: pending
student_id: 1
fee_type_id: 1
student:
id: 1
first_name: John
last_name: Doe
feeType:
id: 1
name: Tuition
tags:
- Payments
security: []
parameters:
-
in: path
name: student_id
description: 'The ID of the student.'
example: 1
required: true
schema:
type: integer
/api/v1/payments:
get:
summary: 'Get payments for the current month.'
operationId: getPaymentsForTheCurrentMonth
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
id: 1
amount: 100
payment_date: '2024-09-01'
status: pending
student_id: 1
fee_type_id: 1
student:
id: 1
first_name: John
last_name: Doe
code_massar: ABC123
feeType:
id: 1
name: Tuition
tags:
- Payments
security: []
post:
summary: 'Store a new payment.'
operationId: storeANewPayment
description: ''
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
amount: 100
payment_date: '2024-09-01'
status: pending
student_id: 1
fee_type_id: 1
properties:
id:
type: integer
example: 1
amount:
type: integer
example: 100
payment_date:
type: string
example: '2024-09-01'
status:
type: string
example: pending
student_id:
type: integer
example: 1
fee_type_id:
type: integer
example: 1
tags:
- Payments
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
amount:
type: number
description: 'The amount of the payment.'
example: 100.0
nullable: false
payment_date:
type: date
description: 'The date of the payment.'
example: '2024-09-01'
nullable: false
status:
type: string
description: 'The status of the payment.'
example: pending
nullable: false
student_id:
type: integer
description: 'The ID of the student.'
example: 1
nullable: false
fee_type_id:
type: integer
description: 'The ID of the fee type.'
example: 1
nullable: false
required:
- amount
- payment_date
- status
- student_id
- fee_type_id
security: []
'/api/v1/payments/{id}':
put:
summary: 'Update an existing payment.'
operationId: updateAnExistingPayment
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
amount: 150
payment_date: '2024-10-01'
status: completed
student_id: 2
fee_type_id: 2
properties:
id:
type: integer
example: 1
amount:
type: integer
example: 150
payment_date:
type: string
example: '2024-10-01'
status:
type: string
example: completed
student_id:
type: integer
example: 2
fee_type_id:
type: integer
example: 2
tags:
- Payments
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
amount_paid:
type: number
description: 'Must be at least 0.'
example: 73
nullable: false
remise:
type: number
description: 'Must be at least 0.'
example: 45
nullable: true
amount:
type: number
description: 'The new amount of the payment.'
example: 150.0
nullable: false
payment_date:
type: date
description: 'The new date of the payment.'
example: '2024-10-01'
nullable: false
status:
type: string
description: 'The new status of the payment.'
example: completed
nullable: false
student_id:
type: integer
description: 'The new ID of the student.'
example: 2
nullable: false
fee_type_id:
type: integer
description: 'The new ID of the fee type.'
example: 2
nullable: false
required:
- amount_paid
security: []
parameters:
-
in: path
name: id
description: 'The ID of the payment.'
example: '1562'
required: true
schema:
type: string
-
in: path
name: payment
description: 'The ID of the payment.'
example: 1
required: true
schema:
type: integer
/api/v1/payments/generate-payments:
get:
summary: 'Generate payments for all students based on their fee types.'
operationId: generatePaymentsForAllStudentsBasedOnTheirFeeTypes
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'Payments generated successfully.'
properties:
message:
type: string
example: 'Payments generated successfully.'
tags:
- Payments
security: []
'/api/v1/payments/massar/{code_massar}':
get:
summary: "Get a student's payments by their Massar code."
operationId: getAStudentsPaymentsByTheirMassarCode
description: "This endpoint retrieves all payments for a specific student using their unique `code_massar`.\nYou can optionally filter the results by a specific school year."
parameters:
-
in: query
name: school_year_id
description: 'The ID of the school year to filter by.'
example: 1
required: false
schema:
type: integer
description: 'The ID of the school year to filter by.'
example: 1
nullable: false
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
success: true
data:
-
id: 1
student_id: 1
fee_type_id: 1
school_year_id: 1
amount: 500.0
remaining: 100.0
payment_date: '2025-08-01'
status: incomplete
year: 2025
month: 8
student:
id: 1
first_name: Jane
last_name: Doe
code_massar: S123456789
fee_type:
id: 1
name: 'Tuition Fee'
-
id: 2
student_id: 1
fee_type_id: 2
school_year_id: 1
amount: 200.0
remaining: 0.0
payment_date: '2025-07-25'
status: completed
year: 2025
month: 7
student:
id: 1
first_name: Jane
last_name: Doe
code_massar: S123456789
fee_type:
id: 2
name: Books
properties:
success:
type: boolean
example: true
data:
type: array
example:
-
id: 1
student_id: 1
fee_type_id: 1
school_year_id: 1
amount: 500
remaining: 100
payment_date: '2025-08-01'
status: incomplete
year: 2025
month: 8
student:
id: 1
first_name: Jane
last_name: Doe
code_massar: S123456789
fee_type:
id: 1
name: 'Tuition Fee'
-
id: 2
student_id: 1
fee_type_id: 2
school_year_id: 1
amount: 200
remaining: 0
payment_date: '2025-07-25'
status: completed
year: 2025
month: 7
student:
id: 1
first_name: Jane
last_name: Doe
code_massar: S123456789
fee_type:
id: 2
name: Books
items:
type: object
properties:
id:
type: integer
example: 1
student_id:
type: integer
example: 1
fee_type_id:
type: integer
example: 1
school_year_id:
type: integer
example: 1
amount:
type: number
example: 500.0
remaining:
type: number
example: 100.0
payment_date:
type: string
example: '2025-08-01'
status:
type: string
example: incomplete
year:
type: integer
example: 2025
month:
type: integer
example: 8
student:
type: object
properties:
id:
type: integer
example: 1
first_name:
type: string
example: Jane
last_name:
type: string
example: Doe
code_massar:
type: string
example: S123456789
fee_type:
type: object
properties:
id:
type: integer
example: 1
name:
type: string
example: 'Tuition Fee'
404:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'Student not found'
properties:
message:
type: string
example: 'Student not found'
tags:
- Payments
parameters:
-
in: path
name: code_massar
description: 'The unique Massar code of the student.'
example: '"S123456789"'
required: true
schema:
type: string
/api/v1/staff:
get:
summary: 'Display a listing of the staff members.'
operationId: displayAListingOfTheStaffMembers
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
first_name: John
last_name: Doe
date_of_birth: '1990-01-01'
gender: male
address: '123 Main St'
phone_number: 123-456-7890
email: john.doe@example.com
affectation_date: '2021-06-15'
contrat_type: CDI
function: teacher
n_cnss: '1234567890'
base_salary: 3000
bank_acount_num: '123456789'
properties:
id:
type: integer
example: 1
first_name:
type: string
example: John
last_name:
type: string
example: Doe
date_of_birth:
type: string
example: '1990-01-01'
gender:
type: string
example: male
address:
type: string
example: '123 Main St'
phone_number:
type: string
example: 123-456-7890
email:
type: string
example: john.doe@example.com
affectation_date:
type: string
example: '2021-06-15'
contrat_type:
type: string
example: CDI
function:
type: string
example: teacher
n_cnss:
type: string
example: '1234567890'
base_salary:
type: integer
example: 3000
bank_acount_num:
type: string
example: '123456789'
tags:
- Staff
security: []
post:
summary: 'Store a newly created staff member in storage.'
operationId: storeANewlyCreatedStaffMemberInStorage
description: ''
parameters: []
responses:
201:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
first_name: John
last_name: Doe
date_of_birth: '1990-01-01'
gender: male
address: '123 Main St'
phone_number: 123-456-7890
email: john.doe@example.com
affectation_date: '2021-06-15'
contrat_type: CDI
function: teacher
n_cnss: '1234567890'
base_salary: 3000
bank_acount_num: '123456789'
properties:
id:
type: integer
example: 1
first_name:
type: string
example: John
last_name:
type: string
example: Doe
date_of_birth:
type: string
example: '1990-01-01'
gender:
type: string
example: male
address:
type: string
example: '123 Main St'
phone_number:
type: string
example: 123-456-7890
email:
type: string
example: john.doe@example.com
affectation_date:
type: string
example: '2021-06-15'
contrat_type:
type: string
example: CDI
function:
type: string
example: teacher
n_cnss:
type: string
example: '1234567890'
base_salary:
type: integer
example: 3000
bank_acount_num:
type: string
example: '123456789'
tags:
- Staff
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
description: 'The first name of the staff.'
example: John
nullable: false
last_name:
type: string
description: 'The last name of the staff.'
example: Doe
nullable: false
phone_number:
type: string
description: 'The phone number of the staff.'
example: 123-456-7890
nullable: false
email:
type: string
description: 'The email of the staff.'
example: john.doe@example.com
nullable: true
date_of_birth:
type: date
description: 'The date of birth of the staff.'
example: '1990-01-01'
nullable: true
gender:
type: string
description: 'The gender of the staff.'
example: male
nullable: true
address:
type: string
description: 'The address of the staff.'
example: '123 Main St'
nullable: true
affectation_date:
type: date
description: 'The date when the staff was assigned.'
example: '2021-06-15'
nullable: true
contrat_type:
type: string
description: 'The type of contract for the staff.'
example: CDI
nullable: true
function:
type: string
description: 'The function of the staff.'
example: teacher
nullable: true
n_cnss:
type: string
description: 'The CNSS number of the staff.'
example: '1234567890'
nullable: true
base_salary:
type: number
description: 'The base salary of the staff.'
example: 3000.0
nullable: true
bank_acount_num:
type: string
description: 'The bank account number of the staff.'
example: '123456789'
nullable: true
required:
- first_name
- last_name
- phone_number
- email
- date_of_birth
- gender
- address
- affectation_date
- function
- n_cnss
- base_salary
- bank_acount_num
security: []
'/api/v1/staff/{id}':
get:
summary: 'Display the specified staff member.'
operationId: displayTheSpecifiedStaffMember
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
first_name: John
last_name: Doe
date_of_birth: '1990-01-01'
gender: male
address: '123 Main St'
phone_number: 123-456-7890
email: john.doe@example.com
affectation_date: '2021-06-15'
contrat_type: CDI
function: teacher
n_cnss: '1234567890'
base_salary: 3000
bank_acount_num: '123456789'
properties:
id:
type: integer
example: 1
first_name:
type: string
example: John
last_name:
type: string
example: Doe
date_of_birth:
type: string
example: '1990-01-01'
gender:
type: string
example: male
address:
type: string
example: '123 Main St'
phone_number:
type: string
example: 123-456-7890
email:
type: string
example: john.doe@example.com
affectation_date:
type: string
example: '2021-06-15'
contrat_type:
type: string
example: CDI
function:
type: string
example: teacher
n_cnss:
type: string
example: '1234567890'
base_salary:
type: integer
example: 3000
bank_acount_num:
type: string
example: '123456789'
tags:
- Staff
security: []
put:
summary: 'Update the specified staff member in storage.'
operationId: updateTheSpecifiedStaffMemberInStorage
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
id: 1
first_name: John
last_name: Doe
date_of_birth: '1990-01-01'
gender: male
address: '123 Main St'
phone_number: 123-456-7890
email: john.doe@example.com
affectation_date: '2021-06-15'
contrat_type: CDI
function: teacher
n_cnss: '1234567890'
base_salary: 3000
bank_acount_num: '123456789'
properties:
id:
type: integer
example: 1
first_name:
type: string
example: John
last_name:
type: string
example: Doe
date_of_birth:
type: string
example: '1990-01-01'
gender:
type: string
example: male
address:
type: string
example: '123 Main St'
phone_number:
type: string
example: 123-456-7890
email:
type: string
example: john.doe@example.com
affectation_date:
type: string
example: '2021-06-15'
contrat_type:
type: string
example: CDI
function:
type: string
example: teacher
n_cnss:
type: string
example: '1234567890'
base_salary:
type: integer
example: 3000
bank_acount_num:
type: string
example: '123456789'
tags:
- Staff
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
first_name:
type: string
description: 'The new first name of the staff.'
example: John
nullable: false
last_name:
type: string
description: 'The new last name of the staff.'
example: Doe
nullable: false
date_of_birth:
type: date
description: 'The new date of birth of the staff.'
example: '1990-01-01'
nullable: true
gender:
type: string
description: 'The new gender of the staff.'
example: male
nullable: true
address:
type: string
description: 'The new address of the staff.'
example: '123 Main St'
nullable: true
phone_number:
type: string
description: 'The new phone number of the staff.'
example: 123-456-7890
nullable: false
email:
type: string
description: 'The new email of the staff.'
example: john.doe@example.com
nullable: false
affectation_date:
type: date
description: 'The new affectation date of the staff.'
example: '2021-06-15'
nullable: true
contrat_type:
type: string
description: 'The new type of contract for the staff.'
example: CDI
nullable: true
function:
type: string
description: 'The new function of the staff.'
example: teacher
nullable: true
n_cnss:
type: string
description: 'The new CNSS number of the staff.'
example: '1234567890'
nullable: false
base_salary:
type: number
description: 'The new base salary of the staff.'
example: 3000.0
nullable: true
bank_acount_num:
type: string
description: 'The new bank account number of the staff.'
example: '123456789'
nullable: false
security: []
delete:
summary: 'Remove the specified staff member from storage.'
operationId: removeTheSpecifiedStaffMemberFromStorage
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'Staff deleted successfully'
properties:
message:
type: string
example: 'Staff deleted successfully'
tags:
- Staff
security: []
parameters:
-
in: path
name: id
description: 'The ID of the staff.'
example: 1
required: true
schema:
type: integer
/api/v1/teachers:
get:
summary: "Retrieve staff members where the function is 'teacher'."
operationId: retrieveStaffMembersWhereTheFunctionIsteacher
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: array
items:
type: object
example:
-
id: 1
first_name: Jane
last_name: Smith
function: teacher
tags:
- Staff
security: []
'/api/v1/students/{student_id}/fee-types':
post:
summary: 'Assign fee types to a student.'
operationId: assignFeeTypesToAStudent
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'FeeTypes assigned successfully.'
properties:
message:
type: string
example: 'FeeTypes assigned successfully.'
tags:
- Students
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
fee_type_ids:
type: array
description: 'Array of fee type IDs.'
example:
- 1
- 2
items:
type: string
required:
- fee_type_ids
security: []
parameters:
-
in: path
name: student_id
description: 'The ID of the student.'
example: consequatur
required: true
schema:
type: string
-
in: path
name: student
description: 'The ID of the student.'
example: 1
required: true
schema:
type: integer
/api/v1/students:
get:
summary: 'List all students with their guardians and class.'
operationId: listAllStudentsWithTheirGuardiansAndClass
description: ''
parameters: []
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: array
tags:
- Students
security: []
post:
summary: 'Store a new student.'
operationId: storeANewStudent
description: ''
parameters: []
responses:
201:
description: ''
content:
text/plain:
schema:
type: string
example: "{\n \"message\": \"Student created successfully.\",\n \"student\": Student\n}"
tags:
- Students
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
first_name:
type: string
description: 'The first name of the student.'
example: John
nullable: false
last_name:
type: string
description: 'The last name of the student.'
example: Doe
nullable: false
first_name_arab:
type: string
description: "The student's first name in Arabic."
example: جون
nullable: true
last_name_arab:
type: string
description: "The student's last name in Arabic."
example: دو
nullable: true
gender:
type: string
description: "The student's gender."
example: male
nullable: false
date_of_birth:
type: date
description: "The student's date of birth."
example: '2005-06-15'
nullable: true
address:
type: string
description: "The student's address."
example: '123 Main St'
nullable: true
phone_number:
type: string
description: "The student's phone number."
example: '0612345678'
nullable: true
code_massar:
type: string
description: "The student's Massar code."
example: '123456'
nullable: false
class_id:
type: integer
description: 'The class ID the student belongs to.'
example: 1
nullable: true
image:
type: string
format: binary
description: 'The student’s image. Must be jpg, jpeg, or png.'
nullable: true
required:
- first_name
- last_name
- first_name_arab
- last_name_arab
- gender
- date_of_birth
- class_id
security: []
'/api/v1/students/{id}':
get:
summary: 'Get a specific student with guardians.'
operationId: getASpecificStudentWithGuardians
description: ''
parameters: []
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: Student
tags:
- Students
security: []
put:
summary: 'Update a student.'
operationId: updateAStudent
description: ''
parameters: []
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: Student
tags:
- Students
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
properties:
first_name:
type: string
description: 'The first name.'
example: John
nullable: false
last_name:
type: string
description: 'The last name.'
example: Doe
nullable: false
first_name_arab:
type: string
description: 'Must not be greater than 255 characters.'
example: qxbajwbpilpmufinllwlo
nullable: false
last_name_arab:
type: string
description: 'Must not be greater than 255 characters.'
example: auydlsmsjuryvojcybzvr
nullable: false
date_of_birth:
type: string
description: 'Must be a valid date.'
example: '2025-08-02T01:17:32'
nullable: false
gender:
type: string
description: ''
example: male
nullable: false
enum:
- male
- female
- other
address:
type: string
description: 'Must not be greater than 255 characters.'
example: byickznkygloigmkwxphl
nullable: true
phone_number:
type: string
description: 'Must not be greater than 20 characters.'
example: vazjrcnfbaqywuxhg
nullable: true
code_massar:
type: string
description: 'Must not be greater than 191 characters.'
example: jjmzuxjubqouzswiwxtrk
nullable: false
class_id:
type: integer
description: 'The id of an existing record in the classes table.'
example: 17
nullable: true
image:
type: string
format: binary
description: 'Optional image (jpg, jpeg, png, gif).'
nullable: true
guardians:
type: array
description: 'List of guardian IDs.'
example:
- consequatur
items:
type: string
required:
- first_name
- last_name
security: []
delete:
summary: 'Delete a student.'
operationId: deleteAStudent
description: ''
parameters: []
responses:
204:
description: ''
tags:
- Students
security: []
parameters:
-
in: path
name: id
description: 'The ID of the student.'
example: 17
required: true
schema:
type: integer
-
in: path
name: student
description: 'The ID of the student.'
example: 1
required: true
schema:
type: integer
'/api/v1/students/profile-image/{filename}':
get:
summary: "Get a student's profile image."
operationId: getAStudentsProfileImage
description: ''
parameters: []
responses:
200:
description: ''
content:
text/plain:
schema:
type: string
example: 'file Returns the student image file.'
404:
description: ''
content:
application/json:
schema:
type: object
example:
message: 'Image not found.'
properties:
message:
type: string
example: 'Image not found.'
tags:
- Students
security: []
parameters:
-
in: path
name: filename
description: 'The name of the image file.'
example: avatar.jpg
required: true
schema:
type: string