Student
Base URL: http://192.168.100.250/
Endpoints
Section titled “Endpoints”| Method | Endpoint | Description |
|---|---|---|
| GET | /students |
List students (page load or DataTable) |
| GET | /students/:id |
View student details |
| GET | /students/:id/edit |
Get student edit form data |
| POST | /students |
Create student |
| PUT | /students/:id |
Update student |
| DELETE | /students/:id |
Delete student |
| POST | /students/import |
Import students (Excel) |
| POST | /students/mark-dropout |
Mark single dropout |
| POST | /students/bulk-delete |
Bulk delete students |
| POST | /students/bulk-dropout |
Bulk dropout students |
| GET | /program-semesters |
Get semesters for a program |
List Students (Page Load)
Section titled “List Students (Page Load)”GET /studentsAccept: application/jsonResponse (200):
{ "success": true, "data": { "students": [ ... ], "faculties": [ ... ], "programs": [ ... ], "academic_years": [ ... ], "batches": [ ... ] }}DataTable (Server-Side Pagination)
Section titled “DataTable (Server-Side Pagination)”GET /students?draw=1&start=0&length=10&academic_year_id=10&faculty_id=36&program_id=7&gender=maleQuery Parameters:
| Param | Required | Description |
|---|---|---|
draw |
Yes | Request counter (for DataTables) |
start |
Yes | Offset (0-based) |
length |
Yes | Page size |
academic_year_id |
No | Filter by academic year |
faculty_id |
No | Filter by faculty |
program_id |
No | Filter by program |
semester |
No | Filter by semester |
gender |
No | male, female, or other |
batch_id |
No | Filter by batch |
show_all |
No | Show all records |
Response (DataTable format):
{ "draw": 1, "recordsTotal": 1250, "recordsFiltered": 320, "data": [ { "id": 1, "reg_no": "TU-BMC-2024-001", "first_name": "Hari", "last_name": "Sharma", "gender": "Male", "faculty": "Management", "program": "BBS", "semester": 3, "batch": "2077" } ]}View Student
Section titled “View Student”GET /students/:idAccept: application/jsonResponse (200):
{ "success": true, "data": { "student": { "id": 1, "reg_no": "TU-BMC-2024-001", "first_name": "Hari", "middle_name": "Prasad", "last_name": "Sharma", "nepali_name": "हरि प्रसाद शर्मा", "mobile_number": "9800000000", "email": "hari.sharma@example.com", "date_of_birth": "2050-05-12", "gender": "Male", "current_academic_record": { ... }, "photo_url": "..." } }}Get Edit Form Data
Section titled “Get Edit Form Data”GET /students/:id/editAccept: application/jsonResponse (200): Same as Create form data + current student values.
Create Student
Section titled “Create Student”POST /studentsContent-Type: application/jsonRequest Body:
{ "reg_no": "TU-BMC-2024-001", "first_name": "Hari", "middle_name": "Prasad", "last_name": "Sharma", "nepali_name": "हरि प्रसाद शर्मा", "mobile_number": "9800000000", "email": "hari.sharma@example.com", "date_of_birth": "2050-05-12", "date_of_birth_eng": "1993-08-28", "gender": "Male", "marital_status": "Single", "blood_group": "A+", "handicap_category": null, "caste_ethnicity": "Brahmin", "edj": "Hindu", "disability_status": "able", "disability_type": null, "citizenship_number": "12-34-56-78901", "citizenship_issue_district": null, "national_id": "1993280123456", "nationality": null, "religion": null, "entrance_candidate_id": null, "has_scholarship": false, "is_mukta_kamaiya": false, "is_from_martyr_family": false, "is_economically_disadvantaged": false, "is_same_as_permanent": false, "permanent_province": "Bagmati", "permanent_district": "Chitwan", "permanent_local_level": "Bharatpur", "permanent_ward_no": "10", "permanent_tole": "Main Road", "permanent_house_no": "123", "permanent_block_no": null, "temporary_province": "Bagmati", "temporary_district": "Chitwan", "temporary_local_level": "Bharatpur", "temporary_ward_no": "10", "temporary_tole": "Main Road", "temporary_house_no": "123", "temporary_block_no": null, "father_name": "Krishna Sharma", "father_contact": "9800000001", "father_email": "krishna@example.com", "father_occupation": "Farmer", "mother_name": "Sita Sharma", "mother_contact": "9800000002", "mother_email": null, "mother_occupation": "Housewife", "local_guardian_name": null, "local_guardian_mobile": null, "local_guardian_relation": null, "local_guardian_address": null, "guardian_occupation": null, "guardian_email": null, "level_id": 1, "faculty_id": 36, "program_id": 1, "academic_year_id": 11, "batch_id": 1, "date_of_admission": "2080-01-01", "shift": "Day", "section": null, "roll_no": null, "reg_no_manual": null, "roll_no_manual": null, "university_regd_no": null}Response (201):
{ "success": true, "message": "Student created successfully", "data": { "student": { ... } }}File Upload Fields (multipart/form-data only):
| Field | Type | Max Size |
|---|---|---|
photo |
jpeg/png/jpg | 2MB |
citizenship_pic |
jpeg/png/jpg | 2MB |
citizenship_front |
jpeg/png/jpg | 2MB |
citizenship_back |
jpeg/png/jpg | 2MB |
nid_pic |
jpeg/png/jpg | 2MB |
digital_signature |
jpeg/png/jpg | 2MB |
Update Student
Section titled “Update Student”PUT /students/:idContent-Type: application/jsonRequest Body: Same as Create.
Response (200):
{ "success": true, "message": "Student updated successfully"}Delete Student
Section titled “Delete Student”DELETE /students/:idResponse (200):
{ "success": true, "message": "Student deleted successfully"}Import Students (Excel)
Section titled “Import Students (Excel)”POST /students/importContent-Type: multipart/form-dataBody: FormData with file field containing Excel file (.xlsx, .xls).
Response (200):
{ "success": true, "message": "Students imported successfully", "data": { "imported": 45, "skipped": 3, "errors": [] }}Mark Single Dropout
Section titled “Mark Single Dropout”POST /students/mark-dropoutContent-Type: application/jsonRequest Body:
{ "student_id": "stu_001", "academic_record_id": "rec_001"}Response (200):
{ "success": true, "message": "Student marked as dropout"}Bulk Delete
Section titled “Bulk Delete”POST /students/bulk-deleteContent-Type: application/jsonRequest Body:
{ "ids": [1, 2, 3]}Response (200):
{ "success": true, "message": "3 students deleted"}Bulk Dropout
Section titled “Bulk Dropout”POST /students/bulk-dropoutContent-Type: application/jsonRequest Body:
{ "ids": [1, 2, 3]}Response (200):
{ "success": true, "message": "3 students marked as dropout"}Get Semesters for Program
Section titled “Get Semesters for Program”GET /program-semesters?program_id={{programId}}Accept: application/jsonResponse (200):
{ "success": true, "data": { "semesters": [ { "id": 1, "semester_number": 1, "name": "First Semester" }, { "id": 2, "semester_number": 2, "name": "Second Semester" } ] }}Graduate Student
Section titled “Graduate Student”POST /graduationsContent-Type: multipart/form-data| Field | Required | Type |
|---|---|---|
student_id |
Yes | string |
degree_awarded |
Yes | string |
final_grade |
No | string |
graduation_date |
Yes | date (BS) |
remarks |
No | string |
certificate |
No | file (pdf/jpg/png, max 2MB) |
transcript |
No | file (pdf/jpg/png, max 2MB) |
Response (201):
{ "success": true, "message": "Student graduated successfully"}