Attendance Module - PaperLessEdu/schoolerp-backend GitHub Wiki

Post attendance api

curl -X POST \ http://dev.cloudscripts.co.in:8081/schoolManagement/attendance \ -H 'accept: application/json' \ -H 'cache-control: no-cache' \ -H 'content-type: application/json' \ -H 'postman-token: aa66b88c-1c21-8667-7c3b-84e890894e1d' \ -d '{"date":"2018-01-01","is_present":false,"standard":12,"division":6,"studentIds":[20]}'

Get Attendance Api

curl -X GET
'http://dev.cloudscripts.co.in:8081/schoolManagement/attendance?standard=21&division=11&date=2018-05-04'
-H 'Cache-Control: no-cache'
-H 'Content-Type: application/json'
-H 'Postman-Token: 31117e5a-6ac4-41c4-a304-ad97be686a62'


PFB API and DB details we need for attendance. If you have any suggestions we will change it.

Assume that user has selected Standard 1st and Division A

StandardId = 21 DivisionId = 11

Post attendance API: api/students/attendance

{ "date": 28/07/2018, "standard": 21, "division": 11, "studentIds": [12, 13, 14, 15] (absent student IDs) }

This post API will add the following rows in attendance table.

attendance table attendance_id student_id standard_id division_id is_present date 1 12 21 11 false 28/07/2018
2 13 21 11 false 28/07/2018 3 14 21 11 false 28/07/2018 4 15 21 11 false 28/07/2018


Get Students API: (We have to pass standard id, division id and date) api/students/attendance?standard=21&division=11&date=28/07/2018

Response for the above API: { absentStundetList: [ { studentId: 12, firstName: 'Yuvraj', lastName: 'Gawade', isPresent: false }, { studentId: 13, firstName: 'Prasad', lastName: 'Khegade', isPresent: false }, { studentId: 14, firstName: 'Jayesh', lastName: 'Varma', isPresent: false }, { studentId: 15, firstName: 'Pawan', lastName: 'Pawar', isPresent: false } ] }