- 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
Get phone by id for list
Developing
GET
localhost:5001/api/phones/getPhoneList
Request
Body Params application/json
id_list
array[string]
required
Example
{
"id_list": [
"37"
]
}
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 GET 'localhost:5001/api/phones/getPhoneList' \
--header 'Content-Type: application/json' \
--data-raw '{
"id_list": [
"37"
]
}'
Responses
🟢200OK
application/json
Body
phone_list
array [object {7}]Â
required
title
stringÂ
optional
brand
stringÂ
optional
image
stringÂ
required
stock
integerÂ
optional
seller
stringÂ
optional
price
numberÂ
optional
reviews
array [object {7}]Â
required
Example
{
"phone_list": [
{
"title": "string",
"brand": "string",
"image": "string",
"stock": 0,
"seller": "string",
"price": 0,
"reviews": [
{
"_id": "string",
"reviewer": "string",
"rating": "string",
"comment": "string",
"createdAt": "string",
"updatedAt": "string",
"hidden": "string"
}
]
}
]
}
Modified at 2023-05-17 06:10:36