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
| Name | Value Type | Validation | Details |
|---|---|---|---|
| type | string | Required | Exemption type (student teacher can only add subject exemption) |
| elevID | int | Required | Student ID. |
| clID | int | Required | Class ID. |
| e2mID | int | Required (for exemption type subject) | student - subject mapping ID. |
| dateStart | date | Required | First day for exemption (format Y-m-d). |
| dateEnd | date | Required | The last day of exemption (format Y-m-d). |
| details | string | Required | Exemption details |
| files | array | Optional | A list of file ID |
| activities | array | Required (for exemption type parental) | An activity for each day. (check activity object) |
| showInReports | int | Required (for exemption type subject) | Show details in reports |
| justifyAbsences | int | Required (for exemption type subject) | A list of file ID |
Activity object
| Name | Value Type | Validation | Details |
|---|---|---|---|
| date | rfc_date | Required | Exemption type (if is only student teacher you only can add subject exemption) |
| activities | array | List of activity ID (if class has an published timetable) |
Validation
| Error Field | Error Code | Error Message |
|---|---|---|
| elevID | 101 | elevID not found |
| elevID | 102 | elevID class not found |
| elevID | 103 | Exemptions justified absences limit reached (for exemption type parental) |
| clID | 104 | Invalid clID |
| clID | 103 | You have no permissions to this classroom |
| clID | 105 | Has blocked periods (we use dateStart, dateEnd ) |
| dateStart, dateEnd | 101 | The selected date must be in school year period |
| dateStart, dateEnd | 110 | The date format is not Y-m-d or the date is invalid |
| dateEnd | 102 | Add window days exceeded (for exemption type parental) |
| dateEnd | 107 | The selected period overlap with another exemption. |
| dateEnd | 114 | The end date must be higher than start date |
| e2mID | 101 | e2mID not found |
| e2mID | 102 | no exemptions allowed for selected subject |
| files | 106 | Invalid fsID |
| activities | 101 | Activities number doesn't match with selected period |
| activities | 102 | activity date is required |
| activities | 103 | activity date format is not Y-m-d |
| activities | 104 | activity date must be in school year period |
| activities | 105 | activity date must be in selected period |
| activities | 106 | duplicate activity date |
| activities | 107 | activityID not found |
| activities | 108 | timetable is not published |
| activities | 109 | activity is not from clID |
Output example
{"id": 1}
