EMS-UGC API Docs
Students

Student

Student Management APIs

Base URL: http://192.168.100.250/


Endpoints

MethodEndpointDescription
GET/studentsList students (page load or DataTable)
GET/students/:idView student details
GET/students/:id/editGet student edit form data
POST/studentsCreate student
PUT/students/:idUpdate student
DELETE/students/:idDelete student
POST/students/importImport students (Excel)
POST/students/mark-dropoutMark single dropout
POST/students/bulk-deleteBulk delete students
POST/students/bulk-dropoutBulk dropout students
GET/program-semestersGet semesters for a program

List Students (Page Load)

GET /students
Accept: application/json

Response (200):

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

DataTable (Server-Side Pagination)

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

Query Parameters:

ParamRequiredDescription
drawYesRequest counter (for DataTables)
startYesOffset (0-based)
lengthYesPage size
academic_year_idNoFilter by academic year
faculty_idNoFilter by faculty
program_idNoFilter by program
semesterNoFilter by semester
genderNomale, female, or other
batch_idNoFilter by batch
show_allNoShow 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

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 Edit Form Data

GET /students/:id/edit
Accept: application/json

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


Create Student

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):

FieldTypeMax Size
photojpeg/png/jpg2MB
citizenship_picjpeg/png/jpg2MB
citizenship_frontjpeg/png/jpg2MB
citizenship_backjpeg/png/jpg2MB
nid_picjpeg/png/jpg2MB
digital_signaturejpeg/png/jpg2MB

Update Student

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

Request Body: Same as Create.

Response (200):

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

Delete Student

DELETE /students/:id

Response (200):

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

Import Students (Excel)

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": []
  }
}

Mark Single Dropout

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

Bulk Delete

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

Request Body:

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

Response (200):

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

Bulk Dropout

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 Semesters for Program

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

Graduate Student

POST /graduations
Content-Type: multipart/form-data
FieldRequiredType
student_idYesstring
degree_awardedYesstring
final_gradeNostring
graduation_dateYesdate (BS)
remarksNostring
certificateNofile (pdf/jpg/png, max 2MB)
transcriptNofile (pdf/jpg/png, max 2MB)

Response (201):

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

On this page