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.

710 lines
18 KiB
JSON

{
"info": {
"_postman_id": "7a7182a1-6696-4ea5-b672-9c4e48d009a9",
"name": "csp2-postman",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "29492519"
},
"item": [
{
"name": "User",
"item": [
{
"name": "User Register",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
12 months ago
"raw": "{\r\n \"email\": \"ronron@email.com\",\r\n \"password\": \"ronron\"\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/register",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"register"
]
}
},
"response": []
},
{
"name": "User Authenticate/Login",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0NGQ5YmU1YzAxZjZjMGNhNzkyMDAiLCJlbWFpbCI6IndhcGF0dUBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMjE0NTcwLCJleHAiOjE3MDAyMTgxNzB9.IMrvxc4l2A5cwMATP3FuCIiZUmaS-eewpqLz5CORQQA",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
12 months ago
"raw": "{\r\n \"email\": \"ronron@email.com\",\r\n \"password\": \"ronron\"\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/authenticate",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"authenticate"
]
}
},
"response": []
},
{
"name": "User Update Account",
"protocolProfileBehavior": {
"followAuthorizationHeader": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0NGQ5YmU1YzAxZjZjMGNhNzkyMDAiLCJlbWFpbCI6IndhcGF0dUBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMjE0NTcwLCJleHAiOjE3MDAyMTgxNzB9.IMrvxc4l2A5cwMATP3FuCIiZUmaS-eewpqLz5CORQQA",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"65544d9be5c01f6c0ca79200\",\r\n \"newEmail\": \"user@email.com\",\r\n \"newFirstname\": \"Ron\",\r\n \"newLastName\": \"Pogi\",\r\n \"newPassword\": \"user\"\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/update",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"update"
]
}
},
"response": []
},
{
"name": "Retrieve Active Products",
"request": {
"method": "GET",
"header": [],
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/active",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"active"
]
}
},
"response": []
},
{
"name": "Retrieve Single Product",
"request": {
"method": "GET",
"header": [],
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/product/products/65545619b88d0a48f00ae778",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"product",
"products",
"65545619b88d0a48f00ae778"
]
}
},
"response": []
},
{
"name": "User Checkout(Create Order)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
12 months ago
"raw": "{\r\n \"userId\": \"65535cb526b586a3e2fd56cc\", // Replace with a valid user ID from your database\r\n \"products\": [\r\n {\r\n \"productId\": \"6553a4e897ac8ac9462f96c4\", // Replace with a valid product ID from your database\r\n \"productName\": \"Mastering Card\",\r\n \"quantity\": 1\r\n }\r\n ],\r\n \"totalAmount\": 500\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/order",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"order"
]
}
},
"response": []
},
{
"name": "Retrieve user data",
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0NGQ5YmU1YzAxZjZjMGNhNzkyMDAiLCJlbWFpbCI6IndhcGF0dUBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMjE0NTcwLCJleHAiOjE3MDAyMTgxNzB9.IMrvxc4l2A5cwMATP3FuCIiZUmaS-eewpqLz5CORQQA",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"65544d9be5c01f6c0ca79200\"\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/retrieveUser",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"retrieveUser"
]
}
},
"response": []
}
]
},
{
"name": "Admin",
"item": [
{
"name": "Retrieve All Products",
"request": {
12 months ago
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTUzNWNiNTI2YjU4NmEzZTJmZDU2Y2MiLCJlbWFpbCI6ImFkbWluQGVtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTcwMDIxNTgwNSwiZXhwIjoxNzAwMjE5NDA1fQ.tYjbNBbBsg71V7fPXk68ccEJ3svDiyAL_8O0CPZDKYo",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/product/all",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"product",
"all"
]
}
},
"response": []
},
{
"name": "Create Product",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTUzNWNiNTI2YjU4NmEzZTJmZDU2Y2MiLCJlbWFpbCI6ImFkbWluQGVtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTcwMDA0MTY3OCwiZXhwIjoxNzAwMDQ1Mjc4fQ.R3pE54-sStTo10q8caVvMg-Uup9akuGgM7rsINdfvPo",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Poporing Card\",\r\n \"description\": \"Description unknown\",\r\n \"price\": 500\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/product/create",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"product",
"create"
]
}
},
"response": []
},
{
"name": "Update Product",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTUzNWNiNTI2YjU4NmEzZTJmZDU2Y2MiLCJlbWFpbCI6ImFkbWluQGVtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTcwMDAyMzgxMSwiZXhwIjoxNzAwMDI3NDExfQ.DrhpNlBJKpfHod7MfTalQ5j2-s8tnR630yh2-_EIYWw",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"name\": \"Christmas Cookie Card\",\r\n \"description\": \"Updated Product Description\",\r\n \"price\": 29.99,\r\n \"isActive\": false\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/product/products/65545a1e6fa9d841e1518d1d",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"product",
"products",
"65545a1e6fa9d841e1518d1d"
]
}
},
"response": []
},
{
"name": "Activate Product",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTUzNWNiNTI2YjU4NmEzZTJmZDU2Y2MiLCJlbWFpbCI6ImFkbWluQGVtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTcwMDAyOTI0MiwiZXhwIjoxNzAwMDMyODQyfQ.seG4bjWAoolGMrS04tRvEsc033HgR1aLnbhOlFw5rDc",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/product/products/6554634e5cac4bcd6f2394ed/activate",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"product",
"products",
"6554634e5cac4bcd6f2394ed",
"activate"
]
}
},
"response": []
},
{
"name": "Archive/Draft Product",
"request": {
"method": "PUT",
"header": [],
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/product/products/6554634e5cac4bcd6f2394ed/archive",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"product",
"products",
"6554634e5cac4bcd6f2394ed",
"archive"
]
}
},
"response": []
},
{
"name": "Set User to Admin",
"request": {
12 months ago
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTUzNWNiNTI2YjU4NmEzZTJmZDU2Y2MiLCJlbWFpbCI6ImFkbWluQGVtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTcwMDA0MzgyOSwiZXhwIjoxNzAwMDQ3NDI5fQ.Mwkp161yHtw11mWL6oNnSDjyobOLHCb8qrFqgvF4bqI",
"type": "string"
}
]
},
"method": "POST",
"header": [],
12 months ago
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"65535cb526b586a3e2fd56cc\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/set-admin/",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"set-admin",
""
]
}
},
"response": []
},
{
"name": "Retrieve All Orders",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
12 months ago
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTUzNWNiNTI2YjU4NmEzZTJmZDU2Y2MiLCJlbWFpbCI6ImFkbWluQGVtYWlsLmNvbSIsImlzQWRtaW4iOnRydWUsImlhdCI6MTcwMDIxNTgwNSwiZXhwIjoxNzAwMjE5NDA1fQ.tYjbNBbBsg71V7fPXk68ccEJ3svDiyAL_8O0CPZDKYo",
"type": "string"
}
]
},
"method": "GET",
"header": [],
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/user/orders-all",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"user",
"orders-all"
]
}
},
"response": []
}
]
},
{
"name": "Cart",
"item": [
{
"name": "Add to cart",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0YWM4ZGQ3ZmJmOWVlOTAyMTdlNzciLCJlbWFpbCI6Im1hc3RlckBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMDU0NDk2LCJleHAiOjE3MDAwNTgwOTZ9.ytA5zJ3gqEefw7lRAgvVXlWD3-iANaEjjkYgBqMWc4I",
"type": "string"
}
]
},
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"655396dcc8ea29f42422e214\",\r\n \"productId\": \"6553a54566c4c86c39034b55\",\r\n \"quantity\": 5\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/cart/add-to-cart",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"cart",
"add-to-cart"
]
}
},
"response": []
},
{
"name": "Delete Item",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0YWM4ZGQ3ZmJmOWVlOTAyMTdlNzciLCJlbWFpbCI6Im1hc3RlckBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMDU0NDk2LCJleHAiOjE3MDAwNTgwOTZ9.ytA5zJ3gqEefw7lRAgvVXlWD3-iANaEjjkYgBqMWc4I",
"type": "string"
}
]
},
"method": "DELETE",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"655396dcc8ea29f42422e214\",\r\n \"productId\": \"6553a55666c4c86c39034b59\",\r\n \"quantity\": 1\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/cart/remove-from-cart",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"cart",
"remove-from-cart"
]
}
},
"response": []
},
{
"name": "Update Quantity",
"request": {
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0YWM4ZGQ3ZmJmOWVlOTAyMTdlNzciLCJlbWFpbCI6Im1hc3RlckBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMDU0NDk2LCJleHAiOjE3MDAwNTgwOTZ9.ytA5zJ3gqEefw7lRAgvVXlWD3-iANaEjjkYgBqMWc4I",
"type": "string"
}
]
},
"method": "PUT",
"header": [],
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"655396dcc8ea29f42422e214\",\r\n \"productId\": \"6553a55666c4c86c39034b59\",\r\n \"quantity\": 2000 // Update to the desired quantity\r\n}\r\n",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/cart/update-quantity",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"cart",
"update-quantity"
]
}
},
"response": []
},
{
"name": "Cart Total Price",
12 months ago
"protocolProfileBehavior": {
"disableBodyPruning": true
},
"request": {
12 months ago
"auth": {
"type": "bearer",
"bearer": [
{
"key": "token",
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiI2NTU0YWM4ZGQ3ZmJmOWVlOTAyMTdlNzciLCJlbWFpbCI6Im1hc3RlckBlbWFpbC5jb20iLCJpc0FkbWluIjpmYWxzZSwiaWF0IjoxNzAwMDU0NDk2LCJleHAiOjE3MDAwNTgwOTZ9.ytA5zJ3gqEefw7lRAgvVXlWD3-iANaEjjkYgBqMWc4I",
"type": "string"
}
]
},
"method": "GET",
"header": [],
12 months ago
"body": {
"mode": "raw",
"raw": "{\r\n \"userId\": \"655396dcc8ea29f42422e214\"\r\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
12 months ago
"raw": "http://ec2-3-15-94-47.us-east-2.compute.amazonaws.com/b5/cart/cart-details",
"protocol": "http",
"host": [
12 months ago
"ec2-3-15-94-47",
"us-east-2",
"compute",
"amazonaws",
"com"
],
"path": [
12 months ago
"b5",
"cart",
12 months ago
"cart-details"
]
}
},
"response": []
}
]
}
]
}