{ "info": { "name": "PetShop API Complete Collection", "_postman_id": "petshop-api-complete-v1", "description": "Complete API collection with all 95+ verified endpoints", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" }, "variable": [ { "key": "baseUrl", "value": "http://localhost:8080" }, { "key": "customerToken", "value": "" }, { "key": "staffToken", "value": "" }, { "key": "adminToken", "value": "" }, { "key": "petId", "value": "" }, { "key": "productId", "value": "" }, { "key": "saleId", "value": "" }, { "key": "customerSaleId", "value": "" }, { "key": "serviceId", "value": "1" }, { "key": "categoryId", "value": "1" }, { "key": "appointmentId", "value": "" }, { "key": "adoptionId", "value": "" }, { "key": "refundId", "value": "" }, { "key": "conversationId", "value": "" }, { "key": "customerId", "value": "1" }, { "key": "disposableCustomerId", "value": "" }, { "key": "userId", "value": "" }, { "key": "storeId", "value": "1" }, { "key": "inventoryId", "value": "1" }, { "key": "supplierId", "value": "1" }, { "key": "avatarFile", "value": "postman/avatar.png" }, { "key": "avatarUrl", "value": "" }, { "key": "bulkPetId", "value": "" }, { "key": "bulkServiceId", "value": "" }, { "key": "bulkCategoryId", "value": "" }, { "key": "bulkCustomerId", "value": "" }, { "key": "bulkUserId", "value": "" }, { "key": "bulkStoreId", "value": "" }, { "key": "bulkInventoryId", "value": "" } ], "item": [ { "name": "Health", "item": [ { "name": "Health Check", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/health", "header": [ { "key": "Content-Type", "value": "application/json" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] } ] }, { "name": "Authentication", "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 \"username\": \"newcustomer{{$timestamp}}\",\n \"password\": \"password123\",\n \"email\": \"new{{$timestamp}}@example.com\",\n \"phone\": \"+1-555-01{{$randomInt}}\",\n \"fullName\": \"New Customer\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.token) pm.collectionVariables.set('customerToken', jsonData.token);" ] } } ] }, { "name": "Login as Customer", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/auth/login", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"customer\",\n \"password\": \"customer123\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "if (jsonData.id !== undefined) pm.collectionVariables.set('userId', jsonData.id);", "if (jsonData.token) pm.collectionVariables.set('customerToken', jsonData.token);" ] } } ] }, { "name": "Login as Staff", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/auth/login", "header": [ { "key": "Content-Type", "value": "application/json" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"staff\",\n \"password\": \"staff123\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "if (jsonData.token) pm.collectionVariables.set('staffToken', jsonData.token);" ] } } ] }, { "name": "Login as Admin", "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\": \"admin123\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "if (jsonData.token) pm.collectionVariables.set('adminToken', jsonData.token);" ] } } ] }, { "name": "Get My Profile", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/auth/me", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "if (jsonData.id !== undefined) pm.collectionVariables.set('userId', jsonData.id);" ] } } ] }, { "name": "Update My Profile", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/auth/me", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"fullName\": \"Updated Name\",\n \"email\": \"updated@example.com\"\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Upload Avatar", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/auth/me/avatar", "header": [ { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ], "body": { "mode": "formdata", "formdata": [ { "key": "avatar", "type": "file", "src": "{{avatarFile}}" } ] } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.avatarUrl).to.be.a('string');", "pm.collectionVariables.set('avatarUrl', jsonData.avatarUrl);" ] } } ] }, { "name": "Get Avatar", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/auth/me/avatar", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.avatarUrl).to.be.a('string');", "pm.collectionVariables.set('avatarUrl', jsonData.avatarUrl);" ] } } ] }, { "name": "Get My Avatar File", "request": { "method": "GET", "url": "{{baseUrl}}{{avatarUrl}}", "header": [ { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "pm.test('Avatar response is an image', function () {", " pm.expect(pm.response.headers.get('Content-Type')).to.include('image/');", "});" ] } } ] }, { "name": "Get User Avatar File As Staff", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/users/{{userId}}/avatar/file", "header": [ { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "pm.test('Avatar response is an image', function () {", " pm.expect(pm.response.headers.get('Content-Type')).to.include('image/');", "});" ] } } ] }, { "name": "Delete Avatar", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/auth/me/avatar", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Logout", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/auth/logout", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] } ] }, { "name": "Pets", "item": [ { "name": "Get All Pets", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/pets", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Pet by ID", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/pets/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Pets Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/pets", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Pet", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/pets", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"petName\": \"Postman Pet\",\n \"petSpecies\": \"Dog\",\n \"petBreed\": \"Mixed\",\n \"petAge\": 2,\n \"petStatus\": \"Available\",\n \"petPrice\": 350.00\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.petId !== undefined) pm.collectionVariables.set('petId', jsonData.petId);" ] } } ] }, { "name": "Update Pet", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/pets/{{petId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"petName\": \"Postman Pet Updated\",\n \"petSpecies\": \"Dog\",\n \"petBreed\": \"Mixed\",\n \"petAge\": 3,\n \"petStatus\": \"Available\",\n \"petPrice\": 375.00\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Pet", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/pets/{{petId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Pet For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/pets", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"petName\": \"Postman Pet\",\n \"petSpecies\": \"Dog\",\n \"petBreed\": \"Mixed\",\n \"petAge\": 2,\n \"petStatus\": \"Available\",\n \"petPrice\": 350.00\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.petId !== undefined) pm.collectionVariables.set('bulkPetId', jsonData.petId);" ] } } ] }, { "name": "Bulk Delete Pets", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/pets", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkPetId}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Products", "item": [ { "name": "Get All Products", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/products", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Product by ID", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/products/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Products Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/products", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Product", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/products", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"prodName\": \"Postman Product\",\n \"categoryId\": {{categoryId}},\n \"prodDesc\": \"Created from Postman\",\n \"prodPrice\": 19.99\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.prodId !== undefined) pm.collectionVariables.set('productId', jsonData.prodId);" ] } } ] }, { "name": "Update Product", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/products/{{productId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"prodName\": \"Postman Product Updated\",\n \"categoryId\": {{categoryId}},\n \"prodDesc\": \"Updated from Postman\",\n \"prodPrice\": 24.99\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Product", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/products/{{productId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] }, { "name": "Bulk Delete Products", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/products", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n 1\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] } ] }, { "name": "Sales", "item": [ { "name": "Get All Sales", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/sales", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Sale by ID", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/sales/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Sale", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/sales", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"storeId\": 1,\n \"paymentMethod\": \"Card\",\n \"customerId\": 1,\n \"items\": [\n {\n \"prodId\": 1,\n \"quantity\": 2\n },\n {\n \"prodId\": 2,\n \"quantity\": 1\n }\n ],\n \"isRefund\": false\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.saleId !== undefined) {", " pm.collectionVariables.set('saleId', jsonData.saleId);", " pm.collectionVariables.set('customerSaleId', jsonData.saleId);", "}" ] } } ] } ] }, { "name": "Services", "item": [ { "name": "Get All Services", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/services", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Service by ID", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/services/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Services Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/services", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Service", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/services", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"serviceName\": \"Postman Service\",\n \"serviceDesc\": \"Created from Postman\",\n \"serviceDuration\": 30,\n \"servicePrice\": 25.00\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.serviceId !== undefined) pm.collectionVariables.set('serviceId', jsonData.serviceId);" ] } } ] }, { "name": "Update Service", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/services/{{serviceId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"serviceName\": \"Postman Service Updated\",\n \"serviceDesc\": \"Updated from Postman\",\n \"serviceDuration\": 30,\n \"servicePrice\": 30.00\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Service", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/services/{{serviceId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Service For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/services", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"serviceName\": \"Postman Service\",\n \"serviceDesc\": \"Created from Postman\",\n \"serviceDuration\": 30,\n \"servicePrice\": 25.00\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.serviceId !== undefined) pm.collectionVariables.set('bulkServiceId', jsonData.serviceId);" ] } } ] }, { "name": "Bulk Delete Services", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/services", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkServiceId}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Categories", "item": [ { "name": "Get All Categories", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/categories", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Category by ID", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/categories/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Categories Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/categories", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Category", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/categories", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"categoryName\": \"Postman Category\",\n \"categoryType\": \"Product\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.categoryId !== undefined) pm.collectionVariables.set('categoryId', jsonData.categoryId);" ] } } ] }, { "name": "Update Category", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/categories/{{categoryId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"categoryName\": \"Postman Category Updated\",\n \"categoryType\": \"Product\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Category", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/categories/{{categoryId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Category For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/categories", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"categoryName\": \"Postman Category\",\n \"categoryType\": \"Product\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.categoryId !== undefined) pm.collectionVariables.set('bulkCategoryId', jsonData.categoryId);" ] } } ] }, { "name": "Bulk Delete Categories", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/categories", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkCategoryId}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Appointments", "item": [ { "name": "Check Appointment Availability", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/appointments/availability?storeId=1&serviceId=1&date=2026-12-20", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "List Appointments", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/appointments", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Appointment", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/appointments/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Appointment", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/appointments", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"customerId\": 1,\n \"storeId\": 1,\n \"serviceId\": 1,\n \"appointmentDate\": \"2026-12-20\",\n \"appointmentTime\": \"10:00:00\",\n \"appointmentStatus\": \"Booked\",\n \"petIds\": [1]\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.appointmentId !== undefined) pm.collectionVariables.set('appointmentId', jsonData.appointmentId);" ] } } ] }, { "name": "Update Appointment", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/appointments/{{appointmentId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"customerId\": 1,\n \"storeId\": 1,\n \"serviceId\": 1,\n \"appointmentDate\": \"2026-12-20\",\n \"appointmentTime\": \"11:00:00\",\n \"appointmentStatus\": \"Booked\",\n \"petIds\": [1]\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Appointment", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/appointments/{{appointmentId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Bulk Delete Appointments", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/appointments", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n 1\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] } ] }, { "name": "Adoptions", "item": [ { "name": "List Adoptions", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/adoptions", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Adoption", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/adoptions/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Adoption", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/adoptions", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"petId\": 3,\n \"customerId\": 1,\n \"adoptionDate\": \"2026-12-21\",\n \"adoptionStatus\": \"Pending\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.adoptionId !== undefined) pm.collectionVariables.set('adoptionId', jsonData.adoptionId);" ] } } ] }, { "name": "Update Adoption", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/adoptions/{{adoptionId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"petId\": 3,\n \"customerId\": 1,\n \"adoptionDate\": \"2026-12-22\",\n \"adoptionStatus\": \"Completed\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Adoption", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/adoptions/{{adoptionId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Bulk Delete Adoptions", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/adoptions", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n 1\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] } ] }, { "name": "Refunds", "item": [ { "name": "Create Refund", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/refunds", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"saleId\": 1,\n \"reason\": \"Defective product\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.id !== undefined) pm.collectionVariables.set('refundId', jsonData.id);" ] } } ] }, { "name": "List Refunds", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/refunds", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Refund", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/refunds/{{refundId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Update Refund", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/refunds/{{refundId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"status\": \"APPROVED\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Refund", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/refunds/{{refundId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] } ] }, { "name": "Chat", "item": [ { "name": "Create Conversation", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/chat/conversations", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"message\": \"I need help\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.id).to.exist;", "pm.collectionVariables.set('conversationId', jsonData.id);" ] } } ] }, { "name": "Customer List Conversations", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/chat/conversations", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Staff List Conversations", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/chat/conversations", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Conversation", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/chat/conversations/{{conversationId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Customer Request Human", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/chat/conversations/{{conversationId}}/request-human", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.mode).to.eql('AUTOMATED');" ] } } ] }, { "name": "Customer Send Message", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/chat/conversations/{{conversationId}}/messages", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"content\": \"Customer follow-up from Postman\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});" ] } } ] }, { "name": "Staff Send Message", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/chat/conversations/{{conversationId}}/messages", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"content\": \"Reply from Postman\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.senderId).to.exist;", "pm.expect(jsonData.content).to.eql('Reply from Postman');" ] } } ] }, { "name": "Customer Get Messages", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/chat/conversations/{{conversationId}}/messages", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{customerToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.length).to.be.above(0);" ] } } ] }, { "name": "Staff Get Messages", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/chat/conversations/{{conversationId}}/messages", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.expect(jsonData.length).to.be.above(0);" ] } } ] } ] }, { "name": "Customers", "item": [ { "name": "Get Customers Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/customers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "List Customers", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/customers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Customer", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/customers/{{customerId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Customer", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/customers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"firstName\": \"Postman\",\n \"lastName\": \"Customer\",\n \"email\": \"postman.customer.{{$guid}}@example.com\",\n \"phone\": \"555-100-2000\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.customerId !== undefined) pm.collectionVariables.set('customerId', jsonData.customerId);" ] } } ] }, { "name": "Update Customer", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/customers/{{customerId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"firstName\": \"Postman\",\n \"lastName\": \"Customer Updated\",\n \"email\": \"postman.customer.updated.{{$timestamp}}@example.com\",\n \"phone\": \"555-100-2001\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Customer", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/customers/{{customerId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Customer For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/customers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"firstName\": \"Postman\",\n \"lastName\": \"Customer\",\n \"email\": \"postman.customer.{{$guid}}@example.com\",\n \"phone\": \"555-100-2000\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.customerId !== undefined) pm.collectionVariables.set('bulkCustomerId', jsonData.customerId);" ] } } ] }, { "name": "Bulk Delete Customers", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/customers/bulk-delete", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkCustomerId}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Users", "item": [ { "name": "List Users", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/users", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "List Staff Users", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/users?role=STAFF", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.test('All returned users are STAFF', function () {", " pm.expect(jsonData.content.every(function (user) { return user.role === 'STAFF'; })).to.be.true;", "});" ] } } ] }, { "name": "List Admin Users", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/users?role=ADMIN", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.test('All returned users are ADMIN', function () {", " pm.expect(jsonData.content.every(function (user) { return user.role === 'ADMIN'; })).to.be.true;", "});" ] } } ] }, { "name": "List Customer Users", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/users?role=CUSTOMER", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});", "var jsonData = pm.response.json();", "pm.test('All returned users are CUSTOMER', function () {", " pm.expect(jsonData.content.every(function (user) { return user.role === 'CUSTOMER'; })).to.be.true;", "});" ] } } ] }, { "name": "Get User", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/users/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create User", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/users", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"postman_user_{{$guid}}\",\n \"password\": \"secret123\",\n \"fullName\": \"Postman User\",\n \"email\": \"postman.user.{{$guid}}@example.com\",\n \"role\": \"STAFF\",\n \"active\": true\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.id !== undefined) pm.collectionVariables.set('userId', jsonData.id);" ] } } ] }, { "name": "Update User", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/users/{{userId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"postman_user_{{$timestamp}}\",\n \"password\": \"secret123\",\n \"fullName\": \"Postman User Updated\",\n \"email\": \"postman.user.updated.{{$timestamp}}@example.com\",\n \"role\": \"STAFF\",\n \"active\": true\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete User", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/users/{{userId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create User For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/users", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"username\": \"postman_user_{{$guid}}\",\n \"password\": \"secret123\",\n \"fullName\": \"Postman User\",\n \"email\": \"postman.user.{{$guid}}@example.com\",\n \"role\": \"STAFF\",\n \"active\": true\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.id !== undefined) pm.collectionVariables.set('bulkUserId', jsonData.id);" ] } } ] }, { "name": "Bulk Delete Users", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/users", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkUserId}}\n ]\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Stores", "item": [ { "name": "Get Stores Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/stores", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "List Stores", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/stores", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Store", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/stores/{{storeId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Store", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/stores", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"storeName\": \"Postman Store {{$timestamp}}\",\n \"address\": \"100 Postman Ave\",\n \"phone\": \"555-200-3000\",\n \"email\": \"postman.store.{{$guid}}@example.com\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.storeId !== undefined) pm.collectionVariables.set('storeId', jsonData.storeId);" ] } } ] }, { "name": "Update Store", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/stores/{{storeId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"storeName\": \"Postman Store Updated\",\n \"address\": \"101 Postman Ave\",\n \"phone\": \"555-200-3001\",\n \"email\": \"postman.store.updated@example.com\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Store", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/stores/{{storeId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Store For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/stores", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"storeName\": \"Postman Store {{$timestamp}}\",\n \"address\": \"100 Postman Ave\",\n \"phone\": \"555-200-3000\",\n \"email\": \"postman.store.{{$guid}}@example.com\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.storeId !== undefined) pm.collectionVariables.set('bulkStoreId', jsonData.storeId);" ] } } ] }, { "name": "Bulk Delete Stores", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/stores", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkStoreId}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Inventory", "item": [ { "name": "List Inventory", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/inventory", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Inventory Item", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/inventory/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Inventory", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/inventory", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"prodId\": {{productId}},\n \"quantity\": 10\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.inventoryId !== undefined) pm.collectionVariables.set('inventoryId', jsonData.inventoryId);" ] } } ] }, { "name": "Update Inventory", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/inventory/{{inventoryId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"prodId\": {{productId}},\n \"quantity\": 12\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Inventory", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/inventory/{{inventoryId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Inventory For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/inventory", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"prodId\": {{productId}},\n \"quantity\": 10\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.inventoryId !== undefined) pm.collectionVariables.set('bulkInventoryId', jsonData.inventoryId);" ] } } ] }, { "name": "Bulk Delete Inventory", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/inventory", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n {{bulkInventoryId}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Suppliers", "item": [ { "name": "List Suppliers", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Supplier", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/suppliers/{{supplierId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Supplier", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"supCompany\": \"Postman Supplier {{$timestamp}}\",\n \"supContactFirstName\": \"Post\",\n \"supContactLastName\": \"Man\",\n \"supEmail\": \"postman.supplier.{{$guid}}@example.com\",\n \"supPhone\": \"555-300-4000\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});", "var jsonData = pm.response.json();", "if (jsonData.supId !== undefined) pm.collectionVariables.set('supplierId', jsonData.supId);" ] } } ] }, { "name": "Update Supplier", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/suppliers/{{supplierId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"supCompany\": \"Postman Supplier Updated {{$timestamp}}\",\n \"supContactFirstName\": \"Post\",\n \"supContactLastName\": \"Man\",\n \"supEmail\": \"postman.supplier.updated.{{$timestamp}}@example.com\",\n \"supPhone\": \"555-300-4001\"\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Supplier", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/suppliers/{{supplierId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] }, { "name": "Bulk Delete Suppliers", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{staffToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"ids\": [\n 1\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 403', function () {", " pm.response.to.have.status(403);", "});" ] } } ] }, { "name": "Get Suppliers Dropdown", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/dropdowns/suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] } ] }, { "name": "Purchase Orders", "item": [ { "name": "List Purchase Orders", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/purchase-orders", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Purchase Order", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/purchase-orders/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] } ] }, { "name": "Product-Suppliers", "item": [ { "name": "List Product Suppliers", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/product-suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Get Product Supplier", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/product-suppliers/1/1", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Create Product Supplier", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/product-suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"productId\": {{productId}},\n \"supplierId\": {{supplierId}},\n \"cost\": 7.50\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});" ] } } ] }, { "name": "Update Product Supplier", "request": { "method": "PUT", "url": "{{baseUrl}}/api/v1/product-suppliers/{{productId}}/{{supplierId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"productId\": {{productId}},\n \"supplierId\": {{supplierId}},\n \"cost\": 7.75\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] }, { "name": "Delete Product Supplier", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/product-suppliers/{{productId}}/{{supplierId}}", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] }, { "name": "Create Product Supplier For Bulk Delete", "request": { "method": "POST", "url": "{{baseUrl}}/api/v1/product-suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"productId\": {{productId}},\n \"supplierId\": {{supplierId}},\n \"cost\": 7.50\n}", "options": { "raw": { "language": "json" } } } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 201', function () {", " pm.response.to.have.status(201);", "});" ] } } ] }, { "name": "Bulk Delete Product Suppliers", "request": { "method": "DELETE", "url": "{{baseUrl}}/api/v1/product-suppliers", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ], "body": { "mode": "raw", "raw": "{\n \"keys\": [\n {\"productId\": {{productId}}, \"supplierId\": {{supplierId}}}\n ]\n}" } }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 204', function () {", " pm.response.to.have.status(204);", "});" ] } } ] } ] }, { "name": "Analytics", "item": [ { "name": "Analytics Dashboard", "request": { "method": "GET", "url": "{{baseUrl}}/api/v1/analytics/dashboard", "header": [ { "key": "Content-Type", "value": "application/json" }, { "key": "Authorization", "value": "Bearer {{adminToken}}", "type": "text" } ] }, "event": [ { "listen": "test", "script": { "type": "text/javascript", "exec": [ "pm.test('Status code is 200', function () {", " pm.response.to.have.status(200);", "});" ] } } ] } ] } ] }