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/Sign-up/ POST
Sign-in API /api/Sign-in/ POST
Apple Sign-in API /api/Apple-SignIn/ POST
Sign-in With Social Media API /api/Social/Sign-in/ POST
Password Reset API /api/resetPassword/ POST
User info API /api/userinfo/ GET
Student Info API /api/studentData/id GET
Get Token API /api-token-auth/ POST
Resend Activation link API /api/resend-activation/ GET

API to register a new user. Note that a user will be considered as parent user. in order for a kid to be registred she must be added by parent:

/api/Sign-up/

Input Field Example
email admin@kidsspace.me
password *********
FACEBOOK facebookId
APPLE_Token token Value
GMAIL yourgmail email
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": "تمَّت عمليَّة تسجيل حساب ولي الأمر بنجاح"
}

Signin API

API to enable a user from signing in:

/api/Sign-in/

Input Field Example
email admin@kidsspace.me
password *********

Output Example

{
"title": "تسجيل الدُّخول",
"status": "1",
"type": "success",
"message": "تمَّ تسجيل الدُّخول بنجاح",
"token": "9aefc4e2c48dc524626926919aa4e04251fe99ed",
"url": "/Account/Redirect/"
}

Social Signin API

API to enable a user from signing in with facebook or gmail account:

/api/Social/Sign-in/

Input Field Example
email faceId@fb.me

Output Example

{
"title": "تسجيل دخول من وسائل التواصل",
"status": "1",
"message": "تمَّ تسجيل الدُّخول بنجاح",
"token": "9aefc4e2c48dc524626926919aa4e04251fe99ed",
"url": "/Account/Redirect/"
}

Apple Signin API

API to enable a user from signing in with facebook or gmail account:

/api/Apple-SignIn/

Input Field Example
token eyJraWQiOiI4NkQ4OEtmIiwiYWxnIjoiUlMyNTYifQ.eyJpc3MiOiJodHRwczovL2FwcGxlaWQuYXBwbGUuY29tIiwiYXVkIjoiaG9zdC5leHAuRXhwb25lbnQiLCJleHAiOjE2MDEyNjA1MjQsImlhdCI6MTYwMTE3NDEyNCwic3ViIjoiMDAxMzE2LjgyYmFmYTVhZWJmMTQ1YmRiZTE3MzQ4YzFkMjFkYTM2LjAyMzAiLCJjX2hhc2giOiJDUHJsak9oUjVSYTJPLTdDZzhTOUFRIiwiZW1haWwiOiJyYW1pYmJua3NlZWxAZ21haWwuY29tIiwiZW1haWxfdmVyaWZpZWQiOiJ0cnVlIiwiYXV0aF90aW1lIjoxNjAxMTc0MTI0LCJub25jZV9zdXBwb3J0ZWQiOnRydWV9.Wbttt_Puu08GPkoHfmy6gS748TeQx7zhTInscnNogQUBE0bCUPjHL-LkliDhOQOZbpauWFedxFNipSgB4p8dB28HJ3q9HkLN52pXvX_QkjMad3XpQY1apuvfz2vetcOVNLgXpY8Q1BuusakR8SHW8TRHJHlRmHCzpQ5eIxwhNB_1pkGGvTa-uTcKN3paPi1UHUzG1gGZ2Rtx-gS0hJpNKhxg3ivRIbptiXKc2AoBr-uAqLbCT6K2aHHeYSPLANDyyL8U7JJu3h0fxMDD1lctoOMMx5rlS476iE__gi7ODwjciejR4z6HIGW8jn0q_gelW8PEg8wQrumty8a8DswlvQ

Output Example

{
"title": "تسجيل دخول من حساب ابل",
"status": "1",
"message": "تمَّ تسجيل الدُّخول بنجاح",
"token": "9aefc4e2c48dc524626926919aa4e04251fe99ed",
"url": "/Account/Redirect/"
}

Password Reset API

API to enable a user to reset his password. On sucess a reset password email will be send to the corrosponding email:

/api/resetPassword/

Input Field Example
email admin@kidsspace.me

Output Example

{
"title": "استعادة كلمة المرور",
"status": 1,
"message": "تم إرسال رابط للإيميل"
}

User info API

API to get profile info about a user.:

/api/userinfo/

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

Output Example

{
{ "title": "معلومات المستخدم",
"user_id": 331,
"user_email": "salehSSJ88@gmail.com",
"first_name": "Ahmed",
"last_name": "Mohammed"
}

Student Info API

API to get profile of any school student after sign in.:

/api/studentInfo/

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

Output Example

{
"AccountIsActive": true,
"letters_content": {
"A": 0,
"B": 0
},
"messages": [],
"numbers_content": {
"اثنين": 0,
"واحد": "80.0"
},
"paints_content": {
"الأحمر": 0
},
"schoolId": 1,
"schoolName": "1مدرسة النجاح الأهلية",
"shapes_content": {
"المستطيل": 0
},
"status": 1,
"student": {
"age": 6,
"birth_date": "2020-09-08",
"father_name": "jghjg",
"gender": 1,
"id": 6,
"kid_class__class_name": "kg1",
"kid_name": "jkjhkjhk",
"mother_name": "hgjhg",
"parentID__email": "lina@dhad.me",
"parentID__id": 234,
"photo": "photos/user_6/p3.jpg",
"studentlog__performanceGrade": null,
"studentprogress__prgress_ration": 80.0,
"studentstats__total_performance": 60.0
},
"student_all_stats": [
{
"fields": {
"last_update": "2020-08-26",
"letters_performance": 20.0,
"numbers_performance": 10.0,
"puzzles_performance": 20.0,
"shapes_performance": 10.0,
"stu": 6,
"total_performance": 60.0
},
"model": "app.studentstats",
"pk": 6
}
],
"title": "عرض بيانات الطالب "
}

Resend Activation code API

API to resend activation code of registred user.:

/api/resend-activation/

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

Output Example

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

Get Token API

API to get a token of registred user.:

/api-token-auth/

Input Field Example
username admin@kidsspace.me
password ********

Output Example

{
"token": "9aefc4e2c48dc524626926919aa4e04251fe99ed"
}