- 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
GET
localhost:5001/api/phones/645a0a8ca81a402de8668984
Request
None
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/645a0a8ca81a402de8668984'
Responses
🟢200OK
application/json
Body
_id
string
required
title
string
required
brand
string
required
image
string
required
stock
integer
required
seller
string
required
price
number
required
reviews
array [object {7}]
required
_id
string
required
reviewer
string
required
rating
integer
required
comment
string
required
createdAt
string
required
updatedAt
string
required
hidden
string
optional
Example
{
"_id": "645a0a8ca81a402de8668984",
"title": "\"CLEAR CLEAN ESN\" Sprint EPIC 4G Galaxy SPH-D700*FRONT CAMERA*ANDROID*SLIDER*QWERTY KEYBOARD*TOUCH SCREEN",
"brand": "Samsung",
"image": "/Samsung.jpeg",
"stock": 4,
"price": 199.99,
"seller": "Gail Patterson",
"reviews": [
{
"_id": "6462814e29bdbd4521a86268",
"reviewer": "5f5237a4c1beb1523fa3dabf",
"rating": 5,
"comment": "I feel so LUCKY to have found this used (phone to us & not used hard at all), phone on line from someone who upgraded and sold this one. My Son liked his old one that finally fell apart after 2.5+ years and didn't want an upgrade!! Thank you Seller, we really appreciate it & your honesty re: said used phone.I recommend this seller very highly & would but from them again!!",
"createdAt": "2023-05-14T16:28:03.100Z",
"updatedAt": "2023-05-14T16:28:03.100Z"
},
{
"_id": "6462814e29bdbd4521a86269",
"reviewer": "5f5237a4c1beb1523fa3dab6",
"rating": 4,
"comment": "nice phone, nice up grade from my pantach revue. Very clean set up and easy set up. never had an android phone but they are fantastic to say the least. perfect size for surfing and social media. great phone samsung",
"createdAt": "2023-05-14T16:28:03.100Z",
"updatedAt": "2023-05-14T16:28:03.100Z"
},
{
"_id": "6462814e29bdbd4521a8626a",
"reviewer": "5f5237a4c1beb1523fa3da1f",
"rating": 5,
"comment": "Very pleased",
"createdAt": "2023-05-14T16:28:03.101Z",
"updatedAt": "2023-05-14T16:28:03.101Z"
},
{
"reviewer": "645d3feb6b2d2ae49ccb50bf",
"rating": 3,
"comment": "第1次测试!!!",
"_id": "64621b34ab5310e6dcffd515",
"createdAt": "2023-05-15T11:44:52.430Z",
"updatedAt": "2023-05-15T12:19:50.434Z",
"hidden": "true"
}
]
}
🔴500Server Error
🟠404Record Not Found