Group7
  1. users & auth
Group7
  • phones
    • Get a list of all phones
      GET
    • Get phone by id
      GET
    • Get the 5 phones that will sell out soon
      GET
    • Get the hot 5 mobile phones
      GET
    • Search for mobile phones by title keyword
      GET
    • Shopping Cart Checkout
      POST
    • 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 information
      PUT
    • createPhone
      POST
    • Delete phone
      DELETE
    • Sellers view phones for sale
      POST
    • Get phone by id for list
      GET
  • users & auth
    • Registration
      POST
    • Verify email address
      GET
    • Login
      POST
    • Forgot your password (enter your email address)
      POST
    • Reset password
      PUT
    • Obtaining user information
      GET
    • Modify user information
      PUT
    • Reset password
      PUT
  1. users & auth

Registration

POST
localhost:5001/api/users
User registration. and password verification: at least 8 characters, including uppercase and lowercase letters, numbers and symbols

Request

Body Params application/json
firstname
string 
required
lastname
string 
required
email
string 
required
password
string 
required
Example
{
  "firstname": "aaaa",
  "lastname": "bbbbb",
  "email": "iam594@126.com",
  "password": "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 POST 'localhost:5001/api/users' \
--header 'Content-Type: application/json' \
--data-raw '{
    "firstname": "aaaa",
    "lastname":"bbbbb",
    "email":"iam594@126.com",
    "password":"Comp5347!"
}'

Responses

🟢201ok
application/json
Body
_id
string 
required
firstname
string 
required
lastname
string 
required
email
string 
required
token
string 
required
Example
{
  "_id": "string",
  "firstname": "string",
  "lastname": "string",
  "email": "string",
  "token": "string"
}
🟠400Invalid user data
🟠401Password does not match the requirements
🟠402email occupied
Previous
Get phone by id for list
Next
Verify email address
Built with