FadhaAlatfal.com
Today is a great one!
Introduction
this document aims to inroduce kidsspace back-end APIs in which the application app can invoke to utilize several backend services
| Api | Url | Method |
|---|---|---|
| Send Message API |
/api/api_add_new_message/
|
POST |
| Set read message API |
/api/set_read_message/
|
POST |
| List messages API |
/api/get_message_list/
|
GET |
API to enable an app user to send a message to the corresponding school manager
/api/api_add_new_message/
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
| Input Field | Example |
|---|---|
| content_message |
text_content
|
| student_id |
12
|
Output Example
{
"status": 1,
"message": "the message has sent"
}
Set read message API
API to mark a message as read
/api/set_read_message/
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
| Input Field | Example |
|---|---|
| message_id |
1
|
Output Example
{
"status": 1,
"message": "the message has updated"
}
list messages API
API to a user messages
/api/get_message_list/
| Header | |
|---|---|
| Token (input in aheader of request) |
b21lcl9vbWVyM0BnbWFpbC5jb20
|
| Content-Type (input in aheader of request) |
Application/json
|
Output Example
{
"message": "تم قراءة الرسائل بنجاح",
"messages_list": [
{
"content": "hjghjghjgjh",
"date": "2020-09-03 22:35:15.924732+00:00",
"from_user_id": 333,
"id": 8,
"isShow": false,
"kid_class_id": null,
"to_user_id": 102,
"trash": 0
}
],
"status": 1
}