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
Sign-up API /api/register-kid/ POST
Sign-in API /api/get-registred-kids/ GET
update-student-progress API /api/update-student-progress/ POST
get_student_all_progress API /api/get_student_all_progress/ POST
get_student_progress API /api/get_student_progress/ POST

API to register a new kid. Note that a user will be considered as kid :

/api/register-kid/

Header
Token (input in aheader of request) b21lcl9vbWVyM0BnbWFpbC5jb20
Content-Type (input in aheader of request) Application/json
Input Field Example
name Ahmed
father_name Mohammed
last_name Alsobai
mother_name Noor
age It must enter date as (d/m/y)
gender male
className let it blank
telephone 723881700
mobile 723881700
level عالي/مبتدئ/متوسط/

Output Example

{
"title": "إنشاء طفل جديد",
"status": "1",
"type": "success",
"message": "تمَّت عمليَّة التسجيل بنجاح"
}

List Registered Kids

API to enable a parent to list all kids that is registered by him:

/api/get-registred-kids/

Header
Token (input in aheader of request) b21lcl9vbWVyM0BnbWFpbC5jb20
Content-Type (input in aheader of request) Application/json

Output Example

{
"title": "عرض الأطفال المسجلين لدى ولي الأمر",
"data": [
{
"model": "app.student",
"pk": 30,
"fields": {
"kid_name": "moh",
"father_name": "Moh",
"gender": 0,
"age": 3,
"kid_class": 1,
"photo": "photos/user.jpg"
}
},
{
"model": "app.student",
"pk": 31,
"fields": {
"kid_name": "لمياء",
"father_name": "Moh",
"gender": 1,
"age": 3,
"photo": "photos/user.jpg"
}
},
{
"model": "app.student",
"pk": 32,
"fields": {
"kid_name": "سالم",
"father_name": "Moh",
"gender": 0,
"age": 3,
"photo": "photos/user.jpg"
}
}
],
"status": "1",
"type": "success",
"message": "تمَّت عمليَّة العرض بنجاح"
}

Update Student Progress API

API to enable a user to Update Student Progress:

/api/update-student-progress/

Header
Token (input in aheader of request) b21lcl9vbWVyM0BnbWFpbC5jb20
Content-Type (input in aheader of request) Application/json
Input Field Example
content-id 1
progress 70
student-id 31

Output Example

{
"status": 1,
"message": "ممتاز تمت العملية بنجاح"
}

Get all progresses of student API

API to get all progress of student according to id.:

/api/get_student_all_progress/

Header
Token (input in aheader of request) b21lcl9vbWVyM0BnbWFpbC5jb20
Content-Type (input in aheader of request) Application/json
Input Field Example
student_id 31

Output Example

{
"status": 1,
"letters_performance": 70.0,
"numbers_performance": 0.0,
"shapes_performance": 0.0,
"puzzles_performance": 0.0
}

Get progresses of student API

API to get progress of student according to id.:

/api/get_student_progress/

Header
Token (input in aheader of request) b21lcl9vbWVyM0BnbWFpbC5jb20
Content-Type (input in aheader of request) Application/json
Input Field Example
student_id 31

Output Example

{
"letters_content": {
"A": "70.0",
"B": 0,
"eee": 0
},
"numbers_content": {
"اثنين": 0,
"واحد": 0
}, "paints_content": {
"الأحمر": 0
}, "shapes_content": {
"المستطيل": 0
}, "student_all_stats": [
{
"fields": {
"last_update": "2020-09-04",
"letters_performance": 70.0,
"numbers_performance": 0.0,
"puzzles_performance": 0.0,
"shapes_performance": 0.0,
"stu": 31,
"total_performance": 17.5
},
"model": "app.studentstats",
"pk": 31
}
]
}