- 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 details and quantities of phones purchased (as a buyer)
POST
localhost:5001/api/phones/getboughtphones
Request
Header Params
Authorization
string
required
Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NWQzZmViNmIyZDJhZTQ5Y2NiNTBiZiIsImlhdCI6MTY4NDA4MTg1OCwiZXhwIjoxNjg2NjczODU4fQ.Fv3wdafgVfuzLS8OkK2vpThzseTODk1d7n-vZhskJn4
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/getboughtphones' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY0NWQzZmViNmIyZDJhZTQ5Y2NiNTBiZiIsImlhdCI6MTY4NDA4MTg1OCwiZXhwIjoxNjg2NjczODU4fQ.Fv3wdafgVfuzLS8OkK2vpThzseTODk1d7n-vZhskJn4'
Responses
🟢200OK
application/json
Body
array of:
_id
string
required
title
string
required
price
integer | number
required
image
string
required
quantity
integer
required
status
string
required
createdAt
string
required
Example
[
{
"_id": "645a0a8ca81a402de8668986",
"title": "Galaxy s III mini SM-G730V Verizon Cell Phone BLUE",
"price": 56,
"image": "/Samsung.jpeg",
"quantity": 2,
"status": "delivered",
"createdAt": "2023-05-15T12:55:34.213Z"
},
{
"_id": "645a0a8ca81a402de8668984",
"title": "\"CLEAR CLEAN ESN\" Sprint EPIC 4G Galaxy SPH-D700*FRONT CAMERA*ANDROID*SLIDER*QWERTY KEYBOARD*TOUCH SCREEN",
"price": 199.99,
"image": "/Samsung.jpeg",
"quantity": 2,
"status": "delivered",
"createdAt": "2023-05-15T13:23:18.530Z"
},
{
"_id": "645a0a8ca81a402de8668996",
"title": "Microsoft Lumia 650 (RM-1154) 16GB White, 5\", Dual Sim, Unlocked International Model, No Warranty",
"price": 127.95,
"image": "/Nokia.jpeg",
"quantity": 2,
"status": "delivered",
"createdAt": "2023-05-15T15:39:37.426Z"
},
{
"_id": "645a0a8ca81a402de8668996",
"title": "Microsoft Lumia 650 (RM-1154) 16GB White, 5\", Dual Sim, Unlocked International Model, No Warranty",
"price": 127.95,
"image": "/Nokia.jpeg",
"quantity": 2,
"status": "delivered",
"createdAt": "2023-05-15T15:39:37.577Z"
},
{
"_id": "645a0a8ca81a402de8668984",
"title": "\"CLEAR CLEAN ESN\" Sprint EPIC 4G Galaxy SPH-D700*FRONT CAMERA*ANDROID*SLIDER*QWERTY KEYBOARD*TOUCH SCREEN",
"price": 199.99,
"image": "/Samsung.jpeg",
"quantity": 2,
"status": "delivered",
"createdAt": "2023-05-15T15:42:02.567Z"
},
{
"_id": "645a0a8ca81a402de8668989",
"title": "GreatCall Samsung Jitterbug Touch3 Senior Smartphone with 1-Touch Medical Alert and Large Display",
"price": 149.99,
"image": "/Samsung.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T15:47:58.234Z"
},
{
"_id": "645a0a8ca81a402de8668989",
"title": "GreatCall Samsung Jitterbug Touch3 Senior Smartphone with 1-Touch Medical Alert and Large Display",
"price": 149.99,
"image": "/Samsung.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T15:47:58.241Z"
},
{
"_id": "645a0a8ca81a402de8668989",
"title": "GreatCall Samsung Jitterbug Touch3 Senior Smartphone with 1-Touch Medical Alert and Large Display",
"price": 149.99,
"image": "/Samsung.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T15:48:17.674Z"
},
{
"_id": "645a0a8ca81a402de8668989",
"title": "GreatCall Samsung Jitterbug Touch3 Senior Smartphone with 1-Touch Medical Alert and Large Display",
"price": 149.99,
"image": "/Samsung.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T15:48:17.688Z"
},
{
"_id": "645a0a8ca81a402de8668985",
"title": "Cricket Samsung Galaxy Discover R740 Phone",
"price": 24.99,
"image": "/Samsung.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T16:42:38.125Z"
},
{
"_id": "645a0a8ca81a402de86689b1",
"title": "DASH HTC s620 s621 UNLOCKED WI-FI WORLD PHONE S 620",
"price": 469.99,
"image": "/HTC.jpeg",
"quantity": 3,
"status": "delivered",
"createdAt": "2023-05-15T17:20:21.164Z"
},
{
"_id": "645a0a8ca81a402de86689b1",
"title": "DASH HTC s620 s621 UNLOCKED WI-FI WORLD PHONE S 620",
"price": 469.99,
"image": "/HTC.jpeg",
"quantity": 3,
"status": "delivered",
"createdAt": "2023-05-15T17:20:23.029Z"
},
{
"_id": "645a0a8ca81a402de86689a5",
"title": "Apple A1533 Unlocked iPhone 5S Smart Phone, 16 GB (White)",
"price": 115,
"image": "/Apple.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T17:23:21.806Z"
},
{
"_id": "645a0a8ca81a402de86689a5",
"title": "Apple A1533 Unlocked iPhone 5S Smart Phone, 16 GB (White)",
"price": 115,
"image": "/Apple.jpeg",
"quantity": 1,
"status": "delivered",
"createdAt": "2023-05-15T17:23:23.732Z"
}
]
🟠401Unauthorized
🟠401Unauthorized