{"info":{"_postman_id":"d247f41e-cbec-46b0-9982-47e562608b67","name":"Ecommerce","description":"<html><head></head><body><p><strong>A RESTful API for an e-commerce application.</strong></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"27735481","collectionId":"d247f41e-cbec-46b0-9982-47e562608b67","publishedId":"2sAYJ6CKfj","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-12-27T21:41:24.000Z"},"item":[{"name":"User","item":[{"name":"List Users","id":"bba6045c-57f0-4c97-b0bc-04fe85b4ee61","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/users","description":"<p>This is an admin only endpoint to list all users registered in the system.</p>\n","urlObject":{"path":["api","v1","users"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"bba6045c-57f0-4c97-b0bc-04fe85b4ee61"},{"name":"Register User","id":"5b204a7e-9ff7-4711-bdce-dadd3b39dc6d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"email\": \"emmrys@gmail.com\",\n  \"first_name\": \"emmrys\",\n  \"last_name\": \"jay\",\n  \"password\": \"ejay\",\n  \"phone\": \"23456\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8081/api/v1/user","description":"<p>Register user</p>\n","urlObject":{"protocol":"http","port":"8081","path":["api","v1","user"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"5b204a7e-9ff7-4711-bdce-dadd3b39dc6d"},{"name":"Get User","id":"22d1c096-753a-4f0e-8c49-d7400f2e5292","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/user/:id","description":"<p>Get a single user - Admin only endpoint</p>\n","urlObject":{"path":["api","v1","user",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>user id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"22d1c096-753a-4f0e-8c49-d7400f2e5292"},{"name":"Update User","id":"5bfe27e5-954a-4595-8321-4ff933aee834","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"first_name\": \"Emmanuell\",\n  \"last_name\": \"Jonathan\",\n  \"phone\": \"+23412345678\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8081/api/v1/user/:id","description":"<p>Update a users first name and last name</p>\n","urlObject":{"protocol":"http","port":"8081","path":["api","v1","user",":id"],"host":["localhost"],"query":[],"variable":[{"description":{"content":"<p>user id</p>\n","type":"text/plain"},"type":"any","value":"6787d90c0b863857f8f8f1af","key":"id"}]}},"response":[],"_postman_id":"5bfe27e5-954a-4595-8321-4ff933aee834"},{"name":"Delete User","id":"f60bbe0c-738e-4b01-bfb9-af39a9c71e68","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://127.0.0.1:8080/api/v1/user/:id","description":"<p>Delete a user - Admin only endpoint</p>\n","urlObject":{"path":["api","v1","user",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>user id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"f60bbe0c-738e-4b01-bfb9-af39a9c71e68"}],"id":"7717090b-3c4d-47be-ae1f-a7a283407891","description":"<p>User related functions. This contains user and admin endpoints.</p>\n","_postman_id":"7717090b-3c4d-47be-ae1f-a7a283407891"},{"name":"Products","item":[{"name":"List Products","id":"0b71f5f8-91f7-47c4-8774-7aed89414e7b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/products","description":"<p>List all products registered in the system</p>\n","urlObject":{"path":["api","v1","products"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"0b71f5f8-91f7-47c4-8774-7aed89414e7b"},{"name":"Create Product","id":"5f57dec7-599c-428a-bd7c-3da70320558a","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"description\": \"good stuff 2\",\n  \"name\": \"four range kit\",\n  \"price\": 7.1,\n  \"quantity\": 50\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8080/api/v1/product","description":"<p>Create a product</p>\n","urlObject":{"path":["api","v1","product"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"5f57dec7-599c-428a-bd7c-3da70320558a"},{"name":"Get Product","id":"98b0278f-2d7d-4997-b1b9-92fba7ef6bca","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/product/:id","description":"<p>Get a single Product</p>\n","urlObject":{"path":["api","v1","product",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>product id</p>\n","type":"text/plain"},"type":"any","value":"677e9913c63f428d6666d7bf","key":"id"}]}},"response":[],"_postman_id":"98b0278f-2d7d-4997-b1b9-92fba7ef6bca"},{"name":"Update Product","id":"1855b583-a58c-46ea-916f-73ff4695627e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n  \"description\": \"string\",\n  \"name\": \"string\",\n  \"price\": 0,\n  \"quantity\": 0,\n  \"status\": \"string\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8080/api/v1/product/:id","description":"<p>Update a product</p>\n","urlObject":{"path":["api","v1","product",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>product id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"1855b583-a58c-46ea-916f-73ff4695627e"},{"name":"Delete Product","id":"ae3605c1-238b-47e2-ac3e-86d06c5b14c4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://127.0.0.1:8080/api/v1/product/:id","description":"<p>Delete a product (Soft delete)</p>\n","urlObject":{"path":["api","v1","product",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>product id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"ae3605c1-238b-47e2-ac3e-86d06c5b14c4"}],"id":"aa751cc7-fe5e-4a8f-9a75-ba62c3b3f5a2","description":"<p>Product related functions. These are Admin endpoints</p>\n","_postman_id":"aa751cc7-fe5e-4a8f-9a75-ba62c3b3f5a2"},{"name":"Order","item":[{"name":"Place Order","id":"b622d6fb-9e0c-4e8d-aa7b-5fda56cc15ad","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"products\": [\n    {\n      \"product_id\": \"6789cc1fd679f53240feb97c\",\n      \"quantity\": 3\n    },\n    {\n        \"product_id\": \"6789cc15d679f53240feb97b\",\n        \"quantity\": 2\n    }\n  ]\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8082/api/v1/order","description":"<p>Place order by specifying a list of products</p>\n","urlObject":{"protocol":"http","port":"8082","path":["api","v1","order"],"host":["127","0","0","1"],"query":[],"variable":[]}},"response":[],"_postman_id":"b622d6fb-9e0c-4e8d-aa7b-5fda56cc15ad"},{"name":"Get Order","id":"ae8823e7-22ee-4ac8-a779-20ca9cdf6e94","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/order/:id","description":"<p>Get a single order along with its products</p>\n","urlObject":{"path":["api","v1","order",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>order id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"ae8823e7-22ee-4ac8-a779-20ca9cdf6e94"},{"name":"Update Order Status","id":"c62ff8cf-4c37-496c-ba7b-a53954195aa6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"status\": \"Processing\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8080/api/v1/order/:id","description":"<p>Update the status of an order - Admin only endpoint</p>\n","urlObject":{"path":["api","v1","order",":id"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>order id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"c62ff8cf-4c37-496c-ba7b-a53954195aa6"},{"name":"Cancel Order","id":"932321b4-e15d-4429-bed3-cdccd7123e2f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"PATCH","header":[],"url":"http://127.0.0.1:8080/api/v1/order/:id/cancel","description":"<p>Cancel a Pending order</p>\n","urlObject":{"path":["api","v1","order",":id","cancel"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>order id</p>\n","type":"text/plain"},"type":"any","value":"","key":"id"}]}},"response":[],"_postman_id":"932321b4-e15d-4429-bed3-cdccd7123e2f"},{"name":"List User's Orders","id":"f1aa4320-6aec-4b45-acf4-f4b26ba8d48e","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{Token}}"}]},"isInherited":false},"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/user/:user-id/orders","description":"<p>List all orders placed by a single user</p>\n","urlObject":{"path":["api","v1","user",":user-id","orders"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[{"description":{"content":"<p>user id</p>\n","type":"text/plain"},"type":"any","value":"","key":"user-id"}]}},"response":[],"_postman_id":"f1aa4320-6aec-4b45-acf4-f4b26ba8d48e"}],"id":"942b08b2-869d-44bc-a2d7-65bdc4a4a7fd","description":"<p>Order related functions. This contains Admin and User endpoints.</p>\n","_postman_id":"942b08b2-869d-44bc-a2d7-65bdc4a4a7fd"},{"name":"Health","item":[{"name":"Health Post","id":"0ef95bd9-2eae-4019-b300-7e19aab11985","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"name\": \"\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8080/api/v1/health","description":"<p>Health post</p>\n","urlObject":{"path":["api","v1","health"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"0ef95bd9-2eae-4019-b300-7e19aab11985"},{"name":"Health Get","id":"25523fbb-e635-4e5f-8ba9-fae040046b6d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://127.0.0.1:8080/api/v1/health","description":"<p>Healt get</p>\n","urlObject":{"path":["api","v1","health"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"25523fbb-e635-4e5f-8ba9-fae040046b6d"}],"id":"5b4ab322-ce1f-44ec-a1b1-c884073cd24c","description":"<p>Health Checks</p>\n","_postman_id":"5b4ab322-ce1f-44ec-a1b1-c884073cd24c"},{"name":"Auth","item":[{"name":"Login","id":"63a43af8-8ec8-4c2a-8194-ac6a77238ecd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"email\": \"ecommerce-admin@gmail.com\",\n    \"password\": \"password\"\n}","options":{"raw":{"language":"json"}}},"url":"http://127.0.0.1:8080/api/v1/login","description":"<p>Login and get an authorization token for future requests</p>\n","urlObject":{"path":["api","v1","login"],"host":["http://127.0.0.1:8080"],"query":[],"variable":[]}},"response":[],"_postman_id":"63a43af8-8ec8-4c2a-8194-ac6a77238ecd"}],"id":"de892173-3fc7-4699-a37e-c86420a063b5","description":"<p>Authentication endpoints</p>\n","_postman_id":"de892173-3fc7-4699-a37e-c86420a063b5"}],"event":[{"listen":"prerequest","script":{"id":"b31ff92d-48bc-4bd5-a4f9-8ce56567236f","type":"text/javascript","packages":{},"exec":[""]}},{"listen":"test","script":{"id":"47b1573b-1b0b-433e-85e1-dd88faa7fc2f","type":"text/javascript","packages":{},"exec":[""]}}],"variable":[{"key":"BaseURL","value":"http://127.0.0.1:8080","type":"string"}]}