POST ./mesaje
Need subscription flag to send a message to groups (limited acces for student/parent): FLAG_MSG_GROUP
It is used to send a message.
If the message is a draft field msgDestinatar will not be mandatory.
The workflow to create a draft:
- to create a draft the request should be made with the parameter msgCiorna = 1;
- to update a draft a request is made with the parameter msgCiorna = 1 and msgCiornaID = msgID; msgID will be the ID that was received after the creation of the draft.
- when the final message will be sent, the request will be made only with msgCiornaID in order to delete the draft automatically.
POST parameters
Name | Value Type | Validation | Details |
---|---|---|---|
msgDestinatar | array | Required | Array with message recipients. |
msgSubiect | string | Required | MEssage subject. |
msgContinut | string | Required | The content of the message. |
msgAtasamente | array | Optional | Array with attachment ids obtained from Upload files. |
msgCiorna | int | Optional | values[1]; Specifies whether the message is a draft or not. |
msgCiornaID | int | Optional | Specifies the draft id that will be updated or deleted when the message is sent. |
replyMsgID | int | Optional | Reply message id. |
Recipient format
Format | Details |
---|---|
1-elevID | Message to the student elevID |
2-elevID | Message to the student's parents elevID. |
3-cadID | Message to the teacher cadID. |
5-pinstID | Message to institution staff pinstID. |
g-elevi-all | Message to all students in the current school year. |
g-elevi-ast-astID | Message to students in the current school year and year of study astID. |
g-elevi-cl-clID | Message to the students in the class clID. |
g-elevi-cmc-cmcID | Message to all students from the association between a teacher, a subject and a class cmcID. |
g-parinti-all | Message to the parents of the students of the current school year. |
g-parinti-ast-astID | Message to the parents of the students of the current school year and the year of studyastID. |
g-parinti-cl-clID | Message to the parents of the students in the class clID. |
g-parinti-cmc-cmcID | Message to all parents from the association between a teacher, a subject and a class cmcID. |
g-cadre-all | Message to all teachers. |
g-cadre-ast-astID | Message to teachers who teach in the current school year to the year of study astID. |
g-cadre-cl-clID | Message to teachers who teach in class clID. |
g-cadre-mat-matID | Message to the teachers who teach the subject matID. |
g-cadre-cf-cfID | Message to the teachers who have the function cfID. |
g-inst-instID | Message to all staff of the institution instID. |
Validation
Error Field | Error Code | Error Message |
---|---|---|
msgDestinatar | 101 | At least one of the recipients is disabled. |
msgDestinatar | 103 | You are not allowed to send messages to groups. |
replyMsgID | 102 | Invalid ID or no permission. |
msgContinut | 105 | The maximum limit of 30,000 characters has been reached. |
Output example
{"msgID": 8065}