From bdfc592821f306018466ebd220a0120bee331009 Mon Sep 17 00:00:00 2001 From: Harkamal Randhawa Date: Thu, 5 Mar 2026 08:13:37 -0700 Subject: [PATCH] Add Postman collection and update JDK to 25 --- petshop-api.postman_collection.json | 2549 +++++++++++++++++++++++++++ 1 file changed, 2549 insertions(+) create mode 100644 petshop-api.postman_collection.json diff --git a/petshop-api.postman_collection.json b/petshop-api.postman_collection.json new file mode 100644 index 00000000..a2537681 --- /dev/null +++ b/petshop-api.postman_collection.json @@ -0,0 +1,2549 @@ +{ + "info": { + "name": "PetShop Unified API v1 (RBAC + Dropdowns + Chat)", + "_postman_id": "4d2d4e10-4338-4b85-a8ef-aa9db2ed75be", + "description": "Unified /api/v1 endpoints for Desktop, Android, and Website.\n\nVariables:\n- baseUrl (example http://localhost:8080)\n- staffToken (set by staff/admin login)\n- customerToken (set by customer login)\n\nNotes:\n- Login test scripts assume response contains {\"token\":\"...\"}.\n- Bulk delete uses DELETE with JSON body {ids:[...]}.", + "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" + }, + "variable": [ + { + "key": "baseUrl", + "value": "http://localhost:8080" + }, + { + "key": "staffToken", + "value": "" + }, + { + "key": "customerToken", + "value": "" + }, + { + "key": "petId", + "value": "1" + }, + { + "key": "adoptionId", + "value": "1" + }, + { + "key": "appointmentId", + "value": "1" + }, + { + "key": "serviceId", + "value": "1" + }, + { + "key": "prodId", + "value": "1" + }, + { + "key": "categoryId", + "value": "1" + }, + { + "key": "supId", + "value": "1" + }, + { + "key": "inventoryId", + "value": "1" + }, + { + "key": "saleId", + "value": "1" + }, + { + "key": "purchaseOrderId", + "value": "1" + }, + { + "key": "userId", + "value": "1" + }, + { + "key": "employeeId", + "value": "1" + }, + { + "key": "roomId", + "value": "1" + }, + { + "key": "storeId", + "value": "1" + } + ], + "item": [ + { + "name": "Auth", + "item": [ + { + "name": "Register Customer", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/auth/register", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"Chris\",\n \"lastName\": \"Ng\",\n \"email\": \"chris.ng@example.com\",\n \"phone\": \"555-0120\",\n \"password\": \"ChangeMe123\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Login (Staff/Admin) -> sets staffToken", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/auth/login", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "body": { + "mode": "raw", + "raw": "{\n \"username\": \"admin\",\n \"password\": \"admin\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "try {", + " const json = pm.response.json();", + " if (json && json.token) pm.collectionVariables.set('staffToken', json.token);", + "} catch (e) {}" + ] + } + } + ] + }, + { + "name": "Login (Customer) -> sets customerToken", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/auth/login", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "If login uses username instead of email, adjust request body.", + "body": { + "mode": "raw", + "raw": "{\n \"email\": \"chris.ng@example.com\",\n \"password\": \"ChangeMe123\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + }, + "event": [ + { + "listen": "test", + "script": { + "type": "text/javascript", + "exec": [ + "try {", + " const json = pm.response.json();", + " if (json && json.token) pm.collectionVariables.set('customerToken', json.token);", + "} catch (e) {}" + ] + } + } + ] + }, + { + "name": "Logout (Staff/Admin)", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/auth/logout", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Logout (Customer)", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/auth/logout", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Auth Me (Staff/Admin)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/auth/me", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Auth Me (Customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/auth/me", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + } + ] + }, + { + "name": "My Account (/me)", + "item": [ + { + "name": "Get My Profile (Staff/Admin)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/me", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update My Profile (Staff/Admin)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/me", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"phone\": \"555-0999\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get My Profile (Customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/me", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update My Profile (Customer)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/me", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"phone\": \"555-0999\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Upload My Avatar (Staff/Admin) [multipart]", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/me/avatar", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "" + } + ] + }, + "description": "Uploads avatar image for the logged-in staff/admin. Public access via GET /api/v1/staff/{employeeId}/avatar." + } + }, + { + "name": "Upload My Avatar (Customer) [multipart]", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/me/avatar", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + }, + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "" + } + ] + }, + "description": "Optional if customer avatars are supported." + } + } + ] + }, + { + "name": "Dropdowns (lightweight id+name)", + "item": [ + { + "name": "Dropdown - Pets (staff)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/pets", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Customers (staff)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/customers", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Services (staff)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/services", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Products (staff)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/products", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Suppliers (admin)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/suppliers", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Categories (staff)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/categories", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Stores (staff)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/stores", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Services (customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/services", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Dropdown - Stores (customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/dropdowns/stores", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + } + ] + }, + { + "name": "Resources (Staff)", + "item": [ + { + "name": "Pets", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/pets?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/pets", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"petName\": \"Buddy\",\n \"petSpecies\": \"Dog\",\n \"petBreed\": \"Labrador\",\n \"petAge\": 3,\n \"petStatus\": \"Available\",\n \"petPrice\": 499.99\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/pets/{{petId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/pets/{{petId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"petName\": \"Buddy\",\n \"petSpecies\": \"Dog\",\n \"petBreed\": \"Labrador\",\n \"petAge\": 4,\n \"petStatus\": \"Available\",\n \"petPrice\": 450.0\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/pets/{{petId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/pets", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Adoptions", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/adoptions?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/adoptions", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"petId\": \"{{petId}}\",\n \"customerId\": 1,\n \"adoptionDate\": \"2026-03-04\",\n \"adoptionStatus\": \"Pending\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/adoptions/{{adoptionId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/adoptions/{{adoptionId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"petId\": \"{{petId}}\",\n \"customerId\": 1,\n \"adoptionDate\": \"2026-03-04\",\n \"adoptionStatus\": \"Approved\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/adoptions/{{adoptionId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/adoptions", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Appointments", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/appointments?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/appointments", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"serviceId\": \"{{serviceId}}\",\n \"customerId\": 1,\n \"appointmentDate\": \"2026-03-04\",\n \"appointmentTime\": \"14:30:00\",\n \"appointmentStatus\": \"Booked\",\n \"petIds\": [\n \"{{petId}}\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/appointments/{{appointmentId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/appointments/{{appointmentId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"serviceId\": \"{{serviceId}}\",\n \"customerId\": 1,\n \"appointmentDate\": \"2026-03-05\",\n \"appointmentTime\": \"15:00:00\",\n \"appointmentStatus\": \"Booked\",\n \"petIds\": [\n \"{{petId}}\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/appointments/{{appointmentId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/appointments", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Appointments - Availability", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/appointments/availability?storeId={{storeId}}&serviceId={{serviceId}}&date=2026-03-04", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Services", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/services?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/services", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"serviceName\": \"Grooming\",\n \"serviceDesc\": \"Full grooming package\",\n \"serviceDuration\": 60,\n \"servicePrice\": 49.99\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/services/{{serviceId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/services/{{serviceId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"serviceName\": \"Grooming\",\n \"serviceDesc\": \"Updated description\",\n \"serviceDuration\": 60,\n \"servicePrice\": 54.99\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/services/{{serviceId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/services", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Products", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/products?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/products", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"prodName\": \"Dog Food\",\n \"prodPrice\": 19.99,\n \"prodDesc\": \"Large bag\",\n \"categoryId\": \"{{categoryId}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/products/{{prodId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/products/{{prodId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"prodName\": \"Dog Food\",\n \"prodPrice\": 21.99,\n \"prodDesc\": \"Large bag\",\n \"categoryId\": \"{{categoryId}}\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/products/{{prodId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/products", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Categories", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/categories?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/categories", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"categoryName\": \"Food\",\n \"categoryType\": \"PRODUCT\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/categories/{{categoryId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/categories/{{categoryId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"categoryName\": \"Food & Treats\",\n \"categoryType\": \"PRODUCT\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/categories/{{categoryId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/categories", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + } + ] + }, + { + "name": "Admin-only Resources", + "item": [ + { + "name": "Inventory", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/inventory?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/inventory", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"prodId\": \"{{prodId}}\",\n \"quantity\": 25\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/inventory/{{inventoryId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/inventory/{{inventoryId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"prodId\": \"{{prodId}}\",\n \"quantity\": 30\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/inventory/{{inventoryId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/inventory", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Suppliers", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/suppliers?q=&page=0&size=50&sort=id,desc", + "header": [], + "description": "Returns UI-ready rows (joined fields included).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/suppliers", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"supName\": \"Acme Supplies\",\n \"supPhone\": \"555-0100\",\n \"supEmail\": \"sales@acme.example\",\n \"supAddress\": \"123 Main St\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/suppliers/{{supId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/suppliers/{{supId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"supName\": \"Acme Supplies\",\n \"supPhone\": \"555-0100\",\n \"supEmail\": \"support@acme.example\",\n \"supAddress\": \"123 Main St\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/suppliers/{{supId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete (DELETE body)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/suppliers", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Bulk delete with JSON body.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Product Suppliers (Costing)", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/product-suppliers?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/product-suppliers", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"prodId\": \"{{prodId}}\",\n \"supId\": \"{{supId}}\",\n \"cost\": 12.34\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Update (composite)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/product-suppliers", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Update by composite key (prodId, supId).", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"prodId\": \"{{prodId}}\",\n \"supId\": \"{{supId}}\",\n \"cost\": 13.0\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Bulk Delete (keys)", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/product-suppliers", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"keys\": [\n {\n \"prodId\": 1,\n \"supId\": 2\n },\n {\n \"prodId\": 3,\n \"supId\": 4\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Purchase Orders (read)", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/purchase-orders?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Get One", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/purchase-orders/{{purchaseOrderId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + } + ] + }, + { + "name": "Users (Staff Accounts)", + "item": [ + { + "name": "List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/users?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Create", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/users", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "description": "Admin-only.", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"firstName\": \"Sam\",\n \"lastName\": \"Lee\",\n \"email\": \"sam.lee@example.com\",\n \"phone\": \"555-0110\",\n \"username\": \"samlee\",\n \"password\": \"ChangeMe123\",\n \"role\": \"STAFF\",\n \"storeIds\": [\n \"{{storeId}}\"\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Update (PUT)", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/users/{{userId}}", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"phone\": \"555-0111\",\n \"role\": \"STAFF\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Delete One", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/users/{{userId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Bulk Delete", + "request": { + "method": "DELETE", + "url": "{{baseUrl}}/api/v1/users", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"ids\": [\n 1,\n 2,\n 3\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Upload Avatar for User (Admin) [multipart]", + "request": { + "method": "PUT", + "url": "{{baseUrl}}/api/v1/users/{{userId}}/avatar", + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "header": [], + "body": { + "mode": "formdata", + "formdata": [ + { + "key": "file", + "type": "file", + "src": "" + } + ] + }, + "description": "Admin-only." + } + } + ] + } + ] + }, + { + "name": "Sales + Refunds (Staff)", + "item": [ + { + "name": "Sales - List/Search", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/sales?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Sales - Create (Checkout)", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/sales", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"paymentMethod\": \"Cash\",\n \"storeId\": \"{{storeId}}\",\n \"items\": [\n {\n \"prodId\": \"{{prodId}}\",\n \"quantity\": 2\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Sales - Get Detail", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/sales/{{saleId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Sales - Refund", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/sales/{{saleId}}/refunds", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"paymentMethod\": \"Card\",\n \"storeId\": \"{{storeId}}\",\n \"items\": [\n {\n \"prodId\": \"{{prodId}}\",\n \"quantity\": 1\n }\n ]\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + } + ] + }, + { + "name": "Analytics (Admin)", + "item": [ + { + "name": "Dashboard", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/analytics/dashboard?days=30&top=10", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + } + ] + }, + { + "name": "Chat (REST) + WebSocket (/ws)", + "item": [ + { + "name": "Chat - Create Room (Customer)", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/chat/rooms", + "header": [ + { + "key": "Content-Type", + "value": "application/json" + } + ], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + }, + "body": { + "mode": "raw", + "raw": "{\n \"topic\": \"Support\"\n}", + "options": { + "raw": { + "language": "json" + } + } + } + } + }, + { + "name": "Chat - List Rooms (Customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/chat/rooms", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Chat - List Rooms (Staff/Admin)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/chat/rooms", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Chat - Room Messages (Customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/chat/rooms/{{roomId}}/messages?limit=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Chat - Room Messages (Staff/Admin)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/chat/rooms/{{roomId}}/messages?limit=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Chat - Close Room (Staff/Admin)", + "request": { + "method": "POST", + "url": "{{baseUrl}}/api/v1/chat/rooms/{{roomId}}/close", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{staffToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "WebSocket Notes", + "request": { + "method": "GET", + "url": "{{baseUrl}}/ws", + "header": [], + "description": "WebSocket endpoint for live chat." + } + } + ] + }, + { + "name": "Public Assets", + "item": [ + { + "name": "Get Staff Avatar (public)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/staff/{{employeeId}}/avatar", + "header": [], + "description": "Public endpoint. Accessible without auth." + } + } + ] + }, + { + "name": "Customer Browse (optional)", + "item": [ + { + "name": "Pets - List (customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/pets?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Pets - Detail (customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/pets/{{petId}}", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Services - List (customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/services?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + }, + { + "name": "Stores - List (customer)", + "request": { + "method": "GET", + "url": "{{baseUrl}}/api/v1/stores?q=&page=0&size=50", + "header": [], + "auth": { + "type": "bearer", + "bearer": [ + { + "key": "token", + "value": "{{customerToken}}", + "type": "string" + } + ] + } + } + } + ] + } + ] +} \ No newline at end of file