KINDLY GO THROUGH THIS DOCUMENTATION
** N/B: TOKEN CAN COME AS "req.body.token || req.query.token || req.headers['x-access-token']" **
END POINTS FOR THE USER REGISTRATION Basic registration
ENDPOINT for business
method "POST"
request parameters (json)
{
"password" : ****** // (6 and above string),
"name": "east of the sunrise IT Resources" // (string),
"email": "test@test.com" // (string),
"businessType": "Infotech" // (string)
}
ENDPOINT for owner, admin, student
ONLY ADMIN AND OWNER ARE ALLOWED TO USE THIS ROUTE ONLY ADMIN AND OWNER CAN REGISTER STUDENT
method "POST"
request parameters (json)
{
"password" : ****** // (6 and above string),
"name": "ebube kalu" // (string),
"email": "test@test.com" // (string),
"accountType": "admin"
}
* response on success (json)
{
name : ebube kalu,
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6 *** DlsdkaiwADWRWRfqwdnj"
refreshToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6 ~~~~ DlsdkaiwADWRWRfqwdnj"
accountType: "admin"
}
method "POST"
request parameters (json)
{
"password" : ****** // (6 and above string),
"name": "ebube kalu" // (string),
"email": "test@test.com" //(string),
"accountType": "student"
"studentType":"local"
"stack":"android"
}
* response on success (json)
{
name : ebube kalu,
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6 *** DlsdkaiwADWRWRfqwdnj"
refreshToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6 ~~~~ DlsdkaiwADWRWRfqwdnj"
e
}
2) "/account/login" // authenticates a user information and generates a token for each user each token expires in 1h.
method "POST"
request parameters "(json)"
{
"password":"******" (string),
"email":"test@test.com"
}
* response on success (json)
{
name : ebube kalu,
accountType: "student",
refreshToken: "eyJhbGciOiJIUzI1NiIsInR5cCI6 *** DlsdkaiwADWRWRfqwdnj"
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6 *** DlsdkaiwADWRWRfqwdnj"
}
```
* N/B: TOKEN CAN COME AS "req.body.token || req.query.token || req.headers['x-access-token']"
method "GET"
request parameters (token from login)
* N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: business
};
*** THIS IS RESTRICTED TO OWNER AND ADMIN ONLY**
method "GET"
request parameters (token from login)
* N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: business
};
*** THIS IS RESTRICTED TO OWNER AND ADMIN ONLY**
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: business
};
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: student
};
6b) "/account/profile/students/remote" //gets the information of all the remote students in the database .
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: back end web,
accountType: student,
studentType: remote
};
6c) "/account/profile/students/local" //gets the information of all the local students in the database .
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: student,
studentType: local
};
6d) "/account/profile/students/BEW" //gets the information of all the backend web students in the database .
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: back end web,
accountType: student,
studentType: local
};
6e) "/account/profile/students/FEW" //gets the information of all the front end web students in the database .
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: front end web,
accountType: student,
studentType: remote
};
6f) "/account/profile/students/android" //gets the information of all the android students in the database .
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: android,
accountType: student,
};
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: UI/UX,
accountType: student,
studentType: local
};
method "GET"
* request parameters (token from login)
N/B: TOKEN CAN COME AS ["req.body.token || req.query.token || req.headers['x-access-token']"]
* response on success (json)
info = {
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: student,
student: remote
};
THIS ENDPOINT IS RESTRICTED TO OWNER, ADMIN AND BUSINESS ONLY
method "PUT"
* request parameters "(json)"
{
"password":"******"(string),
"email":"test@test.com"
}
* response on success (json)
{
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
rating:8.8,
accountType: student,
studentType: local,
}
THIS ENDPOINT IS RESTRICTED TO OWNER AND ADMIN ONLY
method "PUT"
* request parameters "(json)"
{
"password":"******"(string),
"email":"test@test.com"
}
* response on success (json)
{
photo: ***path to the image***,
name: ebube kalu,
email: test@test.com,
address: no 34 ojike lane, Urualla,
role: COO,
phoneNumber: +23456969803,
stack: backend web,
accountType: business"
}
THIS ENDPOINT IS RESTRICTED TO OWNER AND ADMIN ONLY
* method "DELETE"
* request parameters "(json)"
{
"password":"******"(string),
"email":"test@test.com"
}
* response on success (json)
method "POST"
* request parameters (token from login)
{"password": "*******"(string)} N/B : the new password user will love to change to
* RESPONSE ON SUCCESS
{'password! SUCCESSFULLY CHANGED'}(json)
12) "/account/recovery/password" //takes a users email and verifies its existence in the database if it exist send a mail to the email address containing oobcode.
method "POST"
* request parameters(json)
{"email":"test@test.com"(string)}
* response on success (json)
{an email has been sent to "test@test.com" with further instructions.}
method "POST"
* request parameters
{
"oobcode":" eyJhbGciOiJIUzI1NiIsInR5cCI6 *** DlsdkaiwADWRWRfqwdnj"
"newPassword": "*******"(string)
} N/B : the new password the user will love to change to
* response on success (json)
{Password changed successfully you can now login with your new password.');