Skip to content

Student

Base URL: http://192.168.100.250/


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

GET /students
Accept: application/json

Response (200):

{
"success": true,
"data": {
"students": [ ... ],
"faculties": [ ... ],
"programs": [ ... ],
"academic_years": [ ... ],
"batches": [ ... ]
}
}

GET /students?draw=1&start=0&length=10&academic_year_id=10&faculty_id=36&program_id=7&gender=male

Query 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"
}
]
}

GET /students/:id
Accept: application/json

Response (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 /students/:id/edit
Accept: application/json

Response (200): Same as Create form data + current student values.


POST /students
Content-Type: application/json

Request 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

PUT /students/:id
Content-Type: application/json

Request Body: Same as Create.

Response (200):

{
"success": true,
"message": "Student updated successfully"
}

DELETE /students/:id

Response (200):

{
"success": true,
"message": "Student deleted successfully"
}

POST /students/import
Content-Type: multipart/form-data

Body: FormData with file field containing Excel file (.xlsx, .xls).

Response (200):

{
"success": true,
"message": "Students imported successfully",
"data": {
"imported": 45,
"skipped": 3,
"errors": []
}
}

POST /students/mark-dropout
Content-Type: application/json

Request Body:

{
"student_id": "stu_001",
"academic_record_id": "rec_001"
}

Response (200):

{
"success": true,
"message": "Student marked as dropout"
}

POST /students/bulk-delete
Content-Type: application/json

Request Body:

{
"ids": [1, 2, 3]
}

Response (200):

{
"success": true,
"message": "3 students deleted"
}

POST /students/bulk-dropout
Content-Type: application/json

Request Body:

{
"ids": [1, 2, 3]
}

Response (200):

{
"success": true,
"message": "3 students marked as dropout"
}

GET /program-semesters?program_id={{programId}}
Accept: application/json

Response (200):

{
"success": true,
"data": {
"semesters": [
{ "id": 1, "semester_number": 1, "name": "First Semester" },
{ "id": 2, "semester_number": 2, "name": "Second Semester" }
]
}
}

POST /graduations
Content-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"
}