forked from Salah3060/MediPortal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapiDoc.txt
70 lines (60 loc) · 2.71 KB
/
apiDoc.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
Api Documentaion will here إن شاء الله يا بتوع الفرونت
1.Authentication
1.1 signUp
endPoint: 127.0.0.1:3000/auth/signUp
method : post
body : {
"email":"test@test.com" ,
"password":"test1234"
}
response : {
"status": "success",
"date": {
"user": {
"userid": 1,
"firstname": "test",
"lastname": "test",
"phonenumber": "1234567890",
"email": "test1234@test.com",
"gender": "Male",
"wallet": 1000,
"createdat": "2024-11-25T18:58:50.865Z",
"updatedat": "2024-11-25T18:58:50.865Z",
"birthdate": "1990-01-14T22:00:00.000Z"
}
}
}
***JWT sent as cookie
2.Doctors
1.1 getAllDoctors
endPoint: 127.0.0.1:3000/doctors/allDoctors?gender=Male&&order=firstName&&fields=firstName,lastName
queryOption: userId=2,gender=Male,email=xxxxx ==>for filter
order=userId,-firstName ==> - for DESC default ASC
fields =userId,lastName ===> to detect only some fields wanted for results
method : get
body : {
}
response : {
"status": "success",
"date": {
doctors : [
{
"userid": 1,
"firstname": "test",
"lastname": "test",
"phonenumber": "1234567890",
"email": "test1234@test.com",
"gender": "Male",
"wallet": 1000,
"createdat": "2024-11-25T18:58:50.865Z",
"updatedat": "2024-11-25T18:58:50.865Z",
"birthdate": "1990-01-14T22:00:00.000Z"
}
]
}
}
2.2 get doctor by any of its arrtibue
==>use get all doctors and set wanted attrubite like
endPoint: 127.0.0.1:3000/doctors/allDoctors?firstName='Kamal'
endPoint: 127.0.0.1:3000/doctors/allDoctors?userId=4
you can query on name with all methods KAmal kAMak