POST ./materii
Used to add a school subject.
POST parameters
| Name | Value Type | Validation | Details |
|---|
| matNume | string | required | Subject name. |
| matPrescurtare | string | required | Subject short name. |
| matOptScutire | bool | optional | Students may be exempt. |
| matOpt | bool | optional | Subject is optional. |
| matRapoarteElevi | bool | optional | Allows student reports. |
| matRoomsIds | array | optional | Rooms Ids |
Validation
| Error Field | Error Code | Error Message |
|---|
| matNume | 8 | The field can not exceed 100 characters in length. |
| matNume | 101 | The field must contain a unique value |
| matPrescurtare | 8 | The field can not exceed 50 characters in length. |
| matRoomsIds | 102 | Invalid room id |
Output example
{
"result": true
}