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

Sellers view phones for sale

Developing
POST
localhost:5001/api/phones/getSellersPhones

Request

Header Params
Authorization
array[string]
optional
Example:
["Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYTU0OGI5M2U2YWE0N2ZiM2Q0ODA5MyIsImlhdCI6MTY4NDMwNDQwNiwiZXhwIjoxNjg2ODk2NDA2fQ.UWU0dOK5gJ8YiTDCRrVBko2M-fJyN_1akV2j0UUDzTU"]
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/getSellersPhones' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjYwYTU0OGI5M2U2YWE0N2ZiM2Q0ODA5MyIsImlhdCI6MTY4NDMwNDQwNiwiZXhwIjoxNjg2ODk2NDA2fQ.UWU0dOK5gJ8YiTDCRrVBko2M-fJyN_1akV2j0UUDzTU' \
--header 'Content-Type: application/json' \
--data-raw '{}'

Responses

🟢200OK
application/json
Body
array of:
_id
string 
required
title
string 
required
brand
string 
required
image
string 
required
price
integer 
required
stock
integer 
required
seller
string 
required
reviews
array [object {6}] 
required
reviewer
string 
required
rating
integer 
required
comment
string 
required
_id
string 
required
createdAt
string 
required
updatedAt
string 
required
createdAt
string 
required
updatedAt
string 
required
__v
integer 
required
Example
[
  {
    "_id": "64636b5b810b93677548c713",
    "title": "xiaomi2",
    "brand": "Apple",
    "image": "/Apple.jpeg",
    "price": 123,
    "stock": 117,
    "seller": "60a548b93e6aa47fb3d48093",
    "reviews": [],
    "createdAt": "2023-05-16T11:39:07.922Z",
    "updatedAt": "2023-05-16T11:39:47.317Z",
    "__v": 0
  },
  {
    "_id": "6463bf51d807357d4987ee25",
    "title": "zhongmi123",
    "brand": "Apple",
    "image": "/Apple.jpeg",
    "price": 123,
    "stock": 94,
    "seller": "60a548b93e6aa47fb3d48093",
    "reviews": [
      {
        "reviewer": "6463a039eb4d7717a5a916b4",
        "rating": 2,
        "comment": " 太酷啦",
        "_id": "6463bf84cfaff141d0f9da9a",
        "createdAt": "2023-05-16T17:38:12.559Z",
        "updatedAt": "2023-05-16T17:38:12.559Z"
      },
      {
        "reviewer": "64635d7f37705bf264d68c68",
        "rating": 2,
        "comment": " 可以看到",
        "_id": "646464571f62d8dcdcdd00d8",
        "createdAt": "2023-05-17T05:21:27.121Z",
        "updatedAt": "2023-05-17T05:21:27.121Z"
      }
    ],
    "createdAt": "2023-05-16T17:37:21.455Z",
    "updatedAt": "2023-05-17T05:21:27.121Z",
    "__v": 2
  }
]
🟠404phone not found
🟠401没有权限
🟠404Not found
Previous
Delete phone
Next
Get phone by id for list
Built with