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

View phones for sale and reviews (as a seller)

POST
localhost:5001/api/phones/getSellersPhonesAndComments

Request

Header Params
Authorization
string 
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NjM1ZDdmMzc3MDViZjI2NGQ2OGM2OCIsImlhdCI6MTY4NDI5OTEyNywiZXhwIjoxNjg2ODkxMTI3fQ.cUFVjIB6af5Oymt4bCsNF1PxjZ_sQkFTqdZRAXJ2SBE
Body Params application/json
object {0}
Example
{}

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/getSellersPhonesAndComments' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NjM1ZDdmMzc3MDViZjI2NGQ2OGM2OCIsImlhdCI6MTY4NDI5OTEyNywiZXhwIjoxNjg2ODkxMTI3fQ.cUFVjIB6af5Oymt4bCsNF1PxjZ_sQkFTqdZRAXJ2SBE' \
--header 'Content-Type: application/json' \
--data-raw '{}'

Responses

🟢200OK
application/json
Body
array of:
_id
string 
required
title
string 
required
price
integer 
required
quantity
integer 
required
totalPrice
integer 
required
status
string 
required
createdAt
string 
required
review
null 
required
Example
[
  {
    "_id": "6462116070b8ffce43b1c845",
    "title": "修改了手机title哈哈",
    "quantity": 0,
    "totalPrice": 0,
    "status": "",
    "createdAt": "",
    "review": null
  },
  {
    "_id": "6462128f70b8ffce43b1c849",
    "title": "testNewphone",
    "price": 299,
    "quantity": 0,
    "totalPrice": 0,
    "status": "",
    "createdAt": "",
    "review": null
  },
  {
    "_id": "646237b961822c4e469d8834",
    "title": "iphone1000000 promax maxmaxmax",
    "price": 2909999999,
    "quantity": 0,
    "totalPrice": 0,
    "status": "",
    "createdAt": "",
    "review": null
  },
  {
    "_id": "64626e13a877d1f9135dbfe3",
    "title": "ipadxxxxxxxxxx000000 promax maxmaxmax",
    "price": 123123123,
    "quantity": 0,
    "totalPrice": 0,
    "status": "",
    "createdAt": "",
    "review": null
  },
  {
    "_id": "64626e4aa877d1f9135de34f",
    "title": "ipadxxxxxxxxxx000000 promax maxmaxmax",
    "price": 123123123,
    "quantity": 0,
    "totalPrice": 0,
    "status": "",
    "createdAt": "",
    "review": null
  },
  {
    "_id": "64626e63a877d1f9135df0f9",
    "title": "ipadxxxxxxxxxx000000 promax maxmaxmax",
    "price": 0,
    "quantity": 0,
    "totalPrice": 0,
    "status": "",
    "createdAt": "",
    "review": null
  }
]
🟠401Unauthorized
Previous
Get reviewed phones and corresponding reviews (as a buyer)
Next
Enable/disable mobile phones (as a seller)
Built with