You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
620 lines
14 KiB
JSON
620 lines
14 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "536fbbd5-057a-493f-b5ff-814a3a93a6a7",
|
|
"name": "Capstone 2",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
|
|
"_exporter_id": "30192105"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "checkEmail",
|
|
"protocolProfileBehavior": {
|
|
"disableBodyPruning": true
|
|
},
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"email\" : \"naruto@mail.com\"\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/users/checkEmail",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"checkEmail"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "register",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"email\" : \"sasuke@mail.com\",\r\n \"password\" : \"sasuke\"\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/users/register",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"register"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "login",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"email\" : \"naruto@mail.com\",\r\n \"password\" : \"naruto\"\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/users/login",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"login"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "create a product",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYTgzOWUxYjE0ZTYyNTk3OTY5ZSIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ1MjU1NjZ9.UIQfNiHYXWzGE6-gxWNdo7dI6MqYvlIqmNP-hznMp5w",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"name\" : \"Kirby and the Forgotten Land\",\r\n \"description\" : \"Kirby and the Forgotten Land[b] is a 2022 platform video game developed by HAL Laboratory and published by Nintendo for the Nintendo Switch. It is the thirteenth mainline installment in the Kirby series, as well as the first game in the series in full 3D, excluding spin-offs. The player controls Kirby in an adventure through the titular forgotten land called the New World to rescue Waddle Dees kidnapped by the ferocious Beast Pack. To complete each stage to save the Waddle Dees, Kirby can use a wide range of copy abilities to help battle enemies and progress.\",\r\n \"price\" : 2495,\r\n \"inventory\" : 600\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/products/create",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"create"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "retrieve all products",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OWFiODRjNDkxM2I4NzFlMWFlNzdjZCIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ3MTI5ODR9.yGegMImaE8fmsTAZE47JFIchOD0u6HfS_RRxY3qyQTc",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/products/retrieve-all",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"retrieve-all"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "retrieve all active products",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/products/active",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"active"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "search product",
|
|
"protocolProfileBehavior": {
|
|
"disableBodyPruning": true
|
|
},
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"query\" : \"Kart\"\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/products/search",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"search"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "update product",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYTgzOWUxYjE0ZTYyNTk3OTY5ZSIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ1Mjc3MzJ9.WALTs2qRrzzwYn-aYb5-S5VMxITNOf8N2UEZCywrfMY",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"name\" : \"Pokemon Legends: Arceus\",\r\n \"price\" : 2495\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/products/6598ffaa9cb57b3e6a9e8422",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"6598ffaa9cb57b3e6a9e8422"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "archive product",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYTgzOWUxYjE0ZTYyNTk3OTY5ZSIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ1Mjc3MzJ9.WALTs2qRrzzwYn-aYb5-S5VMxITNOf8N2UEZCywrfMY",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "PUT",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/products/6598ffaa9cb57b3e6a9e8422/archive",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"6598ffaa9cb57b3e6a9e8422",
|
|
"archive"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "activate product",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYTgzOWUxYjE0ZTYyNTk3OTY5ZSIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ1Mjc3MzJ9.WALTs2qRrzzwYn-aYb5-S5VMxITNOf8N2UEZCywrfMY",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "PUT",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/products/6598ffaa9cb57b3e6a9e8422/activate",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"6598ffaa9cb57b3e6a9e8422",
|
|
"activate"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "create order/checkout",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWIyOWUxYjE0ZTYyNTk3OTZhNCIsImVtYWlsIjoic2FzdWtlQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDU1MDUzN30.yvUlEibQC_k30x8lbIArUDbHZxMa2SmxB5jsdj3NBJ8",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"orderedItems\": [\r\n {\r\n \"productId\" : \"6598ff169cb57b3e6a9e8420\",\r\n \"quantity\" : 1\r\n },\r\n {\r\n \"productId\" : \"6598ffaa9cb57b3e6a9e8422\",\r\n \"quantity\" : 1\r\n },\r\n {\r\n \"productId\" : \"659a31b4a5b6dafefb66f6a8\",\r\n \"quantity\" : 1\r\n }\r\n\r\n ]\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/products/create-order",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"create-order"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "retrieve current user details",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWIyOWUxYjE0ZTYyNTk3OTZhNCIsImVtYWlsIjoic2FzdWtlQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDU1MDUzN30.yvUlEibQC_k30x8lbIArUDbHZxMa2SmxB5jsdj3NBJ8",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/users/details",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"details"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "set user to admin",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OWFiODRjNDkxM2I4NzFlMWFlNzdjZCIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ3MTI5ODR9.yGegMImaE8fmsTAZE47JFIchOD0u6HfS_RRxY3qyQTc",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "PUT",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"userId\" : \"6597faa29e1b14e6259796a1\"\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/users/set-admin",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"set-admin"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "retrieve current user orders",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWIyOWUxYjE0ZTYyNTk3OTZhNCIsImVtYWlsIjoic2FzdWtlQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDcxODc4NX0.l8Dwm7BTWEQSJLWYrZCHSaXJ9fxnk6XexzFMkULeTmE",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/users/orders",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"orders"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "get all orders",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OWFiODRjNDkxM2I4NzFlMWFlNzdjZCIsImVtYWlsIjoiYWRtaW5AbWFpbC5jb20iLCJpc0FkbWluIjp0cnVlLCJpYXQiOjE3MDQ3MTkyNDF9.Z1kf9FihABPI2zXOQCD5w8pUxNW7vOCu_G3X--2QgCY",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/users/get-all-orders",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"users",
|
|
"get-all-orders"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "add to cart",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWEyOWUxYjE0ZTYyNTk3OTZhMSIsImVtYWlsIjoibmFydXRvQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDgxMDAxMH0.akK5cCHqhI6ToWm9Lg0AAg2gTJqTBl140Ts63ITm6LY",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"productId\" : \"659a31b4a5b6dafefb66f6a8\",\r\n \"quantity\" : 2\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/products/add-to-cart",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"add-to-cart"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "change quantity",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWEyOWUxYjE0ZTYyNTk3OTZhMSIsImVtYWlsIjoibmFydXRvQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDgxMDU5NX0.yw6p6ePvqFtAPXQtAZDcdgEx3nNRm-DJYajOdGbnemM",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\r\n \"productId\" : \"6598ffaa9cb57b3e6a9e8422\",\r\n \"quantity\" : 14\r\n}",
|
|
"options": {
|
|
"raw": {
|
|
"language": "json"
|
|
}
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "localhost:2024/products/update-quantity",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"update-quantity"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "remove prooduct from cart",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWEyOWUxYjE0ZTYyNTk3OTZhMSIsImVtYWlsIjoibmFydXRvQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDgxMDU5NX0.yw6p6ePvqFtAPXQtAZDcdgEx3nNRm-DJYajOdGbnemM",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/products/remove/6598ffaa9cb57b3e6a9e8422",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"remove",
|
|
"6598ffaa9cb57b3e6a9e8422"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
},
|
|
{
|
|
"name": "view cart",
|
|
"request": {
|
|
"auth": {
|
|
"type": "bearer",
|
|
"bearer": [
|
|
{
|
|
"key": "token",
|
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY1OTdmYWEyOWUxYjE0ZTYyNTk3OTZhMSIsImVtYWlsIjoibmFydXRvQG1haWwuY29tIiwiaXNBZG1pbiI6ZmFsc2UsImlhdCI6MTcwNDg4OTgyOX0.sPHkX2JjJOY6_MbDkFUxyTWJ8u04Gt_GXf8xTfALA-w",
|
|
"type": "string"
|
|
}
|
|
]
|
|
},
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "localhost:2024/products/view-my-cart",
|
|
"host": [
|
|
"localhost"
|
|
],
|
|
"port": "2024",
|
|
"path": [
|
|
"products",
|
|
"view-my-cart"
|
|
]
|
|
}
|
|
},
|
|
"response": []
|
|
}
|
|
]
|
|
} |