Group7
  1. phones
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. phones

Shopping Cart Checkout

POST
localhost:5001/api/phones/checkOut

Request

Header Params
Authorization
string 
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NWQzZmViNmIyZDJhZTQ5Y2NiNTBiZiIsImlhdCI6MTY4NDA4MTg1OCwiZXhwIjoxNjg2NjczODU4fQ.Fv3wdafgVfuzLS8OkK2vpThzseTODk1d7n-vZhskJn4
Body Params application/json
_id
string 
required
手机商品id
quantity
integer 
required
购买数量
Example
{
  "_id": "645a0a8ca81a402de866898c",
  "quantity": 1
}

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/phones/checkOut' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NWQzZmViNmIyZDJhZTQ5Y2NiNTBiZiIsImlhdCI6MTY4NDA4MTg1OCwiZXhwIjoxNjg2NjczODU4fQ.Fv3wdafgVfuzLS8OkK2vpThzseTODk1d7n-vZhskJn4' \
--header 'Content-Type: application/json' \
--data-raw '{
  "_id": "645a0a8ca81a402de866898c",
  "quantity": 1
}'

Responses

🟢200OK
application/json
Body
number 
5
optional
Example
4
🟠400Not enough stock
Modified at 2023-05-16 06:33:15
Previous
Search for mobile phones by title keyword
Next
Post mobile reviews (as a buyer)
Built with