- phones
- Get a list of all phonesGET
- Get phone by idGET
- Get the 5 phones that will sell out soonGET
- Get the hot 5 mobile phonesGET
- Search for mobile phones by title keywordGET
- Shopping Cart CheckoutPOST
- Post mobile reviews (as a buyer)POST
- Hide/Show Comments (as a buyer)PUT
- Get details and quantities of phones purchased (as a buyer)POST
- Get details of reviewed phones (as a buyer)POST
- Get reviewed phones and corresponding reviews (as a buyer)POST
- View phones for sale and reviews (as a seller)POST
- Enable/disable mobile phones (as a seller)PUT
- Change mobile phone informationPUT
- createPhonePOST
- Delete phoneDELETE
- Sellers view phones for salePOST
- Get phone by id for listGET
- users & auth
Reset password
Developing
PUT
localhost:5001/api/users/resetpassword
Request
Body Params application/json
email
string
required
newPassword
string
required
confirmPassword
string
required
Example
{
"email": "zhlu7335@gmail.com",
"newPassword": "Comp5347!",
"confirmPassword": "Comp5347!"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'localhost:5001/api/users/resetpassword' \
--header 'Content-Type: application/json' \
--data-raw '{
"email":"zhlu7335@gmail.com",
"newPassword":"Comp5347!",
"confirmPassword":"Comp5347!"
}'
Responses
🟢200OK
application/json
Body
_id
string
required
email
string
required
token
string
required
Example
{
"_id": "64635d7f37705bf264d68c68",
"email": "zhlu7335@gmail.com",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NjM1ZDdmMzc3MDViZjI2NGQ2OGM2OCIsImlhdCI6MTY4NDI1NDM5NiwiZXhwIjoxNjg2ODQ2Mzk2fQ.Wn40y0e6WI8_2VDxR8Ghq2lYeRRsa70SX_5fw1gdVY0"
}
🔴500wrong
🟠400must click link in the email
🟠401Password does not match the requirements