POST ./ani/periods
It is used to add new period for a school year.
POST parameters
| Name | Value Type | Validation | Details |
|---|---|---|---|
| ascID | int | Required | School Year |
| type | string | Required | values['semestru','trimestru','modul','an'] |
| isActive | int | Required | values[0,1]; Set the period as active. |
| startDate | date | Required; rfc_date | Sets the begininngs of the period. |
| endDate | date | Required; rfc_date | Sets the end of the period. |
| orderID | int | Required | Set the school year order. |
Validation
| Error Field | Error Code | Error Message |
|---|---|---|
| ascID | 101 | Invalid ascID. |
| startDate, endDate | 102 | The date in invalid |
| endDate | 103 | The end date must be higher than start date. |
| endDate | 104 | The selected period is overlaped with other periods from DB |
| startDate & endDate | 105 | The period should be fully included in the selected school year. |
| orderID | 20 | The field must contain a number greater than zero. |
| type | 26 | The field must contain a one of the following values: %%. |
Output example
{"id": 61}
