SamaySetu API Docs LogoSamaySetu API Docs Logo
SamaySetu API Docsv1.0.0
  • Documentation
  • API Reference
Information
Authentication
Accounts & Access
Academic Structure
    Academic Years
    Departments
    Divisions
      List DivisionsgetCreate DivisionpostList Divisions by YeargetGet DivisiongetUpdate DivisionputDelete Divisiondelete
    Batches
Curriculum & Infrastructure
Faculty Management
Timetable Management
Analytics & System
Security Governance
SamaySetu API Documentation
SamaySetu API Documentation

Divisions

Student divisions, student counts, and time-slot profile mapping


List Divisions

GET
https://api.samaysetu.example
/admin/api/divisions

Returns divisions within the caller's authorized scope.

Required Permission: division.read (JWT Bearer + scope check).

List Divisions › Responses

OK

​Division[]
Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time
GET/admin/api/divisions
curl https://api.samaysetu.example/admin/api/divisions \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" } ]
json
application/json

Create Division

POST
https://api.samaysetu.example
/admin/api/divisions

Creates a new student division for a department and academic year.

Required Permission: division.create (JWT Bearer + scope check).

Create Division › Request Body

Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time

Create Division › Responses

OK

Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time
POST/admin/api/divisions
curl https://api.samaysetu.example/admin/api/divisions \ --request POST \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" } }'
Example Request Body
{ "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" } }
json
application/json
Example Responses
{ "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }
json
application/json

List Divisions by Year

GET
https://api.samaysetu.example
/admin/api/divisions/academic-year/{academicYearId}

Returns divisions for the given academic year.

Required Permission: division.read (JWT Bearer + scope check).

List Divisions by Year › path Parameters

academicYearId
​integer · int64 · required

Path parameter academicYearId.

List Divisions by Year › Responses

OK

​Division[]
Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time
GET/admin/api/divisions/academic-year/{academicYearId}
curl https://api.samaysetu.example/admin/api/divisions/academic-year/:academicYearId \ --header 'Authorization: Bearer <token>'
Example Responses
[ { "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" } ]
json
application/json

Get Division

GET
https://api.samaysetu.example
/admin/api/divisions/{id}

Returns a single division by ID.

Required Permission: division.read (JWT Bearer + scope check).

Get Division › path Parameters

id
​integer · int64 · required

Path parameter id.

Get Division › Responses

OK

Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time
GET/admin/api/divisions/{id}
curl https://api.samaysetu.example/admin/api/divisions/:id \ --header 'Authorization: Bearer <token>'
Example Responses
{ "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 72, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }
json
application/json

Update Division

PUT
https://api.samaysetu.example
/admin/api/divisions/{id}

Updates division capacity, academic year, department, or schedule type.

Required Permission: division.update (JWT Bearer + scope check).

Update Division › path Parameters

id
​integer · int64 · required

Path parameter id.

Update Division › Request Body

Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time

Update Division › Responses

OK

Division
branch
​string · minLength: 0 · maxLength: 50 · required
name
​string · minLength: 0 · maxLength: 10 · required
year
​integer · int32 · min: 1 · max: 4 · required
​AcademicYear
classRepresentative
​string · minLength: 0 · maxLength: 100
classTeacher
​string · minLength: 0 · maxLength: 100
createdAt
​string · date-time
​DepartmentEntity
id
​integer · int64
isActive
​boolean
timeSlotType
​string · minLength: 0 · maxLength: 20
totalStudents
​integer · int32 · min: 0
updatedAt
​string · date-time
PUT/admin/api/divisions/{id}
curl https://api.samaysetu.example/admin/api/divisions/:id \ --request PUT \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer <token>' \ --data '{ "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 74, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" } }'
Example Request Body
{ "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 74, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" } }
json
application/json
Example Responses
{ "id": 12, "name": "TY-A", "branch": "Computer Engineering", "year": 3, "totalStudents": 74, "classTeacher": "Prof. Rohan Patil", "classRepresentative": "Omkar Shinde", "timeSlotType": "TYPE_1", "isActive": true, "department": { "id": 101, "name": "Computer Engineering", "code": "COMP", "headOfDepartment": "Dr. Snehal Deshmukh", "years": "1,2,3,4", "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-15T09:30:00Z", "updatedAt": "2026-06-20T10:15:00Z" }, "academicYear": { "id": 4, "yearName": "2026-27", "startDate": "2026-07-01", "endDate": "2027-05-31", "isCurrent": true, "createdAt": "2026-06-15T09:00:00Z" }, "createdAt": "2026-06-18T11:00:00Z", "updatedAt": "2026-06-18T11:00:00Z" }
json
application/json

Delete Division

DELETE
https://api.samaysetu.example
/admin/api/divisions/{id}

Deletes a division by ID.

Required Permission: division.delete (JWT Bearer + scope check).

Delete Division › path Parameters

id
​integer · int64 · required

Path parameter id.

Delete Division › Responses

OK

string
DELETE/admin/api/divisions/{id}
curl https://api.samaysetu.example/admin/api/divisions/:id \ --request DELETE \ --header 'Authorization: Bearer <token>'
Example Responses
Division deleted successfully
json
application/json

DepartmentsBatches