POST ./exemptions

Add new exemption for a student.

The parameter type can have the following values: medical, contest, subject, parental

For files you should use the endpoint /fisiere/upload.

POST parameters

NameValue TypeValidationDetails
typestringRequiredExemption type (student teacher can only add subject exemption)
elevIDintRequiredStudent ID.
clIDintRequiredClass ID.
e2mIDintRequired (for exemption type subject)student - subject mapping ID.
dateStartdateRequiredFirst day for exemption (format Y-m-d).
dateEnddateRequiredThe last day of exemption (format Y-m-d).
detailsstringRequiredExemption details
filesarrayOptionalA list of file ID
activitiesarrayRequired (for exemption type parental)An activity for each day. (check activity object)
showInReportsintRequired (for exemption type subject)Show details in reports
justifyAbsencesintRequired (for exemption type subject)A list of file ID

Activity object

NameValue TypeValidationDetails
daterfc_dateRequiredExemption type (if is only student teacher you only can add subject exemption)
activitiesarrayList of activity ID (if class has an published timetable)

Validation

Error FieldError CodeError Message
elevID101elevID not found
elevID102elevID class not found
elevID103Exemptions justified absences limit reached (for exemption type parental)
clID104Invalid clID
clID103You have no permissions to this classroom
clID105Has blocked periods (we use dateStart, dateEnd )
dateStart, dateEnd101The selected date must be in school year period
dateStart, dateEnd110The date format is not Y-m-d or the date is invalid
dateEnd102Add window days exceeded (for exemption type parental)
dateEnd107The selected period overlap with another exemption.
dateEnd114The end date must be higher than start date
e2mID101e2mID not found
e2mID102no exemptions allowed for selected subject
files106Invalid fsID
activities101Activities number doesn't match with selected period
activities102activity date is required
activities103activity date format is not Y-m-d
activities104activity date must be in school year period
activities105activity date must be in selected period
activities106duplicate activity date
activities107activityID not found
activities108timetable is not published
activities109activity is not from clID

Output example

{
"id": 1
}