{"info":{"_postman_id":"eb65da5b-ccc2-4783-b462-c9cad661f186","name":"POSFusion POS Spring API","description":"<html><head></head><body><p>The POSFusion POS Spring API is a user-friendly RESTful API designed to manage a Point of Sale (POS) system. It allows you to easily create, read, update, and delete (CRUD) records for important parts of the system, such as customers, items, orders, and order details. Built with the Spring framework, this API ensures reliable data handling and smooth transactions. It provides different endpoints for managing records while keeping the data accurate and consistent. This documentation includes clear information about each endpoint, along with request and response formats, to help developers integrate and use the API effectively.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"37565373","collectionId":"eb65da5b-ccc2-4783-b462-c9cad661f186","publishedId":"2sAXxV6pte","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-10-17T08:08:12.000Z"},"item":[{"name":"Customer","item":[{"name":"Save Customer","id":"eae2d187-21f1-421e-93d3-72e8b64c7465","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\" : \"C00-001\",\n    \"name\" : \"Yasith Chathuranga\",\n    \"address\" : \"Galle\",\n    \"salary\" : 3000\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/customers","description":"<p>This endpoint lets you add a new customer. The request needs to include the customer's name, address and salary. The information is checked for accuracy before it's saved.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","customers"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"b60db4d0-13c3-48e8-9d18-be9c2f1c810e","name":"Save Customer","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\" : \"C00-001\",\n    \"name\" : \"Yasith Chathuranga\",\n    \"address\" : \"Galle\",\n    \"salary\" : 3000\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/customers"},"status":"Created","code":201,"_postman_previewlanguage":"plain","header":[{"key":"Content-Length","value":"0"},{"key":"Date","value":"Wed, 16 Oct 2024 09:50:42 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"eae2d187-21f1-421e-93d3-72e8b64c7465"},{"name":"Update Customer","id":"dd764c39-f5bc-459e-9be9-8130a061f842","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"    {\n        \"name\": \"Aravinda Gamage\",\n        \"address\": \"Boossa\",\n        \"salary\": 5000.0\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/customers/C00-002","description":"<p>This endpoint updates the information for an existing customer based on their ID. The request needs to include the new name, new address and new salary. The information is checked for accuracy before it is updated.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","customers","C00-002"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"7248bb1b-b29c-4669-ab2d-806f17f6aa80","name":"Update Customer","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"    {\n        \"name\": \"Aravinda Gamage\",\n        \"address\": \"Boossa\",\n        \"salary\": 5000.0\n    }","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/customers/C00-002"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Wed, 16 Oct 2024 09:53:01 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"dd764c39-f5bc-459e-9be9-8130a061f842"},{"name":"Get All Customers","id":"091d8ac3-8f47-446c-bd68-9ea8afd063e8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/customers/allCustomers","description":"<p>This endpoint gets the details of all customers. It will return a list of customer information or an error message if there are no customers.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","customers","allCustomers"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1608a3c8-e7e0-4a8d-942e-76275240c5a2","name":"Get All Customers","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/customers/allCustomers"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 16 Oct 2024 09:56:35 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"C00-001\",\n        \"name\": \"Yasith Chathuranga\",\n        \"address\": \"Galle\",\n        \"salary\": 3000\n    },\n    {\n        \"id\": \"C00-002\",\n        \"name\": \"Aravinda Gamage\",\n        \"address\": \"Boossa\",\n        \"salary\": 5000\n    },\n    {\n        \"id\": \"C00-003\",\n        \"name\": \"Gayanuka Bulegoda\",\n        \"address\": \"Matara\",\n        \"salary\": 8000\n    }\n]"}],"_postman_id":"091d8ac3-8f47-446c-bd68-9ea8afd063e8"},{"name":"Get Selected Customer","id":"32d8e0ba-af84-4d22-917a-de4f2d34fe20","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/customers/C00-002","description":"<p>This endpoint retrieves information for a specific customer using their ID. If the customer exists, their details will be returned; if not, an error message will appear.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","customers","C00-002"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"baccffe8-68a7-4afa-b43c-f5f78c70e6a5","name":"Get Selected Customer","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/customers/C00-001"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 16 Oct 2024 09:57:16 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"C00-001\",\n    \"name\": \"Yasith Chathuranga\",\n    \"address\": \"Galle\",\n    \"salary\": 3000\n}"}],"_postman_id":"32d8e0ba-af84-4d22-917a-de4f2d34fe20"},{"name":"Delete Customer","id":"57d82353-f633-4fe0-ab6f-55d5112468eb","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"url":"http://localhost:8080/POSFusion/api/v1/customers/C00-003","description":"<p>This endpoint deletes a specific customer using their ID. If the customer has any existing orders, the deletion won't be allowed, and an error message will be shown.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","customers","C00-003"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1487d59e-5dd7-4d79-82e8-3bcda63e2111","name":"Delete Customer","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:8080/POSFusion/api/v1/customers/C00-003"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Wed, 16 Oct 2024 09:57:51 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"57d82353-f633-4fe0-ab6f-55d5112468eb"}],"id":"641d06c7-ba05-43c4-8588-2357c714b0ac","description":"<p>The Customer folder has endpoints for managing customer information in the POSFusion POS Spring API. These endpoints let you create, retrieve, update, and delete customer records. Each endpoint is set up for specific customer management tasks, ensuring that data remains accurate and valid through the use of annotations and proper error handling.</p>\n","_postman_id":"641d06c7-ba05-43c4-8588-2357c714b0ac"},{"name":"Item","item":[{"name":"Save Item","id":"3d223ed5-4070-4bd6-9735-038b3098c560","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"description":"<p>This endpoint creates a new item in the inventory. The request must include the item details in JSON format. If the information is valid, the item will be saved to the database.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"382e2655-b7e8-45c7-bd96-7be78d738824","name":"Save Item","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"id\" : \"I00-001\",\n    \"name\" : \"Chocolote\",\n    \"qty\" : 100,\n    \"price\" : 100\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/items"},"status":"Created","code":201,"_postman_previewlanguage":"plain","header":[{"key":"Content-Length","value":"0"},{"key":"Date","value":"Wed, 16 Oct 2024 09:58:39 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"3d223ed5-4070-4bd6-9735-038b3098c560"},{"name":"Update Item","id":"dc3d085b-2e9c-4330-a209-ac91c940086d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"PATCH","header":[],"description":"<p>This endpoint updates the information for a specific item using its ID. The request must include the new item details in JSON format.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"3e3047d0-b0dc-4767-ad00-eb6344ffa15b","name":"Update Item","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"name\" : \"Orange\",\n    \"qty\" : 100,\n    \"price\" : 450\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/items/I00-002"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Wed, 16 Oct 2024 09:42:23 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"dc3d085b-2e9c-4330-a209-ac91c940086d"},{"name":"Get All Items","id":"eb879a31-6ee2-495a-9287-98203b6ed4a0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>This endpoint gets a list of all items in the inventory. The item details are returned in JSON format.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"6c84a770-4ad8-4175-808b-908df5f7aaf1","name":"Get All Items","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/items/allItems"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 16 Oct 2024 09:43:49 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"id\": \"I00-001\",\n        \"name\": \"Chocolate\",\n        \"qty\": 70,\n        \"price\": 250\n    },\n    {\n        \"id\": \"I00-002\",\n        \"name\": \"Orange\",\n        \"qty\": 100,\n        \"price\": 450\n    },\n    {\n        \"id\": \"I00-003\",\n        \"name\": \"Maari\",\n        \"qty\": 100,\n        \"price\": 150\n    }\n]"}],"_postman_id":"eb879a31-6ee2-495a-9287-98203b6ed4a0"},{"name":"Get Selected Item","id":"a254d032-1e8f-4bd0-9c4d-84d93cf6fc54","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"description":"<p>This endpoint gets the information for a specific item using its ID. The details of the item are returned in JSON format.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"9dd9c2c5-72a0-4793-9b33-2bda9dd30b48","name":"Get Selected Item","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/items/I00-003"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Wed, 16 Oct 2024 09:44:20 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"{\n    \"id\": \"I00-003\",\n    \"name\": \"Maari\",\n    \"qty\": 100,\n    \"price\": 150\n}"}],"_postman_id":"a254d032-1e8f-4bd0-9c4d-84d93cf6fc54"},{"name":"Delete Item","id":"e5bbe9c7-d924-4a17-94d5-7046620550e4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"DELETE","header":[],"description":"<p>This endpoint deletes a specific item using its ID. The item will be removed from the database if it is not linked to any existing orders.</p>\n","urlObject":{"query":[],"variable":[]},"url":""},"response":[{"id":"39b16039-23b8-4f57-9236-af8b50ee9fe3","name":"Delete Item","originalRequest":{"method":"DELETE","header":[],"url":"http://localhost:8080/POSFusion/api/v1/items/I00-002"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Wed, 16 Oct 2024 09:44:43 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"e5bbe9c7-d924-4a17-94d5-7046620550e4"}],"id":"4a70e52c-13d5-4bea-aeac-a98907e572cc","description":"<p>The Item folder contains endpoints for managing item information in the POSFusion POS Spring API. These endpoints allow you to create, retrieve, update, and delete item records. They are designed to ensure that data is handled correctly and checked for accuracy, which helps with the overall inventory management of the application.</p>\n","_postman_id":"4a70e52c-13d5-4bea-aeac-a98907e572cc"},{"name":"Order","item":[{"name":"Save Order","id":"87266a1b-84a6-4d0c-872a-1e2dececc5ce","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"orderId\": \"OD0-002\",\n    \"date\": \"2024-10-17\",\n    \"custId\": \"C00-002\",\n    \"itemDTOList\": [\n        {\n            \"id\": \"I00-003\",\n            \"name\": \"Maari\",\n            \"qty\": 20,\n            \"price\": 150\n        }\n    ],\n    \"total\": 3000,\n    \"discount\": 5,\n    \"subTotal\": 2850,\n    \"cash\": 5000,\n    \"balance\": 2150\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/orders","description":"<p>This endpoint creates a new order in the system. You need to provide the order details, including customer information and items, in the request body.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","orders"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"523715ef-32f4-4250-9ac1-3a0f08ed30fb","name":"Save Order","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"orderId\": \"OD0-002\",\n    \"date\": \"2024-10-17\",\n    \"custId\": \"C00-002\",\n    \"itemDTOList\": [\n        {\n            \"id\": \"I00-003\",\n            \"name\": \"Maari\",\n            \"qty\": 20,\n            \"price\": 150\n        }\n    ],\n    \"total\": 3000,\n    \"discount\": 5,\n    \"subTotal\": 2850,\n    \"cash\": 5000,\n    \"balance\": 2150\n}\n","options":{"raw":{"language":"json"}}},"url":"http://localhost:8080/POSFusion/api/v1/orders"},"status":"Created","code":201,"_postman_previewlanguage":"plain","header":[{"key":"Content-Length","value":"0"},{"key":"Date","value":"Thu, 17 Oct 2024 06:20:17 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"87266a1b-84a6-4d0c-872a-1e2dececc5ce"},{"name":"Get All Orders","id":"61c2e5b9-5bcb-4674-b29e-0799c8cabed7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/orders/allOrders","description":"<p>This endpoint retrieves a list of all orders in the system.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","orders","allOrders"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"825f4d29-662f-4e75-beb2-824ec8050cd0","name":"Get All Orders","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/orders/allOrders"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Date","value":"Thu, 17 Oct 2024 04:45:18 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"[\n    {\n        \"orderId\": \"OD0-001\",\n        \"date\": \"2024-10-17\",\n        \"custId\": null,\n        \"itemDTOList\": [],\n        \"total\": 2000,\n        \"discount\": \"5\",\n        \"subTotal\": 1900,\n        \"cash\": 5000,\n        \"balance\": 3000\n    }\n]"}],"_postman_id":"61c2e5b9-5bcb-4674-b29e-0799c8cabed7"}],"id":"1916fe8f-6b7e-4f01-8c99-aa728e400e2b","description":"<p>The Order folder contains endpoints for managing order information in the POSFusion POS Spring API. These endpoints allow you to create, retrieve, and list orders and their details. They are designed to keep order transactions accurate, including links to customers and items, ensuring smooth order management.</p>\n","_postman_id":"1916fe8f-6b7e-4f01-8c99-aa728e400e2b"},{"name":"Health Check","id":"49558970-918c-48e5-9fbe-c9eebef10c8d","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/healthtest","description":"<p>The Health Check endpoint checks if the POSFusion POS Spring API is working properly. When you send a GET request to this endpoint, it replies with a success message that shows the API is running and available. This endpoint is helpful for monitoring the application's status.</p>\n","urlObject":{"protocol":"http","port":"8080","path":["POSFusion","api","v1","healthtest"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"abaf4bf7-e5f1-40b9-b457-0f6796e24ac9","name":"Health Check","originalRequest":{"method":"GET","header":[],"url":"http://localhost:8080/POSFusion/api/v1/healthtest"},"status":"OK","code":200,"_postman_previewlanguage":"plain","header":[{"key":"Content-Type","value":"text/plain;charset=ISO-8859-1"},{"key":"Content-Length","value":"30"},{"key":"Date","value":"Wed, 16 Oct 2024 10:00:47 GMT"},{"key":"Keep-Alive","value":"timeout=20"},{"key":"Connection","value":"keep-alive"}],"cookie":[],"responseTime":null,"body":"POSFusion app run successfully"}],"_postman_id":"49558970-918c-48e5-9fbe-c9eebef10c8d"}]}