List, create, update, delete notifications
| Header | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| Authorization | Required | string | Authorization Token |
| schoolId | Required | string | School ID of the Authorization Token |
GET: https://schoolid.smartclass.school/public/v1/notifications
| Path Parameter | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| userId | Required | string | User ID of the user that will be authenticated |
| userLanguage | Optional | string | Language of the user. If not sent, school default language will be considered. |
{
"notifications": [
{
"id": 8482,
"subject": "Şifre Değiştirme",
"msgBody": "Sayın Şimşek, Kullanıcı şifreniz değiştirilmiştir.<br><br>Eğer siz değiştirmediyseniz lütfen sistem yöneticinize haber veriniz.",
"fromUser": "support@smartclass.email",
"sentTime": "19.04.2019 04:34",
"msgRead": "0"
},
{
"id": 6613,
"subject": "Görev Atandı",
"msgBody": "Görev Atandı [Toplantı Kararları [deneme toplantısı]]",
"fromUser": "345232345",
"sentTime": "13.10.2018 21:49",
"msgRead": "0"
}
],
"nodataText": "Hepsi bu kadar!<br>Yeni bildirim yok."
}
GET: https://schoolid.smartclass.school/public/v1/notifications/:id
| Path Parameter | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| id | Required | string | Notification Id |
| userId | Required | string | User ID |
| userLanguage | Optional | string | Language of the user. If not sent, school default language will be considered. |
{
"notification": {
"id": 8482,
"attachment": "",
"subject": "Şifre Değiştirme",
"msgBody": "Sayın Şimşek, Kullanıcı şifreniz değiştirilmiştir.<br><br>Eğer siz değiştirmediyseniz lütfen sistem yöneticinize haber veriniz.",
"fromUser": "support@smartclass.email",
"toUser": "simsek",
"ccUser": "",
"sentTime": "19.04.2019 04:34",
"schoolId": 0
}
}
Updates read status of a notification.
PUT: https://schoolid.smartclass.school/public/v1/notifications/:id
| Path Parameter | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| id | Required | string | Notification Id |
| userId | Required | string | User ID |
| msgRead | Optional | enum(0, 1) | Read or unread info of the notification. If not sent, it will be treated as 1 |
| userLanguage | Optional | string | Language of the user. If not sent, school default language will be considered. |
{
"message": {
"success": "Saved."
}
}
POST: https://schoolid.smartclass.school/public/v1/notifications
| Path Parameter | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| userId | Required | string | User ID |
| userLanguage | Optional | string | Language of the user. If not sent, school default language will be considered. |
| Post Parameter | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| title | Required | string | Title of the notification |
| content | Required | string | Body of the notification |
{
"message": {
"success": "Your message has been sent successfully !"
},
}
DELETE: https://schoolid.smartclass.school/public/v1/notifications/:id
| Path Parameter | Required/Optional | Data Type | Explanation |
|---|---|---|---|
| id | Required | string | Notification ID |
| userId | Required | string | User ID |
| userLanguage | Optional | string | Language of the user. If not sent, school default language will be considered. |
{
"message": {
"success": "Deleted"
}
}