api.ayat.com/v1/users
GET
{
"x-access-token": "65416584846465644546"
}
code : 200
{
"users": [
{
"birth_date": "Sat, 16 May 2015 00:00:00 GMT",
"country_name": "example",
"email": "ex1pleamssdasd",
"gender": false,
"is_activated": false,
"phone_number": "612s1211",
"profile_picture": "2d",
"public_id": "40dd1b7a-96c2-4f73-9e1c-dc22bdbb3e56",
"registeration_date": "Sat, 16 May 2015 00:00:00 GMT",
"type": "staff"
},
{
"birth_date": "Sat, 16 May 2015 00:00:00 GMT",
"country_name": "example",
"email": "examplsdfeasdasd",
"gender": false,
"is_activated": false,
"phone_number": "611211",
"profile_picture": "2d",
"public_id": "0758ef45-bde5-41f6-b80e-6188b8022183",
"registeration_date": "Sat, 16 May 2015 00:00:00 GMT",
"type": "staff"
},
]
}
code: 403
{
"message": "user is unauthorized"
}
api.ayat.com/v1/users/{id}
GET
{
"x-access-token": "65416584846465644546"
}
code : 200
{
"user": {
"birth_date": "Sat, 16 May 2015 00:00:00 GMT",
"country_name": "example",
"email": "examplsdfeasdasd",
"gender": false,
"is_activated": false,
"phone_number": "611211",
"profile_picture": "2d",
"public_id": "0758ef45-bde5-41f6-b80e-6188b8022183",
"registeration_date": "Sat, 16 May 2015 00:00:00 GMT",
"type": "staff"
}
}
code: 403
{
"message": "user is unauthorized"
}
api.ayat.com/v1/users
POST
{
"action": "login",
"email": "example@gmail.com",
"password": "123456",
}
code : 200
{
"birth_date": "Sat, 16 May 2015 00:00:00 GMT",
"country_name": "example",
"email": "explsaddfeasdasd",
"gender": false,
"name": "example",
"phone_number": "123",
"profile_picture": "2d",
"public_id": "735b3f64-afcf-4b42-b255-14bf8b3a5bc0",
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9"
}
code: 403
{
"message": "user is unauthorized"
}
or
code: 404
{
"message": "user not found"
}
or
code: 404
{
"message": "invalid password"
}
api.ayat.com/v1/users
POST
{
"action": "register_student",
"full_name": "example",
"email": "explsaddfeasdasd",
"country": "example",
"phone": 123,
"profile_pic": "2d",
"birth_date": "2015-05-16",
"gender": false,
"password": "464468",
"registeration_date": "2015-05-16"
}
or
{
"action": "register_staff",
"full_name": "example",
"email": "explsaddfeasdasd",
"country": "example",
"phone": 123,
"profile_pic": "2d",
"birth_date": "2015-05-16",
"gender": false,
"password": "464468",
"registeration_date": "2015-05-16"
}
code : 200
{
"status": "created",
"public_id": "example"
}
or
{
"status": "1"
}
or
{
"status": "2"
}
api.ayat.com/v1/users/{id}
PUT
{
"x-access-token": "65416584846465644546",
"full_name": "exaaklsfmple",
"email": "edlsdfdkfdfeasdasd",
"country": "exsdkf123ample",
"phone": "3211kd23",
"profile_pic": "https://ayatsource.com/default.png",
"birth_date": "2015-05-16",
"password": "464468"
}
code 200
{
"status": "updated"
}
or
{
"status": "1"
}
or
{
"status": "2"
}
api.ayat.com/v1/users/{id}
DELETE
{
"x-access-token": "ffff"
}
code 200
{
"status": "deleted"
}
or
{"status": "user is unauthorized"}
or
{"status": "no user found"}