{"info":{"_postman_id":"7ecd9ab1-8c6a-4b4c-8906-17b9980cdd46","name":"BookStore","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"40726492","collectionId":"7ecd9ab1-8c6a-4b4c-8906-17b9980cdd46","publishedId":"2sB34hFf8z","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-07-14T13:07:17.000Z"},"item":[{"name":"authentication","item":[{"name":"Register user","event":[{"listen":"test","script":{"id":"770252ab-c7fb-49aa-bdd6-1374617273a0","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"20e65f3c-b489-40d8-895e-ea305bb27d21","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"Panchal Keyur\",\r\n    \"email\": \"panchalkeyur694@gmail.com\",\r\n    \"password\": \"test1234\",\r\n    \"dateOfBirth\": \"2005-06-08\",\r\n    \"phoneNumber\": 1234567890,\r\n    \"gender\": \"male\",\r\n    \"address\": {\r\n        \"line\": \"near metro station, indiranagar\",\r\n        \"city\": \"bengaluru\",\r\n        \"state\": \"kar\",\r\n        \"zipCode\": 560038,\r\n        \"country\": \"ind\",\r\n        \"street\": \"10th main road\"\r\n    }\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/auth/register","urlObject":{"protocol":"http","port":"8002","path":["auth","register"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"20e65f3c-b489-40d8-895e-ea305bb27d21"},{"name":"Login user","id":"defde833-f871-4105-a25d-8642b8cf4846","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"panchalkeyur.dev@gmail.com\",\r\n    \"password\": \"test1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/auth/login","description":"<h2 id=\"login-api\">Login API</h2>\n<p>This endpoint allows users to authenticate by logging into their account. It accepts user credentials and returns a response indicating the success or failure of the login attempt.</p>\n<h3 id=\"request\">Request</h3>\n<ul>\n<li><p><strong>Method</strong>: POST</p>\n</li>\n<li><p><strong>URL</strong>: <code>http://localhost:8002/auth/login</code></p>\n</li>\n</ul>\n<h4 id=\"request-body\">Request Body</h4>\n<p>The request body must be sent in JSON format and should include the following parameters:</p>\n<ul>\n<li><p><code>email</code> (string): The email address associated with the user's account. This is required for authentication.</p>\n</li>\n<li><p><code>password</code> (string): The password corresponding to the provided email address. This is also required for authentication.</p>\n</li>\n</ul>\n<p><strong>Example Request Body:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"email\": \"user@example.com\",\n  \"password\": \"yourpassword\"\n}\n\n</code></pre>\n<h3 id=\"response\">Response</h3>\n<p>Upon a successful login, the API will return a response indicating the authentication status. The response may include a token or user information, depending on the implementation. In case of failure, an error message will be provided.</p>\n<p><strong>Expected Response:</strong></p>\n<ul>\n<li><p>On success: A success message along with user details or an authentication token.</p>\n</li>\n<li><p>On failure: An error message detailing the reason for the failure (e.g., invalid credentials).</p>\n</li>\n</ul>\n<h3 id=\"notes\">Notes</h3>\n<ul>\n<li><p>Ensure that the email and password are correct to avoid authentication errors.</p>\n</li>\n<li><p>This endpoint is crucial for user sessions and should be secured to prevent unauthorized access.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8002","path":["auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"defde833-f871-4105-a25d-8642b8cf4846"},{"name":"Verfify Otp","id":"b002785b-65b3-43b3-9592-c53087e15a4e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"otp\": 705653,\r\n    \"email\": \"panchalkeyur694@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/auth/verifyOtp","urlObject":{"protocol":"http","port":"8002","path":["auth","verifyOtp"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b002785b-65b3-43b3-9592-c53087e15a4e"},{"name":"Resend the Otp","id":"6c569835-cb28-4373-800d-8e8e2da609d4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"panchalkeyur694@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/auth/resendOtp","urlObject":{"protocol":"http","port":"8002","path":["auth","resendOtp"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"6c569835-cb28-4373-800d-8e8e2da609d4"},{"name":"Forgot password","id":"e9715a3c-a1a7-4a59-88f5-ada3015dc29f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"panchalkeyur.dev@gmail.com\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/auth/forgotpassword","urlObject":{"protocol":"http","port":"8002","path":["auth","forgotpassword"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e9715a3c-a1a7-4a59-88f5-ada3015dc29f"},{"name":"Reset Password","id":"64361d4c-6cf9-4286-8578-4283ff77ba29","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"password\": \"test1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/auth/resetPassword/5ee8c3e29050147cc1d407a61814980e7c460e7cff0be6ebb6ac0d34c534fa45","urlObject":{"protocol":"http","port":"8002","path":["auth","resetPassword","5ee8c3e29050147cc1d407a61814980e7c460e7cff0be6ebb6ac0d34c534fa45"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"64361d4c-6cf9-4286-8578-4283ff77ba29"}],"id":"dc52a0f9-5186-43e7-a825-69814eb848a3","_postman_id":"dc52a0f9-5186-43e7-a825-69814eb848a3","description":""},{"name":"users","item":[{"name":"GET All Users","event":[{"listen":"test","script":{"id":"17a118ef-2c99-4869-b819-2c35519cfd2a","exec":[""],"type":"text/javascript","packages":{},"requests":{}}}],"id":"7adf1f15-963d-4996-aa8b-ea2a66b39aa5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/users/all?limit=10&page=1&phone=1234567890&sort=new&email=example@gmail.com&name=John Doe","urlObject":{"protocol":"http","port":"8002","path":["users","all"],"host":["localhost"],"query":[{"key":"limit","value":"10"},{"key":"page","value":"1"},{"key":"phone","value":"1234567890"},{"key":"sort","value":"new"},{"key":"email","value":"example@gmail.com"},{"key":"name","value":"John Doe"}],"variable":[]}},"response":[],"_postman_id":"7adf1f15-963d-4996-aa8b-ea2a66b39aa5"},{"name":"GET One User","id":"95b0124a-4b4a-4bf5-9cc0-73074a0304db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/users/6ac4dae2e24f6ef2aac062a5","urlObject":{"protocol":"http","port":"8002","path":["users","6ac4dae2e24f6ef2aac062a5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"95b0124a-4b4a-4bf5-9cc0-73074a0304db"},{"name":"GET Logged In User Info","id":"d158ca55-ae42-494e-8c9b-dcbc9c2973f8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/users/me","urlObject":{"protocol":"http","port":"8002","path":["users","me"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"d158ca55-ae42-494e-8c9b-dcbc9c2973f8"},{"name":"GET All User Orders","id":"2aeb8cf4-7630-451d-8078-134fda7bfae3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/users/orders","urlObject":{"protocol":"http","port":"8002","path":["users","orders"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"2aeb8cf4-7630-451d-8078-134fda7bfae3"},{"name":"POST Create User Fav Books","id":"9b645e3e-03fa-4263-9efe-b04c2beceb25","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"bookId\": \"683697c5c4efe00d7ca88e5b\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/users/favBooks","urlObject":{"protocol":"http","port":"8002","path":["users","favBooks"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"9b645e3e-03fa-4263-9efe-b04c2beceb25"},{"name":"PATCH Update User","id":"1c7d0d74-db78-4667-a451-9fe75a747229","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"name\": \"author\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/users/updateMe","urlObject":{"protocol":"http","port":"8002","path":["users","updateMe"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1c7d0d74-db78-4667-a451-9fe75a747229"}],"id":"880e332c-83ac-40ad-a793-c09532876baa","_postman_id":"880e332c-83ac-40ad-a793-c09532876baa","description":""},{"name":"Books","item":[{"name":"POST Create Book","id":"5d61e9f9-8962-47eb-847d-5a1b7713a5e6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"title","value":"Book no 1","type":"text","uuid":"0c4e3c18-dd06-40bf-a74b-c7b459877bc9"},{"key":"author","value":"Keyur","type":"text","uuid":"2ada3345-a75b-49ba-a384-0d32be6eeec6"},{"key":"stock","value":"100","type":"text","uuid":"d36d1a5d-1e2a-4d5b-9fb5-b5ce8465b631"},{"key":"description","value":"Description 1","type":"text","uuid":"5caf53d9-5c0e-499c-9ac3-1a7b056e3dde"},{"key":"price","value":"100","type":"text","uuid":"62f39d57-9b8b-4302-af93-61d5daafc177"},{"key":"category","value":"Action","type":"text","uuid":"945c94d2-0aa2-48a2-be3d-8bc0b0a70c5b"},{"key":"coverImage","type":"file","uuid":"025c9b75-a493-435f-8c42-a9dc34bad055","src":"postman-cloud:///1f01b9d6-9668-4ff0-aa25-89de6f7ef4bf"}]},"url":"http://localhost:8002/books/","urlObject":{"protocol":"http","port":"8002","path":["books",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"5d61e9f9-8962-47eb-847d-5a1b7713a5e6"},{"name":"GET All Books","id":"6b84e331-d2f1-4af8-a0f6-77720fa8216d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/books?author=Author&sort=new&page=1&limit=10","urlObject":{"protocol":"http","port":"8002","path":["books"],"host":["localhost"],"query":[{"key":"author","value":"Author"},{"key":"sort","value":"new"},{"key":"page","value":"1"},{"key":"limit","value":"10"},{"disabled":true,"key":"title","value":"Book"}],"variable":[]}},"response":[],"_postman_id":"6b84e331-d2f1-4af8-a0f6-77720fa8216d"},{"name":"GET One Book","id":"a47e040b-5fa6-46df-8f37-2db73db98528","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/books/6ac4f8cb11fa0a14d62a4881","urlObject":{"protocol":"http","port":"8002","path":["books","6ac4f8cb11fa0a14d62a4881"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a47e040b-5fa6-46df-8f37-2db73db98528"},{"name":"PATCH Update Book","id":"01bc355b-ff59-4996-a3f8-45f40b0f2df0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"formdata","formdata":[{"key":"coverImage","type":"file","uuid":"4ec6cca0-abd8-4f3a-a2dc-8ff61cc325ff","src":"postman-cloud:///1f01b9d6-9668-4ff0-aa25-89de6f7ef4bf","disabled":true},{"key":"author","value":"Author","type":"text","uuid":"81fe1856-71fe-44f6-8a33-5d8789b1c773"}]},"url":"http://localhost:8002/books/6ac4f8df11fa0a14d62a4885","urlObject":{"protocol":"http","port":"8002","path":["books","6ac4f8df11fa0a14d62a4885"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"01bc355b-ff59-4996-a3f8-45f40b0f2df0"},{"name":"DELETE Delete Book","id":"cdcdadad-8316-44f8-888f-15c7f78ef413","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8002/books/6ac4f8df11fa0a14d62a4885","urlObject":{"protocol":"http","port":"8002","path":["books","6ac4f8df11fa0a14d62a4885"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"cdcdadad-8316-44f8-888f-15c7f78ef413"}],"id":"6236d9c4-680b-4345-8d6c-820f0bc852a1","_postman_id":"6236d9c4-680b-4345-8d6c-820f0bc852a1","description":""},{"name":"AddToCart","item":[{"name":"Add Books in to a Cart","id":"7fa08851-0472-4f63-ab72-a5daf569435e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"bookId\": \"6ac4f8df11fa0a14d62a4885\",\r\n    \"quantity\": 1\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/cart/add","urlObject":{"protocol":"http","port":"8002","path":["cart","add"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"7fa08851-0472-4f63-ab72-a5daf569435e"},{"name":"Remove Books from the cart","id":"10de56a9-ef21-4429-90cd-d2062827df65","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/cart/remove/6ac4f8df11fa0a14d62a4885","urlObject":{"protocol":"http","port":"8002","path":["cart","remove","6ac4f8df11fa0a14d62a4885"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"10de56a9-ef21-4429-90cd-d2062827df65"},{"name":"GET User Cart","id":"0725c0b7-ac78-4904-b5b6-e068e7453988","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/cart/","urlObject":{"protocol":"http","port":"8002","path":["cart",""],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"0725c0b7-ac78-4904-b5b6-e068e7453988"}],"id":"614e39b6-cb27-405d-9896-836315628d51","_postman_id":"614e39b6-cb27-405d-9896-836315628d51","description":""},{"name":"Payments","item":[{"name":"Checkout page using stripe","id":"72cb44b6-17b1-454e-ae9a-c804219c19c7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:8002/orders/createcheckoutsession","urlObject":{"protocol":"http","port":"8002","path":["orders","createcheckoutsession"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"72cb44b6-17b1-454e-ae9a-c804219c19c7"},{"name":"Refund the order","id":"83b588e2-2def-4955-9552-5bc178954d0f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/orders/refundPayment/pi_3UNYxtCEBeUXy0V21D0AIcpQ","urlObject":{"protocol":"http","port":"8002","path":["orders","refundPayment","pi_3UNYxtCEBeUXy0V21D0AIcpQ"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"83b588e2-2def-4955-9552-5bc178954d0f"}],"id":"b5537769-fb4e-4f68-94cd-1cc749dc9d1c","_postman_id":"b5537769-fb4e-4f68-94cd-1cc749dc9d1c","description":""},{"name":"Reviews on Books","item":[{"name":"POST Create Review on Books","id":"06be1b02-0ff0-441a-93fc-216be495e8c5","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\r\n    \"review\": \"Book quality is very bad\",\r\n    \"rating\": 3\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/books/6ac4f8df11fa0a14d62a4885/review","urlObject":{"protocol":"http","port":"8002","path":["books","6ac4f8df11fa0a14d62a4885","review"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"06be1b02-0ff0-441a-93fc-216be495e8c5"},{"name":"GET All Book Reviews","id":"cf72ffd1-aaf0-41a3-bb16-749bf26e43e2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/books/6ac4f8df11fa0a14d62a4885/review?sort=new&limit=10&page=1","urlObject":{"protocol":"http","port":"8002","path":["books","6ac4f8df11fa0a14d62a4885","review"],"host":["localhost"],"query":[{"key":"sort","value":"new"},{"key":"limit","value":"10"},{"key":"page","value":"1"}],"variable":[]}},"response":[],"_postman_id":"cf72ffd1-aaf0-41a3-bb16-749bf26e43e2"},{"name":"PATCH Update Reviews","id":"e6432ab6-d456-4ac5-9a11-b6ba93282d91","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"review\": \"Book quality is not good\",\r\n    \"rating\": 2\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/books/6ac4f8df11fa0a14d62a4885/review","urlObject":{"protocol":"http","port":"8002","path":["books","6ac4f8df11fa0a14d62a4885","review"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"e6432ab6-d456-4ac5-9a11-b6ba93282d91"},{"name":"DELETE Reviews","id":"1134680f-222c-4248-9a84-f0e63e8aee30","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8002/books/683697c5c4efe00d7ca88e5a/review","urlObject":{"protocol":"http","port":"8002","path":["books","683697c5c4efe00d7ca88e5a","review"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"1134680f-222c-4248-9a84-f0e63e8aee30"},{"name":"GET All Books Review","id":"02166c05-bea3-4e72-9940-5b1a30851b39","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/reviews/all?sort=new&limit=1","urlObject":{"protocol":"http","port":"8002","path":["reviews","all"],"host":["localhost"],"query":[{"key":"sort","value":"new"},{"key":"limit","value":"1"}],"variable":[]}},"response":[],"_postman_id":"02166c05-bea3-4e72-9940-5b1a30851b39"},{"name":"GET User Review on Books","id":"57dccc7d-2b0d-4db6-b366-24d255ddbb8f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/reviews/6ac4f8df11fa0a14d62a4885/me","urlObject":{"protocol":"http","port":"8002","path":["reviews","6ac4f8df11fa0a14d62a4885","me"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"57dccc7d-2b0d-4db6-b366-24d255ddbb8f"}],"id":"f3e5c7ab-422a-44b0-84ab-47f32407bd4e","_postman_id":"f3e5c7ab-422a-44b0-84ab-47f32407bd4e","description":""},{"name":"Orders","item":[{"name":"GET One Order","id":"c45063d5-66e0-425f-8d4a-a179aee2458f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/orders/order/6ac4ffb73639579f3a8eb0df","urlObject":{"protocol":"http","port":"8002","path":["orders","order","6ac4ffb73639579f3a8eb0df"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c45063d5-66e0-425f-8d4a-a179aee2458f"},{"name":"GET All Orders","id":"3d6124a7-c987-4e45-a2db-8f0e97dbe32e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/orders/all?sort=old&limit=101&page=3","urlObject":{"protocol":"http","port":"8002","path":["orders","all"],"host":["localhost"],"query":[{"key":"sort","value":"old"},{"key":"limit","value":"101"},{"key":"page","value":"3"}],"variable":[]}},"response":[],"_postman_id":"3d6124a7-c987-4e45-a2db-8f0e97dbe32e"}],"id":"d7530eb9-0b6b-4d41-a1b5-6a4354e17c7f","_postman_id":"d7530eb9-0b6b-4d41-a1b5-6a4354e17c7f","description":""},{"name":"Admin","item":[{"name":"GET Sales Analytics","id":"a3c95b65-c0ff-4e9e-8192-d0aaacaf6876","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/getSalesAnalytics?groupBy=week","description":"<h3 id=\"get-sales-analytics\">Get Sales Analytics</h3>\n<p>This endpoint retrieves sales analytics data, providing insights into revenue, orders, and items sold.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p><strong>Method</strong>: GET</p>\n</li>\n<li><p><strong>URL</strong>: <code>http://localhost:8002/admin/getSalesAnalytics</code></p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><strong>Status Code</strong>: 200 OK</p>\n</li>\n<li><p><strong>Content-Type</strong>: application/json</p>\n</li>\n</ul>\n<h4 id=\"response-body\">Response Body</h4>\n<p>The response will contain a JSON object with the following structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"status\": \"\",\n  \"data\": [\n    {\n      \"_id\": \"\",\n      \"totalRevenue\": 0,\n      \"avgRevenue\": 0,\n      \"totalOrders\": 0,\n      \"totalItems\": 0\n    }\n  ]\n}\n\n</code></pre>\n<ul>\n<li><p><strong>status</strong>: A string indicating the status of the request.</p>\n</li>\n<li><p><strong>data</strong>: An array containing sales analytics data:</p>\n<ul>\n<li><p><strong>_id</strong>: A unique identifier for the analytics record.</p>\n</li>\n<li><p><strong>totalRevenue</strong>: The total revenue generated.</p>\n</li>\n<li><p><strong>avgRevenue</strong>: The average revenue per order.</p>\n</li>\n<li><p><strong>totalOrders</strong>: The total number of orders processed.</p>\n</li>\n<li><p><strong>totalItems</strong>: The total number of items sold.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"notes\">Notes</h4>\n<ul>\n<li><p>Ensure that the server is running and accessible at the specified URL.</p>\n</li>\n<li><p>This endpoint does not require any request parameters.</p>\n</li>\n<li><p>The response may contain default values (e.g., 0) if there are no sales records available.</p>\n</li>\n</ul>\n","urlObject":{"protocol":"http","port":"8002","path":["admin","getSalesAnalytics"],"host":["localhost"],"query":[{"key":"groupBy","value":"week"}],"variable":[]}},"response":[],"_postman_id":"a3c95b65-c0ff-4e9e-8192-d0aaacaf6876"},{"name":"GET Admin Dashboard","id":"4ca1a732-1fbe-47ec-98b4-68d5fc47bdae","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/dashboard","description":"<h3 id=\"get-dashboard-data\">Get Dashboard Data</h3>\n<p>This endpoint retrieves the dashboard data for the admin panel, providing insights into sales, user statistics, order statistics, and low inventory items.</p>\n<h4 id=\"request\">Request</h4>\n<ul>\n<li><p><strong>Method:</strong> GET</p>\n</li>\n<li><p><strong>URL:</strong> <code>http://localhost:8002/admin/getDashboard</code></p>\n</li>\n<li><p><strong>Request Body:</strong> No request body is required for this GET request.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response is returned in JSON format with the following structure:</p>\n<ul>\n<li><p><strong>status</strong>: A string indicating the status of the request.</p>\n</li>\n<li><p><strong>salesData</strong>: An array containing sales-related information:</p>\n<ul>\n<li><p><strong>monthlyTotal</strong>: An array for monthly total sales (currently empty).</p>\n</li>\n<li><p><strong>yearlyTotal</strong>: An array with yearly totals:</p>\n<ul>\n<li><p><strong>_id</strong>: Identifier (null in this case).</p>\n</li>\n<li><p><strong>total</strong>: Total sales amount (default is 0).</p>\n</li>\n<li><p><strong>count</strong>: Count of sales (default is 0).</p>\n</li>\n</ul>\n</li>\n<li><p><strong>dailySales</strong>: An array of daily sales data:</p>\n<ul>\n<li><p><strong>_id</strong>: Identifier for the sales record.</p>\n</li>\n<li><p><strong>sales</strong>: Total sales amount for the day (default is 0).</p>\n</li>\n<li><p><strong>count</strong>: Count of sales for the day (default is 0).</p>\n</li>\n</ul>\n</li>\n<li><p><strong>topBooks</strong>: An array of the top-selling books:</p>\n<ul>\n<li><p><strong>_id</strong>: Identifier for the book.</p>\n</li>\n<li><p><strong>title</strong>: Title of the book (currently null).</p>\n</li>\n<li><p><strong>totalSold</strong>: Total number of copies sold (default is 0).</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>userStats</strong>: An array containing user-related statistics:</p>\n<ul>\n<li><p><strong>totalUsers</strong>: An array with total user count:</p>\n<ul>\n<li><strong>count</strong>: Total number of users (default is 0).</li>\n</ul>\n</li>\n<li><p><strong>newUserThisMonth</strong>: An array for new users registered this month (currently empty).</p>\n</li>\n<li><p><strong>userByRoles</strong>: An array of user counts by roles:</p>\n<ul>\n<li><p><strong>_id</strong>: Identifier for the role.</p>\n</li>\n<li><p><strong>count</strong>: Count of users in that role (default is 0).</p>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>orderStats</strong>: An array containing order-related statistics:</p>\n<ul>\n<li><p><strong>orderByStatus</strong>: An array with order counts by status:</p>\n<ul>\n<li><p><strong>_id</strong>: Identifier for the order status.</p>\n</li>\n<li><p><strong>count</strong>: Count of orders in that status (default is 0).</p>\n</li>\n</ul>\n</li>\n<li><p><strong>pendingOrders</strong>: An array for pending orders:</p>\n<ul>\n<li><strong>count</strong>: Count of pending orders (default is 0).</li>\n</ul>\n</li>\n</ul>\n</li>\n<li><p><strong>lowInventory</strong>: An array of items with low inventory:</p>\n<ul>\n<li><p><strong>_id</strong>: Identifier for the item.</p>\n</li>\n<li><p><strong>title</strong>: Title of the item.</p>\n</li>\n<li><p><strong>author</strong>: Author of the item.</p>\n</li>\n<li><p><strong>stock</strong>: Current stock level (default is 0).</p>\n</li>\n</ul>\n</li>\n</ul>\n<p>This endpoint is essential for administrators to monitor the key metrics of the application effectively.</p>\n","urlObject":{"protocol":"http","port":"8002","path":["admin","dashboard"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"4ca1a732-1fbe-47ec-98b4-68d5fc47bdae"},{"name":"GET Book Analytics","id":"c21f5be5-ab44-4118-aa35-73eda7a5f8dc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/book/analytics","urlObject":{"protocol":"http","port":"8002","path":["admin","book","analytics"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"c21f5be5-ab44-4118-aa35-73eda7a5f8dc"},{"name":"GET Book Performance","id":"a84b7f20-fd28-4cc3-9d87-d986ef2cad03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/book/performance?page=1&limit=10","urlObject":{"protocol":"http","port":"8002","path":["admin","book","performance"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[],"_postman_id":"a84b7f20-fd28-4cc3-9d87-d986ef2cad03"},{"name":"GET Book category revenue","id":"145d1a3d-6178-46a8-b742-c4e5e01eb8e9","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/book/category/revenue","urlObject":{"protocol":"http","port":"8002","path":["admin","book","category","revenue"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"145d1a3d-6178-46a8-b742-c4e5e01eb8e9"},{"name":"GET Book category revenue each month and year","id":"54952ab6-1d45-4a2a-9f07-541b2842e6bd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/book/category/trend?startDate=2025-09-01&endDate=2026-09-01","urlObject":{"protocol":"http","port":"8002","path":["admin","book","category","trend"],"host":["localhost"],"query":[{"key":"startDate","value":"2025-09-01"},{"key":"endDate","value":"2026-09-01"}],"variable":[]}},"response":[],"_postman_id":"54952ab6-1d45-4a2a-9f07-541b2842e6bd"},{"name":"GET Order analytics","id":"fdce87c9-2883-4e89-8866-3e1ce92a3f03","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/order/analytics","urlObject":{"protocol":"http","port":"8002","path":["admin","order","analytics"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"fdce87c9-2883-4e89-8866-3e1ce92a3f03"},{"name":"GET Customer Analytics","id":"08883c3b-f761-46fd-9491-b0be54987fda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/customer/analytics?startDate=2025-05-01&endDate=2026-05-01","urlObject":{"protocol":"http","port":"8002","path":["admin","customer","analytics"],"host":["localhost"],"query":[{"key":"startDate","value":"2025-05-01"},{"key":"endDate","value":"2026-05-01"}],"variable":[]}},"response":[],"_postman_id":"08883c3b-f761-46fd-9491-b0be54987fda"},{"name":"GET Dead book list","id":"a6dd94cc-5567-4693-9437-9444056cb7b6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/book/deadstock?page=1&limit=10","urlObject":{"protocol":"http","port":"8002","path":["admin","book","deadstock"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[],"_postman_id":"a6dd94cc-5567-4693-9437-9444056cb7b6"},{"name":"GET Payment analytics","id":"48dc68c4-82a0-4c9a-b13b-af22fbbe6e24","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/payment/analytics","urlObject":{"protocol":"http","port":"8002","path":["admin","payment","analytics"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"48dc68c4-82a0-4c9a-b13b-af22fbbe6e24"},{"name":"GET Order growth","id":"ae4755b4-909e-4436-96a4-1c42ca928d74","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/order/order-growth?startDate=2026-01-01&endDate=2026-04-01","urlObject":{"protocol":"http","port":"8002","path":["admin","order","order-growth"],"host":["localhost"],"query":[{"key":"startDate","value":"2026-01-01"},{"key":"endDate","value":"2026-04-01"}],"variable":[]}},"response":[],"_postman_id":"ae4755b4-909e-4436-96a4-1c42ca928d74"},{"name":"GET Average Order Value","id":"697c6a30-2a71-4a01-9d53-1865b41eeed3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/order/avg-order-value?startDate=2025-06-01&endDate=2025-11-01","urlObject":{"protocol":"http","port":"8002","path":["admin","order","avg-order-value"],"host":["localhost"],"query":[{"key":"startDate","value":"2025-06-01"},{"key":"endDate","value":"2025-11-01"}],"variable":[]}},"response":[],"_postman_id":"697c6a30-2a71-4a01-9d53-1865b41eeed3"},{"name":"GET Book Rating Distribution","id":"503b59d2-565b-442e-aebe-a16d45583cb4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:8002/admin/book/rating/distribution?page=1&limit=10","urlObject":{"protocol":"http","port":"8002","path":["admin","book","rating","distribution"],"host":["localhost"],"query":[{"key":"page","value":"1"},{"key":"limit","value":"10"}],"variable":[]}},"response":[],"_postman_id":"503b59d2-565b-442e-aebe-a16d45583cb4"},{"name":"PATCH Deactivate User","id":"a93cfa61-db38-457b-8d11-5e75d9513343","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PATCH","header":[],"url":"http://localhost:8002/admin/deactivateUser/6ac4dae2e24f6ef2aac062a5","urlObject":{"protocol":"http","port":"8002","path":["admin","deactivateUser","6ac4dae2e24f6ef2aac062a5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"a93cfa61-db38-457b-8d11-5e75d9513343"},{"name":"PATCH Change User Role","id":"646d9b25-2e1f-43ca-b44b-97a10eacedfb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\r\n    \"role\": \"user\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/admin/change-role/6ac4dae2e24f6ef2aac062a5","urlObject":{"protocol":"http","port":"8002","path":["admin","change-role","6ac4dae2e24f6ef2aac062a5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"646d9b25-2e1f-43ca-b44b-97a10eacedfb"},{"name":"PATCH Activate User","id":"3dde63c0-5d6a-493a-a87a-c6646c4345db","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"PATCH","header":[],"url":"http://localhost:8002/admin/activateUser/6ac4dae2e24f6ef2aac062a5","urlObject":{"protocol":"http","port":"8002","path":["admin","activateUser","6ac4dae2e24f6ef2aac062a5"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"3dde63c0-5d6a-493a-a87a-c6646c4345db"}],"id":"2715cb3c-7bbe-48e2-af42-c0a72b76f389","_postman_id":"2715cb3c-7bbe-48e2-af42-c0a72b76f389","description":""},{"name":"Wishlist","item":[{"name":"Get all wishlist books","id":"388f6771-7e2c-4e87-bae8-5f287df5e981","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"raw","raw":"{\r\n    \"email\": \"hello-1@gmail.com\",\r\n    \"password\": \"hello-1234\"\r\n}"},"url":"http://localhost:8002/wishlist","urlObject":{"protocol":"http","port":"8002","path":["wishlist"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"388f6771-7e2c-4e87-bae8-5f287df5e981"},{"name":"Add book to wishlist","id":"79bf567e-05b7-4002-ae7f-0c6a94edbcdc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{TOKEN}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"","options":{"raw":{"language":"json"}}},"url":"http://localhost:8002/wishlist/6836a66013f0b230bee67c1f","urlObject":{"protocol":"http","port":"8002","path":["wishlist","6836a66013f0b230bee67c1f"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"79bf567e-05b7-4002-ae7f-0c6a94edbcdc"},{"name":"Remove book from wishlist","id":"b183109e-82c2-41cc-af1a-7684eee532c8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:8002/wishlist/6592008029c8c3e4dc76256c4","urlObject":{"protocol":"http","port":"8002","path":["wishlist","6592008029c8c3e4dc76256c4"],"host":["localhost"],"query":[],"variable":[]}},"response":[],"_postman_id":"b183109e-82c2-41cc-af1a-7684eee532c8"}],"id":"67b12d7f-fc18-47a3-9300-9592fc1faa81","_postman_id":"67b12d7f-fc18-47a3-9300-9592fc1faa81","description":""}]}