{ "info": { "_postman_id": "79957f77-cc45-4900-9486-639883365db0", "name": "Works Automation", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "31932888" }, "item": [ { "name": "Project Service Test Script", "item": [ { "name": "Login User", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>", " pm.expect(pm.response.to.have.status(200))", ");", "", "pm.test(\"print and save access token in environment\", function () {", " var res = pm.response.json();", " var authToken = res.access_token;", " console.log('authToken:', authToken);", " pm.environment.set('auth',authToken);", "}", ");", "", "// Capture the entire response body", "var responseData = pm.response.json();", "var userRequestBody =responseData.UserRequest;", "", "// Store the response body in an environment variable", "pm.environment.set(\"userinfo\", JSON.stringify(userRequestBody));", "var empUserId = responseData.UserRequest.uuid;", "pm.environment.set(\"empUserId\",empUserId);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [ { "key": "authority", "value": "unified-dev.digit.org", "uuid": "4279926d-cde9-41a8-8584-a290e9cd567c" }, { "key": "accept", "value": "application/json, text/plain, */*", "uuid": "cd2d0c7d-4959-4389-a8a5-d4377aada435" }, { "key": "accept-language", "value": "en-GB,en-US;q=0.9,en;q=0.8", "uuid": "91211297-c57a-48c2-85f0-3fb1f2b292be" }, { "key": "authorization", "value": "Basic ZWdvdi11c2VyLWNsaWVudDo=", "uuid": "b7d5838d-b864-46fe-b541-c01da6af9b33" }, { "key": "content-type", "value": "application/x-www-form-urlencoded", "uuid": "91b345af-d457-4620-bc72-7a1a7bacd026" }, { "key": "cookie", "value": "_ga_6130JJKLD4=GS1.1.1689144121.1.1.1689144147.34.0.0; _ga_2E44ZSYXS7=GS1.1.1693551022.10.0.1693551537.0.0.0; _ga=GA1.1.1506416593.1687179320; _ga_P1TZCPKF6S=GS1.1.1695629661.2.0.1695629664.57.0.0; _ga_H9YC8FEN6F=GS1.1.1696831541.125.1.1696831564.37.0.0; io=f_4QRb-VaOOVAUJ0AAAB; locale=en_IN; PGADMIN_LANGUAGE=en; __cuid=44ff2be0a12e4499973904b80d92ef3d; amp_fef1e8=21a46ed7-716d-4b59-aa13-c513dd00a213R...1hflua14j.1hflua14o.kq.46.p0; _ga_XBQP06FR8V=GS1.1.1700469736.4.0.1700469739.57.0.0; _oauth2_proxy=eyJFbWFpbCI6ImFuc2guZ295YWxAZWdvdmVybm1lbnRzLm9yZyIsIlVzZXIiOiJhbnNoLWVnb3YifQ==|1700724084|8Aayfxx0DRsJ4Lgw6jJiVnYjs_k=", "uuid": "f84f78b9-2aad-45f4-95c3-f242ad8bc6da" }, { "key": "origin", "value": "https://unified-dev.digit.org", "uuid": "9ec16b03-5f7c-48a3-acf9-f095e9c5814e" }, { "key": "referer", "value": "https://unified-dev.digit.org/works-ui/employee/user/login?from=%2Fworks-ui%2Femployee", "uuid": "563185ec-d0b3-4686-9ebc-77db199f9640" }, { "key": "sec-ch-ua", "value": "\"Chromium\";v=\"118\", \"Google Chrome\";v=\"118\", \"Not=A?Brand\";v=\"99\"", "uuid": "6bc7d2c0-8995-4f2c-9699-7cb00e73c028" }, { "key": "sec-ch-ua-mobile", "value": "?0", "uuid": "55503535-c6cb-4944-b144-fe3a5914f89a" }, { "key": "sec-ch-ua-platform", "value": "\"Linux\"", "uuid": "f3738ec0-ff86-4071-a098-dfdac521d60f" }, { "key": "sec-fetch-dest", "value": "empty", "uuid": "d32bbaab-f382-46bb-bfa8-0f4504e304de" }, { "key": "sec-fetch-mode", "value": "cors", "uuid": "11171f5c-bb23-40e2-9989-5485f0895a32" }, { "key": "sec-fetch-site", "value": "same-origin", "uuid": "ccf1a04b-7d3d-402b-bba1-73e601a27838" }, { "key": "user-agent", "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36", "uuid": "5a5f29c4-7441-46e1-b644-d3707f7f4ca5" } ], "body": { "mode": "urlencoded", "urlencoded": [ { "key": "username", "value": "{{username}}", "type": "text" }, { "key": "password", "value": "{{password}}", "type": "text" }, { "key": "userType", "value": "EMPLOYEE", "type": "text" }, { "key": "tenantId", "value": "{{tenantId}}", "type": "text" }, { "key": "scope", "value": "read", "type": "text" }, { "key": "grant_type", "value": "password", "type": "text" }, { "key": "permanentCity\n", "value": "Testing", "type": "text" } ] }, "url": { "raw": "{{base_url}}/user/oauth/token?_=1700804704480", "host": [ "{{base_url}}" ], "path": [ "user", "oauth", "token" ], "query": [ { "key": "_", "value": "1700804704480" } ] } }, "response": [] }, { "name": "Create Project - Success - Single Project", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"RequestInfo is required\", function () {", " var req = JSON.parse(pm.request.body.raw);", " pm.expect(req.RequestInfo).to.not.be.null;", " pm.expect(req.RequestInfo).to.not.be.undefined;", "}", ");", "", "pm.test(\"Projects are required\", function () {", " var req = JSON.parse(pm.request.body.raw);", " pm.expect(req.Projects).to.not.be.undefined;", " pm.expect(req.Projects).to.not.be.null;", "}", ");", "", "pm.test(\"TenantId is required\", function () {", " var req = JSON.parse(pm.request.body.raw);", " var project = req.Projects[0];", " pm.expect(project.tenantId).to.be.not.null;", " pm.expect(project.tenantId).to.be.not.undefined;", " pm.expect(project.tenantId).to.not.equal(\"\");", "}", ");", "", "pm.test(\"Response is successful\", () =>", " pm.expect(pm.response.to.have.status(200))", ");", "", "pm.test(\"print and save projectId in environment\", function () {", " var res = pm.response.json();", " var projectId = res.Project[0].id;", " console.log('projectId:', projectId);", " pm.environment.set('PJId-est', projectId);", "}", ");", "pm.test(\"print and save projectNumber in environment\", function () {", " var res = pm.response.json();", " var projectNo = res.Project[0].projectNumber;", " console.log('projectNumber:', projectNo);", " pm.environment.set('PJNo-est', projectNo);", "}", ");", "pm.test(\"print and save PJ-addressid in environment\", function () {", " var res = pm.response.json();", " var addressid = res.Project[0].address.id;", " console.log('id:', addressid);", " pm.environment.set('PJ-addressid',addressid);", "}", ");", "", "pm.test(\"print and save ProjectType in environment\", function () {", " var res = pm.response.json();", " var PJType = res.Project[0].projectType;", " console.log('projectType:', PJType);", " pm.environment.set('projectType',PJType);", "}", ");", "", "pm.test(\"Project Number is enriched\", function () {", " var res = pm.response.json();", " var projectNumber = res.Project[0].projectNumber;", " pm.expect(projectNumber.substring(0, 2)).to.eql(\"PJ\");", "}", ");", "", "let responseData = pm.response.json();", "", "//Storing the response data into collection variable to reuse", "", "pm.collectionVariables.set(\"projectId\", responseData.Project[0].id);", "", "pm.collectionVariables.set(\"projectNumber\", responseData.Project[0].projectNumber);", "", "pm.collectionVariables.set(\"projectType\", responseData.Project[0].projectType);", "", "pm.collectionVariables.set(\"referenceID\", responseData.Project[0].referenceID);", "", "pm.collectionVariables.set(\"createdTime\", (responseData.Project[0].auditDetails.createdTime));", "", "pm.collectionVariables.set(\"lastModifiedTime\", (responseData.Project[0].auditDetails.lastModifiedTime));", "", "// pm.collectionVariables.set(\"lastChangedSinceIncreased\", (responseData.Project[0].auditDetails.createdTime + 10000000));", "", "pm.collectionVariables.set(\"addressId\", responseData.Project[0].address.id);", "", "if (responseData.Project[0].targets !== null)", "{pm.collectionVariables.set(\"targetId\", responseData.Project[0].targets[0].id);}", "", "pm.collectionVariables.set(\"documents\", responseData.Project[0].documents[0].id);", "pm.collectionVariables.set(\"fileStoreId\", responseData.Project[0].documents[0].fileStoreId);", "", "pm.collectionVariables.set(\"boundaryType\", (responseData.Project[0].address.boundaryType));", "", "pm.collectionVariables.set(\"boundary\",(responseData.Project[0].address.boundary));", "" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "// Generate the current timestamp in milliseconds", "const currentTimestamp = Date.now();", "", "// Store the timestamp in an environment variable (you can also use a global variable)", "pm.environment.set('dateOfProposal', currentTimestamp);", "", "// Print the timestamp to the console (optional)", "console.log('Current Timestamp:', currentTimestamp);", "", "// Function to generate a random name with 8 alphabets", "function generateRandomName() {", " var alphabet = 'abcdefghijklmnopqrstuvwxyz'; // All alphabets", " var name = '';", "", " for (var i = 0; i < 8; i++) {", " var randomIndex = Math.floor(Math.random() * alphabet.length); // Generate random index", " name += alphabet[randomIndex]; // Append random alphabet to the name", " }", "", " return name;", "}", "", "// Generate a random name", "var randomName = generateRandomName();", "", "console.log(\"Random Name:\", randomName);", "pm.variables.set(\"projectName\", randomName)", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"tenantId\": \"{{tenantId}}\",\n \"name\": \"{{projectName}}\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"2611\",\n \"documents\": [\n {\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"{{tenantId}}\"\n },\n {\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_finalized_worklist\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"{{tenantId}}\"\n },\n {\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_feasibility_analysis\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"{{tenantId}}\"\n }\n ],\n \"address\": {\n \"tenantId\": \"{{tenantId}}\",\n \"latitude\": null,\n \"longitude\": null,\n \"city\": \"pg.citya\",\n \"boundary\": \"B1\",\n \"boundaryType\": \"Ward\"\n },\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"50000\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"Create Projects\",\n \"plainAccessRequest\": {}\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_create", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_create" ] } }, "response": [ { "name": "Create Project - Success - Single Project", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"tenantId\": \"pg.citya\",\n \"name\": \"Test Automation\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"125\",\n \"documents\": [\n {\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_finalized_worklist\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_feasibility_analysis\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"address\": {\n \"tenantId\": \"pg.citya\",\n \"latitude\": null,\n \"longitude\": null,\n \"city\": \"pg.citya\",\n \"boundary\": \"B1\",\n \"boundaryType\": \"Ward\"\n },\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": 1693938599000,\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"userInfo\": {\n \"id\": 444,\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"userName\": \"SMS QA testing\",\n \"name\": \"SMS QA testing\",\n \"mobileNumber\": \"9043685314\",\n \"emailId\": \"\",\n \"locale\": null,\n \"type\": \"EMPLOYEE\",\n \"roles\": [\n {\n \"name\": \"HRMS Admin\",\n \"code\": \"HRMS_ADMIN\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"WORK_ORDER_VIEWER\",\n \"code\": \"WORK_ORDER_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"BILL_ACCOUNTANT\",\n \"code\": \"BILL_ACCOUNTANT\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"WORK ORDER CREATOR\",\n \"code\": \"WORK_ORDER_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"ESTIMATE VERIFIER\",\n \"code\": \"ESTIMATE_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"BILL_VERIFIER\",\n \"code\": \"BILL_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"ESTIMATE APPROVER\",\n \"code\": \"ESTIMATE_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"Organization viewer\",\n \"code\": \"ORG_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"WORK ORDER VERIFIER\",\n \"code\": \"WORK_ORDER_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"PROJECT VIEWER\",\n \"code\": \"PROJECT_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"BILL_APPROVER\",\n \"code\": \"BILL_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"MUSTER ROLL VERIFIER\",\n \"code\": \"MUSTER_ROLL_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"OFFICER IN CHARGE\",\n \"code\": \"OFFICER_IN_CHARGE\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"PROJECT CREATOR\",\n \"code\": \"PROJECT_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"Employee Common\",\n \"code\": \"EMPLOYEE_COMMON\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"BILL_VIEWER\",\n \"code\": \"BILL_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"TECHNICAL SANCTIONER\",\n \"code\": \"TECHNICAL_SANCTIONER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"BILL_CREATOR\",\n \"code\": \"BILL_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"MUSTER ROLL APPROVER\",\n \"code\": \"MUSTER_ROLL_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"ESTIMATE VIEWER\",\n \"code\": \"ESTIMATE_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"WORK ORDER APPROVER\",\n \"code\": \"WORK_ORDER_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"ESTIMATE CREATOR\",\n \"code\": \"ESTIMATE_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"State Dashboard Admin\",\n \"code\": \"STADMIN\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"name\": \"MUKTA Admin\",\n \"code\": \"MUKTA_ADMIN\",\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"active\": true,\n \"tenantId\": \"pg.citya\",\n \"permanentCity\": null\n },\n \"msgId\": \"Create Projects\",\n \"plainAccessRequest\": {}\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_create", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_create" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Date", "value": "Wed, 06 Sep 2023 09:24:10 GMT" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Strict-Transport-Security", "value": "max-age=63072000; includeSubdomains; preload" }, { "key": "X-Lua-Resty-WAF-ID", "value": "20e953f91c65b25a66c2" }, { "key": "x-correlation-id", "value": "7a224f62-6db1-4de9-949b-6d734d193a77" }, { "key": "Cache-Control", "value": "no-cache, no-store, max-age=0, must-revalidate" }, { "key": "Content-Security-Policy", "value": "default-src 'self' https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'; img-src 'self' https: data: blob:; style-src https: blob: 'unsafe-inline'; worker-src 'self' blob:; font-src 'self' https: data: blob:; child-src 'self' https: data: blob:;" }, { "key": "Referrer-Policy", "value": "no-referrer-when-downgrade" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Download-Options", "value": "noopen" }, { "key": "X-Frame-Options", "value": "sameorigin" }, { "key": "X-XSS-Protection", "value": "1" }, { "key": "Content-Encoding", "value": "gzip" } ], "cookie": [], "body": "{\n \"ResponseInfo\": {\n \"apiId\": \"Rainmaker\",\n \"ver\": null,\n \"ts\": 1693992250529,\n \"resMsgId\": \"Create Projects\",\n \"msgId\": \"Create Projects\",\n \"status\": \"successful\"\n },\n \"Project\": [\n {\n \"id\": \"abed3099-d594-4626-ae3c-fec03f844cc0\",\n \"tenantId\": \"pg.citya\",\n \"projectNumber\": \"PJ/2023-24/09/000739\",\n \"name\": \"Test Automation\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"125\",\n \"projectTypeId\": null,\n \"documents\": [\n {\n \"id\": \"0bdda764-e0b0-4dd0-baa9-7086db3d2213\",\n \"tenantId\": \"pg.citya\",\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"fileStore\": null,\n \"status\": \"ACTIVE\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1693992250524,\n \"lastModifiedTime\": 1693992250524\n }\n },\n {\n \"id\": \"ccc3158e-8940-4078-844e-e83002cbd151\",\n \"tenantId\": \"pg.citya\",\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"fileStore\": null,\n \"status\": \"ACTIVE\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1693992250524,\n \"lastModifiedTime\": 1693992250524\n }\n },\n {\n \"id\": \"3025443d-5d2c-4c76-bc53-1c8fd693eb6e\",\n \"tenantId\": \"pg.citya\",\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"fileStore\": null,\n \"status\": \"ACTIVE\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1693992250524,\n \"lastModifiedTime\": 1693992250524\n }\n }\n ],\n \"address\": {\n \"id\": \"738b6541-c3eb-4525-8f81-5709f8216670\",\n \"tenantId\": \"pg.citya\",\n \"clientReferenceId\": null,\n \"doorNo\": null,\n \"latitude\": null,\n \"longitude\": null,\n \"locationAccuracy\": null,\n \"type\": null,\n \"addressLine1\": null,\n \"addressLine2\": null,\n \"landmark\": null,\n \"city\": \"pg.citya\",\n \"pincode\": null,\n \"buildingName\": null,\n \"street\": null,\n \"boundaryType\": \"Ward\",\n \"boundary\": \"B1\",\n \"locality\": null\n },\n \"startDate\": null,\n \"endDate\": null,\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"projectHierarchy\": null,\n \"natureOfWork\": null,\n \"ancestors\": null,\n \"descendants\": null,\n \"targets\": null,\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": 1693938599000,\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"isDeleted\": false,\n \"rowVersion\": 0,\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1693992250523,\n \"lastModifiedTime\": 1693992250523\n }\n }\n ],\n \"TotalCount\": null\n}" } ] }, { "name": "Create Project - Validation Error - Projects not provided", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"Size.projectRequest.projects\");", " pm.expect(message).to.eql(\"size must be between 1 and 2147483647\");", "}", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": null,\n \"ts\": null,\n \"action\": null,\n \"did\": null,\n \"key\": null,\n \"msgId\": \"Create Projects\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [],\n \"apiOperation\": \"CREATE\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_create", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_create" ] } }, "response": [] }, { "name": "Create Project - Validation Error - TenantId not provided", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {", " pm.expect(pm.response.to.have.status(400));", "});", " ", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"TENANT_ID\");", " pm.expect(message).to.eql(\"Tenant ID is mandatory\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"name\": \"Test Automation\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"125\",\n \"documents\": [\n {\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_finalized_worklist\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_feasibility_analysis\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"address\": {\n \"tenantId\": \"pg.citya\",\n \"latitude\": null,\n \"longitude\": null,\n \"city\": \"pg.citya\",\n \"boundary\": \"B1\",\n \"boundaryType\": \"Ward\"\n },\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"Create Projects\",\n \"plainAccessRequest\": {}\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_create", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_create" ] } }, "response": [] }, { "name": "Create Project - Validation Error - Multiple tenant Id", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"MULTIPLE_TENANTS\");", " pm.expect(message).to.eql(\"All projects must have same tenant Id. Please create new request for different tentant id\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": null,\n \"ts\": null,\n \"action\": null,\n \"did\": null,\n \"key\": null,\n \"msgId\": \"Create Projects\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"tenantId\": \"pg.citya\",\n \"name\": \"Test Automation 1\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"125\",\n \"documents\": [\n {\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_finalized_worklist\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_feasibility_analysis\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"address\": {\n \"tenantId\": \"pg.citya\",\n \"latitude\": null,\n \"longitude\": null,\n \"city\": \"pg.citya\",\n \"boundary\": \"B1\",\n \"boundaryType\": \"Ward\"\n },\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n },\n {\n \"tenantId\": \"pg.cityb\",\n \"name\": \"Test Automation 2\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"125\",\n \"documents\": [\n {\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_finalized_worklist\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_feasibility_analysis\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"address\": {\n \"tenantId\": \"pg.citya\",\n \"latitude\": null,\n \"longitude\": null,\n \"city\": \"pg.citya\",\n \"boundary\": \"B1\",\n \"boundaryType\": \"Ward\"\n },\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\"\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_create", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_create" ] } }, "response": [] }, { "name": "Create Project - Validation Error - Boundary without Boundary type", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"BOUNDARY\");", " pm.expect(message).to.eql(\"Boundary Type is mandatory if boundary is present in Project request body\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"tenantId\": \"pg.citya\",\n \"name\": \"Test Automation\",\n \"projectType\": \"CPS-CWS\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"Automation\",\n \"referenceID\": \"125\",\n \"documents\": [\n {\n \"documentType\": \"PROJECT_PROPOSAL\",\n \"fileStoreId\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"documentUid\": \"cfed582b-31b0-42e9-985f-fb9bb4543670\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FINALIZED_WORKLIST\",\n \"fileStoreId\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"documentUid\": \"f7543894-d3a1-4263-acb2-58b1383eebec\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_finalized_worklist\",\n \"additionalDetails\": {\n \"fileName\": \"FINALIZED_WORKLIST\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n },\n {\n \"documentType\": \"FEASIBILITY_ANALYSIS\",\n \"fileStoreId\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"documentUid\": \"c4fb4f5d-a4c3-472e-8991-e05bc2d671f5\",\n \"status\": \"ACTIVE\",\n \"key\": \"noSubProject_doc_feasibility_analysis\",\n \"additionalDetails\": {\n \"fileName\": \"FEASIBILITY_ANALYSIS\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"address\": {\n \"tenantId\": \"pg.citya\",\n \"latitude\": null,\n \"longitude\": null,\n \"city\": \"pg.citya\",\n \"boundary\": \"B1\",\n \"boundaryType\": \"\"\n },\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"creator\": \"SMS QA testing\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"Create Projects\",\n \"plainAccessRequest\": {}\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_create", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_create" ] } }, "response": [] }, { "name": "Search Project - Success - Project Id based", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(200)));", "", "pm.test(\"Register Search response is received\", function () {", " var res = pm.response.json();", " var id = res.Project[0].id;", " pm.expect(id).to.eql(pm.collectionVariables.get(\"projectId\"));", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?tenantId={{tenantId}}&limit=5&offset=0", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "lastChangedSince", "value": "1673494068231", "disabled": true }, { "key": "includeDeleted", "value": "true", "disabled": true }, { "key": "includeAncestors", "value": "false", "disabled": true }, { "key": "includeDescendants", "value": "false", "disabled": true }, { "key": "createdFrom", "value": "", "disabled": true }, { "key": "createdTo", "value": "", "disabled": true }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" } ] } }, "response": [] }, { "name": "Search Project - Success - Project Id and Project number based", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(200)));", "", "pm.test(\"Register Search response is received\", function () {", " var res = pm.response.json();", " var id = res.Project[0].id;", " pm.expect(id).to.eql(pm.collectionVariables.get(\"projectId\"));", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=5&offset=0&tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "lastChangedSince", "value": "1673494068231", "disabled": true }, { "key": "includeDeleted", "value": "true", "disabled": true }, { "key": "includeAncestors", "value": "false", "disabled": true }, { "key": "includeDescendants", "value": "false", "disabled": true }, { "key": "createdFrom", "value": null, "disabled": true }, { "key": "createdTo", "value": null, "disabled": true } ] } }, "response": [] }, { "name": "Search Project - Success - Total Project count in response", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(200)));", "", "pm.test(\"Register Search total project count is received\", function () {", " var res = pm.response.json();", " var count = res.TotalCount;", " pm.expect(count).to.eql(1);", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=10&offset=0&tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "10" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "lastChangedSince", "value": "1673494068231", "disabled": true }, { "key": "includeDeleted", "value": "true", "disabled": true }, { "key": "includeAncestors", "value": "false", "disabled": true }, { "key": "includeDescendants", "value": "false", "disabled": true }, { "key": "createdFrom", "value": "", "disabled": true }, { "key": "createdTo", "value": "", "disabled": true } ] } }, "response": [] }, { "name": "Search Project - Success - SearchBy Project Type", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(200)));", "", "pm.test(\"Project Type Search response is received\", function () {", " var res = pm.response.json();", " var id = res.Project[0].projectType;", " pm.expect(id).to.eql(pm.collectionVariables.get(\"projectType\"));", " }", ");", "", "// pm.test(\"Project ancestors is not null\", function () {", "// var res = pm.response.json();", "// var ancestors = res.Project[0].ancestors;", "// pm.expect(ancestors).to.not.be.undefined;", "// pm.expect(ancestors).to.not.be.null;", "// }", "// );", "", "// pm.test(\"Project ancestors is enriched\", function () {", "// var res = pm.response.json();", "// var ancestorId = res.Project[0].ancestors[0].id;", "// var parentProjectId = res.Projects[0].parent;", "// pm.expect(ancestorId).to.eql(parentProjectId);", "// }", "// );", "", "// pm.test(\"Project ancestors documents is correctly enriched\", function () {", "// var res = pm.response.json();", "// var ancestorProjectDocuemntType = res.Project[0].ancestors[0].documents[0].documentType;", "// pm.expect(ancestorProjectDocuemntType).to.eql(\"Document1\");", "// }", "// );", "", "// pm.test(\"Project ancestors targets is correctly enriched\", function () {", "// var res = pm.response.json();", "// var ancestorProjectTotalNo = res.Project[0].ancestors[0].targets[0].totalNo;", "// pm.expect(ancestorProjectTotalNo).to.eql(0);", "// }", "// );" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"{{projectType}}\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?offset=0&tenantId={{tenantId}}&limit=10", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "lastChangedSince", "value": "1673494068231", "disabled": true }, { "key": "includeDeleted", "value": "true", "disabled": true }, { "key": "includeDescendants", "value": "false", "disabled": true }, { "key": "createdFrom", "value": null, "disabled": true }, { "key": "createdTo", "value": null, "disabled": true }, { "key": "limit", "value": "10" } ] } }, "response": [] }, { "name": "Search Project - Success - Between createdFrom and createdTo", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(200)));", "", "// pm.test(\"Search response is received for parameters createdFrom and createdTo\", function () {", "// var res = pm.response.json();", "// pm.expect(res.Project.length).to.be.above(0);", "// }", "// );" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"{{projectType}}\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=10&offset=0&tenantId={{tenantId}}&createdFrom={{createdTime}}&createdTo={{lastModifiedTime}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "10" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "lastChangedSince", "value": "", "disabled": true }, { "key": "includeDeleted", "value": "true", "disabled": true }, { "key": "includeAncestors", "value": "false", "disabled": true }, { "key": "includeDescendants", "value": "false", "disabled": true }, { "key": "createdFrom", "value": "{{createdTime}}" }, { "key": "createdTo", "value": "{{lastModifiedTime}}" } ] } }, "response": [] }, { "name": "Search Project - Validation Error - No Search Parameters", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"PROJECT_SEARCH_FIELDS\");", " pm.expect(message).to.eql(\"Any one project search field is required\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=5&offset=0&tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Project - Validation Error - createdFrom greater than createdTo", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"INVALID_DATE\");", " pm.expect(message).to.eql(\"Created From should be less than Created To\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=5&offset=0&tenantId={{tenantId}}&createdFrom=5000&createdTo=2000", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "createdFrom", "value": "5000" }, { "key": "createdTo", "value": "2000" } ] } }, "response": [] }, { "name": "Search Project - Validation Error - Start date greater than end date", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"INVALID_DATE\");", " pm.expect(message).to.eql(\"Start date should be less than end date\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 100000,\n \"endDate\": 5000\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=5&offset=0&tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Project - Validation Error - End date without Start date", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"INVALID_DATE\");", " pm.expect(message).to.eql(\"Start date is required if end date is passed\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\", \n \"endDate\": 10\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=5&offset=0&tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Project - Validation Error - createdTo without createdFrom param", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"INVALID_DATE_PARAM\");", " pm.expect(message).to.eql(\"Created From date is required if Created To date is given\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"{{tenantId}}\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\":0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=10&offset=0&tenantId={{tenantId}}&createdTo=1677828824699", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "10" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "createdFrom", "value": "1677809944000", "disabled": true }, { "key": "createdTo", "value": "1677828824699" } ] } }, "response": [] }, { "name": "Search Project - Validation Error - Tenant Id mismatch in URL param and request body", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(403)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"CustomException\");", " pm.expect(message).to.eql(\"Not authorized to access this resource\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"RequestInfo\": {\n \"apiId\": \"mukta-services\",\n \"ver\": \"null\",\n \"ts\": 0,\n \"action\": \"null\",\n \"did\": \"null\",\n \"key\": \"null\",\n \"msgId\": \"null\",\n \"requesterId\": \"null\",\n \"authToken\": \"{{auth}}\"\n },\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"tenantId\": \"pg.cityb\",\n \"projectType\": \"\",\n \"name\": \"\",\n \"projectNumber\": \"\",\n \"projectSubType\": \"\",\n \"startDate\": 0,\n \"endDate\": 0\n }\n ],\n \"apiOperation\": \"SEARCH\"\n}\n", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_search?limit=5&offset=0&tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_search" ], "query": [ { "key": "limit", "value": "5" }, { "key": "offset", "value": "0" }, { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Update Project - Success - Single Project", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"RequestInfo is required\", function () {", " var req = JSON.parse(pm.request.body.raw);", " pm.expect(req.RequestInfo).to.not.be.null;", " pm.expect(req.RequestInfo).to.not.be.undefined;", "}", ");", "", "pm.test(\"Projects are required\", function () {", " var req = JSON.parse(pm.request.body.raw);", " pm.expect(req.Projects).to.not.be.undefined;", " pm.expect(req.Projects).to.not.be.null;", "}", ");", "", "pm.test(\"TenantId is required\", function () {", " var req = JSON.parse(pm.request.body.raw);", " var project = req.Projects[0];", " pm.expect(project.tenantId).to.be.not.null;", " pm.expect(project.tenantId).to.be.not.undefined;", " pm.expect(project.tenantId).not.to.eql(\"\");", "}", ");", "", "pm.test(\"Response status code is 200\", function () {", " pm.response.to.have.status(200);", "});", "", "// Make an HTTP GET request to the Random Word API", "pm.sendRequest({", " url: 'https://random-word-api.herokuapp.com/word',", " method: 'GET',", "}, function (err, response) {", " if (err) {", " console.error(err);", " return;", " } ", " try {", " const responseArray = JSON.parse(response.text());", " ", " if (Array.isArray(responseArray) && responseArray.length > 0) {", " // Extract the first word from the array", " const randomWord = responseArray[0];", " ", " // Store the random word in an environment variable", " pm.environment.set('randomWord', randomWord);", " ", " // Log the random word into Project Name and Project discription", " console.log('Random Word:', randomWord);", " } else {", " console.error('Response does not contain a valid word array.');", " }", " } catch (error) {", " console.error('Error parsing response JSON:', error);", " }", "});", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "// To generate a random UUID (Universally Unique Identifier) and pass it in an API request for address ID\r", "const { v4: uuidv4 } = require('uuid');\r", "pm.environment.set('randomUUID', uuidv4());" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"tenantId\": \"{{tenantId}}\",\n \"id\": \"{{projectId}}\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"name\": \"{{randomWord}}\",\n \"projectType\": \"{{projectType}}\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"{{randomWord}}\",\n \"referenceID\": \"{{dateOfProposal}}\",\n \"documents\": [\n {\n \"documentType\": \"INACTIVE\",\n \"fileStoreId\": \"{{fileStoreId}}\",\n \"documentUid\": \"{{fileStoreId}}\",\n \"status\": \"INACTIVE\",\n \"id\": \"{{documents}}\",\n \"key\": \"project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"1694001525326|en_IN\",\n \"plainAccessRequest\": {}\n }\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_update", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_update" ] } }, "response": [] }, { "name": "Update Project - Validation Error - ProjectId not provided", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"UPDATE_PROJECT\");", " pm.expect(message).to.eql(\"Project Id is mandatory\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"tenantId\": \"{{tenantId}}\",\n \"id\": \"\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"name\": \"Test Automation\",\n \"projectType\": \"{{projectType}}\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"API Automation\",\n \"referenceID\": \"{{dateOfProposal}}\",\n \"documents\": [\n {\n \"documentType\": \"INACTIVE\",\n \"fileStoreId\": \"{{fileStoreId}}\",\n \"documentUid\": \"{{fileStoreId}}\",\n \"status\": \"INACTIVE\",\n \"id\": \"{{documents}}\",\n \"key\": \"project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"1694001525326|en_IN\",\n \"plainAccessRequest\": {}\n }\n}\n}\"", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_update", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_update" ] } }, "response": [] }, { "name": "Update Project - Validation Error - TenantId not provided", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {", " if (pm.environment.get(\"base_url\").includes(\"localhost\")) { ", " pm.expect(pm.response.to.have.status(400));", " }", "});", " ", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " if (pm.environment.get(\"base_url\").includes(\"localhost\")) { ", " pm.expect(code).to.eql(\"TENANT_ID\");", " pm.expect(message).to.eql(\"Tenant ID is mandatory\");", " } ", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"id\": \"{{projectId}}\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"name\": \"Test Automation\",\n \"projectType\": \"{{projectType}}\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"API Automation\",\n \"referenceID\": \"{{dateOfProposal}}\",\n \"documents\": [\n {\n \"documentType\": \"INACTIVE\",\n \"fileStoreId\": \"{{fileStoreId}}\",\n \"documentUid\": \"{{fileStoreId}}\",\n \"status\": \"INACTIVE\",\n \"id\": \"{{documents}}\",\n \"key\": \"project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"1694001525326|en_IN\",\n \"plainAccessRequest\": {}\n }\n}\n}\"", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_update", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_update" ] } }, "response": [] }, { "name": "Update Project - Validation Error - Multiple TenantId provided", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => ", " pm.expect(pm.response.to.have.status(400)));", "", "pm.test(\"Correct Error with message and code is received\", function () {", " var res = pm.response.json();", " var code = res.Errors[0].code;", " var message = res.Errors[0].message;", " pm.expect(code).to.eql(\"MULTIPLE_TENANTS\");", " pm.expect(message).to.eql(\"All projects must have same tenant Id. Please create new request for different tentant id\");", " }", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\n \"Projects\": [\n {\n \"tenantId\": \"{{tenantId}}\",\n \"id\": \"\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"name\": \"Test Automation\",\n \"projectType\": \"{{projectType}}\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"API Automation\",\n \"referenceID\": \"{{dateOfProposal}}\",\n \"documents\": [\n {\n \"documentType\": \"INACTIVE\",\n \"fileStoreId\": \"{{fileStoreId}}\",\n \"documentUid\": \"{{fileStoreId}}\",\n \"status\": \"INACTIVE\",\n \"id\": \"{{documents}}\",\n \"key\": \"project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n },\n {\n \"tenantId\": \"pg.cityb\",\n \"id\": \"\",\n \"projectNumber\": \"{{projectNumber}}\",\n \"name\": \"Test Automation\",\n \"projectType\": \"{{projectType}}\",\n \"projectSubType\": \"\",\n \"department\": \"\",\n \"description\": \"API Automation\",\n \"referenceID\": \"{{dateOfProposal}}\",\n \"documents\": [\n {\n \"documentType\": \"INACTIVE\",\n \"fileStoreId\": \"{{fileStoreId}}\",\n \"documentUid\": \"{{fileStoreId}}\",\n \"status\": \"INACTIVE\",\n \"id\": \"{{documents}}\",\n \"key\": \"project_proposal\",\n \"additionalDetails\": {\n \"fileName\": \"PROJECT_PROPOSAL\",\n \"otherCategoryName\": \"\"\n },\n \"tenantId\": \"pg.citya\"\n }\n ],\n\n \"isTaskEnabled\": false,\n \"parent\": \"\",\n \"additionalDetails\": {\n \"estimatedCostInRs\": \"500\",\n \"dateOfProposal\": \"{{dateOfProposal}}\",\n \"locality\": \"SUN01\",\n \"targetDemography\": \"SM\"\n },\n \"rowVersion\": 0\n }\n ],\n \"apiOperation\": \"CREATE\",\n \"RequestInfo\": {\n \"apiId\": \"Rainmaker\",\n \"authToken\": \"{{auth}}\",\n \"msgId\": \"1694001525326|en_IN\",\n \"plainAccessRequest\": {}\n }\n}\n}\"", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/project/v1/_update", "host": [ "{{base_url}}" ], "path": [ "project", "v1", "_update" ] } }, "response": [] } ], "event": [ { "listen": "prerequest", "script": { "type": "text/javascript", "exec": [ "" ] } }, { "listen": "test", "script": { "type": "text/javascript", "exec": [ "" ] } } ] }, { "name": "Estimate Service Test Script", "item": [ { "name": "Create Estimate - Success", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"RequestInfo is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " pm.expect(req.RequestInfo).to.not.be.null;\r", " pm.expect(req.RequestInfo).to.not.be.undefined;\r", "});\r", "\r", "pm.test(\"TenantId is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " var estimate = req.estimate;\r", " pm.expect(estimate.tenantId).to.not.be.null;\r", " pm.expect(estimate.tenantId).to.not.be.undefined;\r", " pm.expect(estimate.tenantId).to.not.eql(\"\"); \r", "});\r", "\r", "pm.test(\"Name is mandatory\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " var estimate = req.estimate;\r", " pm.expect(estimate.tenantId).to.not.be.null;\r", " pm.expect(estimate.tenantId).to.not.be.undefined;\r", " pm.expect(estimate.tenantId).to.not.eql(\"\");;\r", "});\r", "\r", "pm.test(\"print and save EstimateId in environment\", function () {\r", " var res = pm.response.json();\r", " var estId = res.estimates[0].id;\r", " console.log('id:', estId);\r", " pm.environment.set('estId-WO',estId);\r", "}\r", ");\r", "\r", "pm.test(\"print and save EstimateNumber in environment\", function () {\r", " var res = pm.response.json();\r", " var estNo = res.estimates[0].estimateNumber;\r", " console.log('estimateNumber:', estNo);\r", " pm.environment.set('estNo-WO',estNo);\r", "}\r", ");\r", "\r", "let responseData = pm.response.json();\r", "var dataArray = responseData.estimates[0]; // Replace \"dataArray\" with the actual key of the array in your response body\r", "\r", " // Store the array in an environment or global variable\r", "pm.collectionVariables.set(\"estmateAll\", JSON.stringify(dataArray));\r", "\r", "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "//Storing the response data into collection variable to reuse\r", "\r", "\r", "\r", "pm.collectionVariables.set(\"fileName\", responseData.estimates[0].additionalDetails.documents[0].fileName);\r", "\r", "pm.environment.set(\"estfileName\", responseData.estimates[0].additionalDetails.documents[0].fileName);\r", "\r", "pm.collectionVariables.set(\"fileStoreId\", responseData.estimates[0].additionalDetails.documents[0].fileStoreId);\r", "\r", "pm.environment.set(\"estfileStoreId\", responseData.estimates[0].additionalDetails.documents[0].fileStoreId);\r", "\r", "pm.collectionVariables.set(\"fileType\", responseData.estimates[0].additionalDetails.documents[0].fileType);\r", "\r", "pm.environment.set(\"estfileType\", responseData.estimates[0].additionalDetails.documents[0].fileType);\r", "\r", "pm.collectionVariables.set(\"boundaryType\", responseData.estimates[0].address.boundaryType);\r", "\r", "pm.collectionVariables.set(\"boundary\", responseData.estimates[0].address.boundary);\r", "pm.collectionVariables.set(\"estimateId\", responseData.estimates[0].id);\r", "\r", "pm.collectionVariables.set(\"estimateNumber\", responseData.estimates[0].estimateNumber);\r", "\r", "pm.collectionVariables.set(\"createdTime\", (responseData.estimates[0].auditDetails.createdTime));\r", "\r", "pm.collectionVariables.set(\"lastModifiedTime\", (responseData.estimates[0].auditDetails.lastModifiedTime));\r", "\r", "pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].status);\r", "\r", "pm.collectionVariables.set(\"Lineitem1\", responseData.estimates[0].estimateDetails[0].id);\r", "\r", "pm.environment.set(\"estLineitem1\", responseData.estimates[0].estimateDetails[0].id);\r", "\r", "pm.collectionVariables.set(\"Lineamount1\", responseData.estimates[0].estimateDetails[0].amountDetail[0].id);\r", "\r", "pm.environment.set(\"estLineamount1\", responseData.estimates[0].estimateDetails[0].amountDetail[0].id);\r", "\r", "pm.collectionVariables.set(\"Lineitem2\", responseData.estimates[0].estimateDetails[1].id);\r", "\r", "pm.environment.set(\"estLineitem2\", responseData.estimates[0].estimateDetails[1].id);\r", "\r", "pm.collectionVariables.set(\"estLineamount2\", responseData.estimates[0].estimateDetails[1].amountDetail[0].id);\r", "\r", "pm.environment.set(\"estLineamount2\", responseData.estimates[0].estimateDetails[1].amountDetail[0].id);\r", "\r", "pm.environment.set(\"prevEstLineitem1\", responseData.estimates[0].estimateDetails[0].previousLineItemId);\r", "\r", "pm.environment.set(\"prevEstLineitem2\", responseData.estimates[0].estimateDetails[1].previousLineItemId);\r", "\r", "\r", "// Extract the total estimated amount from the response (use the correct JSON property name)\r", "var totalEstimatedAmount = responseData.estimates[0].additionalDetails.totalEstimatedAmount;\r", "\r", "var decimalPart = totalEstimatedAmount - Math.floor(totalEstimatedAmount);// Get the decimal part of the total estimated amount\r", "\r", "if (decimalPart >=0.5) {\r", " totalEstimatedAmount = Math.ceil(totalEstimatedAmount);// Check if the decimal part is greater than 0.5 and adjust the total amount accordingly\r", "} else {\r", " totalEstimatedAmount = Math.floor(totalEstimatedAmount);\r", "}\r", "\r", "pm.collectionVariables.set(\"totalEstimatedAmount\", totalEstimatedAmount);// Store the rounded amount in a collection variable (replace 'roundedAmount' and 'myCollectionVar' as needed)\r", "\r", "pm.environment.set(\"totalEstimatedAmount\", totalEstimatedAmount);\r", "" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "var currentDateInMillis = new Date().getTime();\r", "\r", "// Calculate the date 30 days from now\r", "var thirtyDaysInMillis = 30 * 24 * 60 * 60 * 1000; // 30 days in milliseconds\r", "var futureDateInMillis = currentDateInMillis + thirtyDaysInMillis;\r", "\r", "// Log the future date in milliseconds\r", "console.log(\"Future Date in Milliseconds (30 days from now): \" + futureDateInMillis);\r", "\r", "// Set the variable for later use\r", "pm.environment.set(\"endDate\", futureDateInMillis);" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n // {\r\n // \"sorId\": \"SOR_000010\",\r\n // \"category\": \"SOR\",\r\n // \"name\": \"UNSKILLED MALE MULIA\",\r\n // \"description\": \"MA.1\",\r\n // \"unitRate\": 200,\r\n // \"noOfunit\": 1,\r\n // \"uom\": \"L\",\r\n // \"uomValue\": 0.0,\r\n // \"length\": 1,\r\n // \"width\": 1,\r\n // \"height\": 1,\r\n // \"quantity\": 1,\r\n // \"isDeduction\": false,\r\n // \"amountDetail\": [\r\n // {\r\n // \"type\": \"EstimatedAmount\",\r\n // \"amount\": 200,\r\n // \"isActive\": true,\r\n // \"additionalDetails\": null\r\n // }\r\n // ],\r\n // \"isActive\": true,\r\n // \"additionalDetails\": null\r\n // },\r\n {\r\n // \"sorId\": \"SOR_000010\",\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Fixing tiles in floors, treads or steps and landing over 25mm bed of C:M (1:1) jointed with neat cement slurry mixed with pigment to match the shade of the tiles including rubbing and polishing complete excluding the cost of pre-cast tile\",\r\n \"description\": \"LHS\",\r\n \"unitRate\": 5026.14,\r\n \"noOfunit\": 1,\r\n \"uom\": \"KG\",\r\n \"uomValue\": 0.0,\r\n \"length\": 1,\r\n \"width\": 1,\r\n \"height\": 1,\r\n \"quantity\": 1,\r\n \"isDeduction\": false,\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": 5026.14,\r\n \"isActive\": true,\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"isActive\": true,\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"585.6\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": \"{{endDate}}\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 7000.3,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [ { "name": "_create_estimate-success", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"Ward\",\r\n \"boundary\": \"B1\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3000.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 03\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"PJ/2023-24/09/000767\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"Test Automation\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Date", "value": "Thu, 07 Sep 2023 07:44:30 GMT" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Strict-Transport-Security", "value": "max-age=63072000; includeSubdomains; preload" }, { "key": "X-Lua-Resty-WAF-ID", "value": "7bcb9df1944a60e3d526" }, { "key": "x-correlation-id", "value": "bc17f438-f65d-45b8-b0cf-405c03c146b8" }, { "key": "Cache-Control", "value": "no-cache, no-store, max-age=0, must-revalidate" }, { "key": "Content-Security-Policy", "value": "default-src 'self' https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'; img-src 'self' https: data: blob:; style-src https: blob: 'unsafe-inline'; worker-src 'self' blob:; font-src 'self' https: data: blob:; child-src 'self' https: data: blob:;" }, { "key": "Referrer-Policy", "value": "no-referrer-when-downgrade" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Download-Options", "value": "noopen" }, { "key": "X-Frame-Options", "value": "sameorigin" }, { "key": "X-XSS-Protection", "value": "1" }, { "key": "Content-Encoding", "value": "gzip" } ], "cookie": [], "body": "{\n \"ResponseInfo\": {\n \"apiId\": \"Rainmaker\",\n \"ver\": null,\n \"ts\": null,\n \"resMsgId\": \"uief87324\",\n \"msgId\": \"1694064135997|en_IN\",\n \"status\": \"successful\"\n },\n \"estimates\": [\n {\n \"id\": \"75f0dd96-21ee-4974-bee9-4ea37952d9fb\",\n \"tenantId\": \"pg.citya\",\n \"estimateNumber\": \"ES/2023-24/000741\",\n \"projectId\": \"32ba7edc-14ba-4034-9a41-f5ee3663681e\",\n \"proposalDate\": 1694072670231,\n \"status\": \"INWORKFLOW\",\n \"wfStatus\": \"PENDINGFORVERIFICATION\",\n \"name\": \"urate\",\n \"referenceNumber\": null,\n \"description\": \"urate\",\n \"executingDepartment\": \"WRK\",\n \"address\": {\n \"id\": \"5f7a4913-4d57-410f-bffe-c1e3fb63d3d8\",\n \"tenantId\": \"pg.citya\",\n \"doorNo\": null,\n \"latitude\": 0,\n \"longitude\": 0,\n \"locationAccuracy\": 0,\n \"type\": null,\n \"addressNumber\": null,\n \"addressLine1\": null,\n \"addressLine2\": null,\n \"landmark\": null,\n \"city\": \"pg.citya\",\n \"pincode\": null,\n \"detail\": null,\n \"buildingName\": null,\n \"street\": null,\n \"boundaryType\": \"Ward\",\n \"boundary\": \"B1\",\n \"auditDetails\": null\n },\n \"estimateDetails\": [\n {\n \"id\": \"6ef721f5-2f4f-4b02-a08d-e3697dc34b9b\",\n \"sorId\": \"45\",\n \"category\": \"NON-SOR\",\n \"name\": \"Testing 01\",\n \"description\": \"Testing 01\",\n \"unitRate\": 250,\n \"noOfunit\": 12,\n \"uom\": \"KG\",\n \"uomValue\": null,\n \"amountDetail\": [\n {\n \"id\": \"88f2c99b-91f7-4fe2-b1e8-aa4ddf681ef9\",\n \"type\": \"EstimatedAmount\",\n \"amount\": 3000,\n \"isActive\": true,\n \"additionalDetails\": {}\n }\n ],\n \"isActive\": true,\n \"additionalDetails\": null\n },\n {\n \"id\": \"eadad260-916e-4a0b-b0ff-a3364b6019da\",\n \"sorId\": \"45\",\n \"category\": \"NON-SOR\",\n \"name\": \"Testing 02\",\n \"description\": \"Testing 02\",\n \"unitRate\": 125,\n \"noOfunit\": 25,\n \"uom\": \"SQM\",\n \"uomValue\": null,\n \"amountDetail\": [\n {\n \"id\": \"2ec1be67-b482-40e4-a8ca-098d454a9c8a\",\n \"type\": \"EstimatedAmount\",\n \"amount\": 3125,\n \"isActive\": true,\n \"additionalDetails\": {}\n }\n ],\n \"isActive\": true,\n \"additionalDetails\": null\n },\n {\n \"id\": \"b3996d49-4183-4585-a406-b038ab498197\",\n \"sorId\": \"45\",\n \"category\": \"NON-SOR\",\n \"name\": \"Testing 03\",\n \"description\": \"Testing 03\",\n \"unitRate\": 135,\n \"noOfunit\": 11,\n \"uom\": \"RMT\",\n \"uomValue\": null,\n \"amountDetail\": [\n {\n \"id\": \"003a20b9-4ea0-40fe-ad64-22149a43b6ed\",\n \"type\": \"EstimatedAmount\",\n \"amount\": 1485,\n \"isActive\": true,\n \"additionalDetails\": {}\n }\n ],\n \"isActive\": true,\n \"additionalDetails\": null\n },\n {\n \"id\": \"6615ffe6-43a2-4923-9935-25a7f5f6304a\",\n \"sorId\": null,\n \"category\": \"OVERHEAD\",\n \"name\": \"GST\",\n \"description\": \"Goods and Service Tax\",\n \"unitRate\": null,\n \"noOfunit\": null,\n \"uom\": null,\n \"uomValue\": null,\n \"amountDetail\": [\n {\n \"id\": \"9b50b779-546a-46aa-b3f3-75ea54839bca\",\n \"type\": \"GST\",\n \"amount\": 1369.8,\n \"isActive\": true,\n \"additionalDetails\": null\n }\n ],\n \"isActive\": true,\n \"additionalDetails\": {\n \"row\": {\n \"percentage\": \"18 %\",\n \"name\": {\n \"id\": \"2\",\n \"code\": \"GST\",\n \"description\": \"Goods and Service Tax\",\n \"active\": true,\n \"isAutoCalculated\": true,\n \"type\": \"percentage\",\n \"value\": \"18\",\n \"isWorkOrderValue\": true,\n \"effectiveFrom\": \"1694072657523\",\n \"effectiveTo\": null,\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\n },\n \"amount\": \"1369.80\"\n }\n }\n }\n ],\n \"auditDetails\": {\n \"createdBy\": \"85d48838-bb62-4eba-9e41-bddbf00add5b\",\n \"lastModifiedBy\": \"85d48838-bb62-4eba-9e41-bddbf00add5b\",\n \"createdTime\": 1694072670231,\n \"lastModifiedTime\": 1694072670231\n },\n \"additionalDetails\": {\n \"documents\": [\n {\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"tenantId\": \"pg.citya\",\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\n },\n {\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\n \"tenantId\": \"pg.citya\",\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\n },\n {\n \"fileName\": \"WorkOrder (3).pdf\",\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\n \"tenantId\": \"pg.citya\",\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\n },\n {\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\n },\n {\n \"fileName\": \"\",\n \"fileType\": \"Others\"\n }\n ],\n \"labourMaterialAnalysis\": {\n \"labour\": \"50\",\n \"material\": \"50\"\n },\n \"creator\": \"SMS QA testing\",\n \"location\": {\n \"locality\": \"B1\",\n \"ward\": \"B1\",\n \"city\": \"pg.citya\"\n },\n \"ward\": \"B1\",\n \"locality\": \"SUN01\",\n \"projectNumber\": \"PJ/2023-24/09/000767\",\n \"totalEstimatedAmount\": 8979.8,\n \"tenantId\": \"pg.citya\",\n \"projectName\": \"Test Automation\"\n },\n \"project\": null,\n \"ProcessInstances\": null\n }\n ],\n \"TotalCount\": null\n}" }, { "name": "Create Estimate - Success", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250.28\",\r\n \"noOfunit\": \"13\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3253.6\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"585.6\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 10012.3,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Date", "value": "Tue, 28 Nov 2023 06:29:04 GMT" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Connection", "value": "keep-alive" }, { "key": "x-correlation-id", "value": "0814d9e7-a304-490e-8432-067d25d85556" }, { "key": "Cache-Control", "value": "no-cache, no-store, max-age=0, must-revalidate" }, { "key": "Strict-Transport-Security", "value": "max-age=15724800; includeSubDomains" } ], "cookie": [], "body": "{\n \"ResponseInfo\": {\n \"apiId\": \"Rainmaker\",\n \"ver\": null,\n \"ts\": null,\n \"resMsgId\": \"uief87324\",\n \"msgId\": \"1694064135997|en_IN\",\n \"status\": \"successful\"\n },\n \"estimates\": [\n {\n \"id\": \"80484679-44eb-4e89-bd7a-02e0d1b8c43a\",\n \"tenantId\": \"pg.citya\",\n \"estimateNumber\": \"ES/2023-24/002180\",\n \"revisionNumber\": null,\n \"businessService\": null,\n \"versionNumber\": 1,\n \"oldUuid\": null,\n \"projectId\": \"92859682-0971-4ea0-9a32-4cc7d5b21c18\",\n \"proposalDate\": 1701152944380,\n \"status\": \"INWORKFLOW\",\n \"wfStatus\": \"PENDINGFORVERIFICATION\",\n \"name\": \"Inbox\",\n \"referenceNumber\": null,\n \"description\": \"Inbox\",\n \"executingDepartment\": \"WRK\",\n \"address\": {\n \"id\": \"5b21e50a-d74f-4279-afc0-4d54bb0cb104\",\n \"tenantId\": \"pg.citya\",\n \"doorNo\": null,\n \"latitude\": 0,\n \"longitude\": 0,\n \"locationAccuracy\": 0,\n \"type\": null,\n \"addressNumber\": null,\n \"addressLine1\": null,\n \"addressLine2\": null,\n \"landmark\": null,\n \"city\": \"pg.citya\",\n \"pincode\": null,\n \"detail\": null,\n \"buildingName\": null,\n \"street\": null,\n \"boundaryType\": \"\",\n \"boundary\": \"\",\n \"auditDetails\": null\n },\n \"estimateDetails\": [\n {\n \"id\": \"3ea07ec3-cae8-4679-b3d8-1f9dff93dc24\",\n \"previousLineItemId\": null,\n \"sorId\": \"45\",\n \"category\": \"NON-SOR\",\n \"name\": \"Testing 01\",\n \"description\": \"Testing 01\",\n \"unitRate\": 250.28,\n \"noOfunit\": 13,\n \"uom\": \"KG\",\n \"uomValue\": null,\n \"length\": null,\n \"width\": null,\n \"height\": null,\n \"quantity\": null,\n \"isDeduction\": null,\n \"amountDetail\": [\n {\n \"id\": \"18451c3e-0806-4e06-93ec-97accc3b5c5c\",\n \"type\": \"EstimatedAmount\",\n \"amount\": 3253.6,\n \"isActive\": true,\n \"additionalDetails\": {}\n }\n ],\n \"isActive\": true,\n \"additionalDetails\": null\n },\n {\n \"id\": \"3b86c2b5-e0c0-4546-91af-9152ebb25969\",\n \"previousLineItemId\": null,\n \"sorId\": null,\n \"category\": \"OVERHEAD\",\n \"name\": \"GST\",\n \"description\": \"Goods and Service Tax\",\n \"unitRate\": null,\n \"noOfunit\": null,\n \"uom\": null,\n \"uomValue\": null,\n \"length\": null,\n \"width\": null,\n \"height\": null,\n \"quantity\": null,\n \"isDeduction\": null,\n \"amountDetail\": [\n {\n \"id\": \"5013011d-277a-48cc-9f86-7584f8b1198a\",\n \"type\": \"GST\",\n \"amount\": 585.6,\n \"isActive\": true,\n \"additionalDetails\": null\n }\n ],\n \"isActive\": true,\n \"additionalDetails\": {\n \"row\": {\n \"percentage\": \"18 %\",\n \"name\": {\n \"id\": \"2\",\n \"code\": \"GST\",\n \"description\": \"Goods and Service Tax\",\n \"active\": true,\n \"isAutoCalculated\": true,\n \"type\": \"percentage\",\n \"value\": \"18\",\n \"isWorkOrderValue\": true,\n \"effectiveFrom\": \"\",\n \"effectiveTo\": null,\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\n },\n \"amount\": \"585.6\"\n }\n }\n }\n ],\n \"auditDetails\": {\n \"createdBy\": \"40e3b45a-0f64-4e8c-8768-aab82c095b2d\",\n \"lastModifiedBy\": \"40e3b45a-0f64-4e8c-8768-aab82c095b2d\",\n \"createdTime\": 1701152944380,\n \"lastModifiedTime\": 1701152944380\n },\n \"additionalDetails\": {\n \"documents\": [\n {\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"tenantId\": \"pg.citya\",\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\n },\n {\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\n \"tenantId\": \"pg.citya\",\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\n },\n {\n \"fileName\": \"WorkOrder (3).pdf\",\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\n \"tenantId\": \"pg.citya\",\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\n },\n {\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\n },\n {\n \"fileName\": \"\",\n \"fileType\": \"Others\"\n }\n ],\n \"labourMaterialAnalysis\": {\n \"labour\": \"50\",\n \"material\": \"50\"\n },\n \"creator\": \"SMS QA testing\",\n \"location\": {\n \"locality\": \"B1\",\n \"ward\": \"B1\",\n \"city\": \"pg.citya\"\n },\n \"ward\": \"B1\",\n \"locality\": \"SUN01\",\n \"projectNumber\": \"PJ/2023-24/05/002231\",\n \"totalEstimatedAmount\": 10012.3,\n \"tenantId\": \"pg.citya\",\n \"projectName\": \"Inbox\"\n },\n \"project\": null,\n \"ProcessInstances\": null\n }\n ],\n \"TotalCount\": null\n}" } ] }, { "name": "Create Estimate - Validation error - TenantId Mandatory", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"TENANT_ID\");\r", " pm.expect(message).to.eql(\"TenantId is mandatory\");\r", " }\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3000.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 03\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Estimate - Validation error - Atleast One SOR or NONSOR is present", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Atleast one SOR or Non-SOR should be present\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ESTIMATE.DETAIL.CATEGORY\");\r", " pm.expect(message).to.eql(\"At least one SOR or Non-SOR should be present\");\r", " }\r", ");" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Estimate - Validation error - Address is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ADDRESS\");\r", " pm.expect(message).to.eql(\"Address is mandatory\");\r", "}\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": null,\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3000.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 03\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Estimate - Validation error - Invalid ProjectId", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"PROJECT_ID\");\r", " pm.expect(message).to.eql(\"The project id : 12255 is invalid\");\r", "}\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"12255\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3000.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 03\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Estimate - Validation error - Amount detail is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ESTIMATE.DETAIL.AMOUNT.DETAILS\");\r", " pm.expect(message).to.eql(\"Amount details are mandatory\");\r", "}\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"Ward\",\r\n \"boundary\": \"B1\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\":null\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 03\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Estimate - Validation error - Estimate detail is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ESTIMATE_DETAILS\");\r", " pm.expect(message).to.eql(\"Estimate detail is mandatory\");\r", "}\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"Ward\",\r\n \"boundary\": \"B1\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": null,\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Update Estimate - Success WF Send back", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Send back\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORCORRECTION\");\r", " pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].status);\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{estmateAll}},\r\n \"workflow\": {\r\n \"action\": \"SENDBACK\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Success Edit and Re-submit", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Re-Submit\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORVERIFICATION\");\r", " pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].status);\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{estmateAll}},\r\n \"workflow\": {\r\n \"action\": \"RE-SUBMIT\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Success Verify and forward", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Verified\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORTECHNICALSANCTION\");\r", " pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].status);\r", "});\r", "\r", "\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\":{{estmateAll}},\r\n \"workflow\": {\r\n \"action\": \"VERIFYANDFORWARD\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Success Technical sanctioned", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Technical Sanctioned\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORAPPROVAL\");\r", " pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].status);\r", "});\r", "\r", "\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{estmateAll}},\r\n \"workflow\": {\r\n \"action\": \"TECHNICALSANCTION\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Success Approved", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Approved\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"APPROVED\");\r", " pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].status);\r", "});\r", "\r", "\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{estmateAll}},\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Validation error - Address is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ADDRESS\");\r", " pm.expect(message).to.eql(\"Address is mandatory\");\r", "}\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"id\": \"{{estimateId}}\",\r\n \"estimateNumber\": \"{{estimateNumber}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": null,\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3000.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 05\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Validation error - Invalid Project", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_PROJECT_ID\");\r", "}\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"id\": \"{{estimateId}}\",\r\n \"estimateNumber\": \"{{estimateNumber}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"12255\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"pg.citya\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3000.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 05\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Validation error - Amount detail is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ESTIMATE.DETAIL.AMOUNT.DETAILS\");\r", " pm.expect(message).to.eql(\"Amount details are mandatory\");\r", "}\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"id\": \"{{estimateId}}\",\r\n \"estimateNumber\": \"{{estimateNumber}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"pg.citya\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250\",\r\n \"noOfunit\": \"12\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": null\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 02\",\r\n \"description\": \"Testing 02\",\r\n \"unitRate\": \"125\",\r\n \"noOfunit\": \"25\",\r\n \"uom\": \"SQM\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3125.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 03\",\r\n \"description\": \"Testing 05\",\r\n \"unitRate\": \"135\",\r\n \"noOfunit\": \"11\",\r\n \"uom\": \"RMT\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"1485.00\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"1369.80\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"1369.80\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Estimate - Validation error - Estimate detail is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"ESTIMATE_DETAILS\");\r", " pm.expect(message).to.eql(\"Estimate detail is mandatory\");\r", "}\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"id\": \"{{estimateId}}\",\r\n \"estimateNumber\": \"{{estimateNumber}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"pg.citya\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": null,\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 8979.8,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Search Estimate - Success - EstimateNumber", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var estimateNumber = res.estimates[0].estimateNumber;\r", " pm.expect(estimateNumber).to.eql(pm.collectionVariables.get(\"estimateNumber\"));\r", " }\r", ");\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&estimateNumber={{estimateNumber}}", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "estimateNumber", "value": "{{estimateNumber}}" } ] } }, "response": [] }, { "name": "Search Estimate - Success - ProjectName", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var projectName = res.estimates[0].projectName;\r", " pm.expect(projectName).to.eql(pm.collectionVariables.get(\"projectName\"));\r", " }\r", ");\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&ProjectName={{randomWord}}", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "ProjectName", "value": "{{randomWord}}" } ] } }, "response": [] }, { "name": "Search Estimate - Success - Status", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var state = res.estimates[0].state;\r", " pm.expect(state).to.eql(pm.collectionVariables.get(\"state\"));\r", " }\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&status={{wfStatus}}", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "status", "value": "{{wfStatus}}" } ] } }, "response": [] }, { "name": "Search Estimate - Success - between createdFrom and To date", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&fromProposalDate={{createdTime}}&toProposalDate={{lastModifiedTime}}", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "fromProposalDate", "value": "{{createdTime}}" }, { "key": "toProposalDate", "value": "{{lastModifiedTime}}" } ] } }, "response": [] }, { "name": "Search Estimate - Validation Error - createdFrom greater than createdTo", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => \r", " pm.expect(pm.response.to.have.status(400)));\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"FROM_GREATER_THAN_TO_DATE\");\r", " pm.expect(message).to.eql(\"From date is greater than to date\");\r", " }\r", ");\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&fromProposalDate=1694783889000&toProposalDate=1694092689000", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "fromProposalDate", "value": "1694783889000" }, { "key": "toProposalDate", "value": "1694092689000" } ] } }, "response": [] }, { "name": "Search Estimate - Validation Error - createdTo without createdFrom param", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => \r", " pm.expect(pm.response.to.have.status(400)));\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_SEARCH_PARAM\");\r", " pm.expect(message).to.eql(\"Cannot specify toProposalDate without a fromProposalDate\");\r", " }\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&toProposalDate={{lastModifiedTime}}", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "toProposalDate", "value": "{{lastModifiedTime}}" } ] } }, "response": [] }, { "name": "Create Revision Estimate - Success", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"RequestInfo is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " pm.expect(req.RequestInfo).to.not.be.null;\r", " pm.expect(req.RequestInfo).to.not.be.undefined;\r", "});\r", "\r", "pm.test(\"TenantId is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " var estimate = req.estimate;\r", " pm.expect(estimate.tenantId).to.not.be.null;\r", " pm.expect(estimate.tenantId).to.not.be.undefined;\r", " pm.expect(estimate.tenantId).to.not.eql(\"\"); \r", "});\r", "\r", "pm.test(\"Name is mandatory\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " var estimate = req.estimate;\r", " pm.expect(estimate.name).to.not.be.null;\r", " pm.expect(estimate.name).to.not.be.undefined;\r", " pm.expect(estimate.name).to.not.eql(\"\");;\r", "});\r", "\r", "pm.test(\"print and save EstimateId in environment\", function () {\r", " var res = pm.response.json();\r", " var estId = res.estimates[0].id;\r", " console.log('id:', estId);\r", " pm.environment.set('estId-WO',estId);\r", "}\r", ");\r", "\r", "pm.test(\"print and save EstimateNumber in environment\", function () {\r", " var res = pm.response.json();\r", " var estNo = res.estimates[0].estimateNumber;\r", " console.log('estimateNumber:', estNo);\r", " pm.environment.set('estNo-WO',estNo);\r", "}\r", ");\r", "pm.test(\"print and save Revision Number in environment\", function(){\r", " var res = pm.response.json();\r", " var revisionNumber = res.estimates[0].revisionNumber;\r", " console.log('revisionNumber:', revisionNumber);\r", " pm.environment.set('revNo-WO',revisionNumber);\r", "});\r", "let responseData = pm.response.json();\r", "\r", "var dataArray = responseData.estimates[0]; // Replace \"dataArray\" with the actual key of the array in your response body\r", "\r", " // Store the array in an environment or global variable\r", "pm.collectionVariables.set(\"Re-estimateAll\", JSON.stringify(dataArray));\r", "\r", "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "//Storing the response data into collection variable to reuse\r", "\r", "pm.collectionVariables.set(\"fileName\", responseData.estimates[0].additionalDetails.documents[0].fileName);\r", "\r", "pm.environment.set(\"estfileName\", responseData.estimates[0].additionalDetails.documents[0].fileName);\r", "\r", "pm.collectionVariables.set(\"fileStoreId\", responseData.estimates[0].additionalDetails.documents[0].fileStoreId);\r", "\r", "pm.environment.set(\"estfileStoreId\", responseData.estimates[0].additionalDetails.documents[0].fileStoreId);\r", "\r", "pm.collectionVariables.set(\"fileType\", responseData.estimates[0].additionalDetails.documents[0].fileType);\r", "\r", "pm.environment.set(\"estfileType\", responseData.estimates[0].additionalDetails.documents[0].fileType);\r", "\r", "pm.collectionVariables.set(\"boundaryType\", responseData.estimates[0].address.boundaryType);\r", "\r", "pm.collectionVariables.set(\"boundary\", responseData.estimates[0].address.boundary);\r", "pm.collectionVariables.set(\"estimateId\", responseData.estimates[0].id);\r", "\r", "pm.collectionVariables.set(\"estimateNumber\", responseData.estimates[0].estimateNumber);\r", "\r", "pm.collectionVariables.set(\"createdTime\", (responseData.estimates[0].auditDetails.createdTime));\r", "\r", "pm.collectionVariables.set(\"lastModifiedTime\", (responseData.estimates[0].auditDetails.lastModifiedTime));\r", "\r", "pm.collectionVariables.set(\"wfStatus\", responseData.estimates[0].wfStatus);\r", "\r", "pm.collectionVariables.set(\"Lineitem1\", responseData.estimates[0].estimateDetails[0].id);\r", "\r", "pm.environment.set(\"estLineitem1\", responseData.estimates[0].estimateDetails[0].id);\r", "\r", "pm.collectionVariables.set(\"Lineamount1\", responseData.estimates[0].estimateDetails[0].amountDetail[0].id);\r", "\r", "pm.environment.set(\"estLineamount1\", responseData.estimates[0].estimateDetails[0].amountDetail[0].id);\r", "\r", "pm.collectionVariables.set(\"Lineitem2\", responseData.estimates[0].estimateDetails[1].id);\r", "\r", "pm.environment.set(\"estLineitem2\", responseData.estimates[0].estimateDetails[1].id);\r", "\r", "pm.collectionVariables.set(\"estLineamount2\", responseData.estimates[0].estimateDetails[1].amountDetail[0].id);\r", "\r", "pm.environment.set(\"estLineamount2\", responseData.estimates[0].estimateDetails[1].amountDetail[0].id);\r", "\r", "pm.environment.set(\"prevEstLineitem1\", responseData.estimates[0].estimateDetails[0].previousLineItemId);\r", "\r", "pm.environment.set(\"prevEstLineitem2\", responseData.estimates[0].estimateDetails[1].previousLineItemId);\r", "\r", "\r", "// Extract the total estimated amount from the response (use the correct JSON property name)\r", "var totalEstimatedAmount = responseData.estimates[0].additionalDetails.totalEstimatedAmount;\r", "\r", "var decimalPart = totalEstimatedAmount - Math.floor(totalEstimatedAmount);// Get the decimal part of the total estimated amount\r", "\r", "if (decimalPart >=0.5) {\r", " totalEstimatedAmount = Math.ceil(totalEstimatedAmount);// Check if the decimal part is greater than 0.5 and adjust the total amount accordingly\r", "} else {\r", " totalEstimatedAmount = Math.floor(totalEstimatedAmount);\r", "}\r", "\r", "pm.collectionVariables.set(\"totalEstimatedAmount\", totalEstimatedAmount);// Store the rounded amount in a collection variable (replace 'roundedAmount' and 'myCollectionVar' as needed)\r", "\r", "pm.environment.set(\"totalEstimatedAmount\", totalEstimatedAmount);" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"businessService\": \"{{buisnessService}}\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"previousLineItemId\": \"{{estLineitem1}}\",\r\n // \"sorId\": \"SOR_000196\",\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Fixing tiles in floors, treads or steps and landing over 25mm bed of C:M (1:1) jointed with neat cement slurry mixed with pigment to match the shade of the tiles including rubbing and polishing complete excluding the cost of pre-cast tile\",\r\n \"description\": \"LHS\",\r\n \"unitRate\": 5026.14,\r\n \"noOfunit\": 1,\r\n \"uom\": \"KG\",\r\n \"uomValue\": 0.0,\r\n \"length\": 1,\r\n \"width\": 1,\r\n \"height\": 1,\r\n \"quantity\": 1,\r\n \"isDeduction\": false,\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{estLineamount1}}\",\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"5026.14\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"previousLineItemId\": \"{{estLineitem2}}\",\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{estLineamount2}}\",\r\n \"type\": \"GST\",\r\n \"amount\": \"585.6\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 10012.3,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Revision Estimate - Validation error - Estimate is already in workflow", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Estimate is already in workflow\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_ESTIMATE\");\r", " pm.expect(message).to.eql(\"Estimate is already in workflow\");\r", " }\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"businessService\": \"REVISION-ESTIMATE\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250.28\",\r\n \"noOfunit\": \"13\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{estLineamount1}}\",\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3253.6\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{estLineamount2}}\",\r\n \"type\": \"GST\",\r\n \"amount\": \"585.6\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 10012.3,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Create Revision Estimate - Validation error - Estimate number is mandatory", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Estimate number is mandatory for revision estimate\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_ESTIMATE\");\r", " pm.expect(message).to.eql(\"Estimate number is mandatory for revision estimate\");\r", " }\r", ");" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n // \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"businessService\": \"{{buisnessService}}\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"previousLineItemId\": \"{{estLineitem1}}\",\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250.28\",\r\n \"noOfunit\": \"13\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{estLineamount1}}\",\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3253.6\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"previousLineItemId\": \"{{estLineitem2}}\",\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{estLineamount2}}\",\r\n \"type\": \"GST\",\r\n \"amount\": \"585.6\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 10012.3,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"40e3b45a-0f64-4e8c-8768-aab82c095b2d\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"40e3b45a-0f64-4e8c-8768-aab82c095b2d\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694064135997|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Update Revision Estimate - Success WF Send back", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Send back\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORCORRECTION\");\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{Re-estimateAll}},\r\n \"workflow\": {\r\n \"action\": \"SENDBACK\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Revision Estimate - Success Edit and Re-submit", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Re-Submit\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORVERIFICATION\");\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{Re-estimateAll}},\r\n \"workflow\": {\r\n \"action\": \"RE-SUBMIT\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Revision Estimate - Success Verify and forward Copy", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Verified\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORTECHNICALSANCTION\");\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\":{{Re-estimateAll}},\r\n \"workflow\": {\r\n \"action\": \"VERIFYANDFORWARD\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Revision Estimate - Success Technical sanctioned", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Technical Sanctioned\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"PENDINGFORAPPROVAL\");\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\":{{Re-estimateAll}},\r\n \"workflow\": {\r\n \"action\": \"TECHNICALSANCTION\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Update Revision Estimate - Success Approved", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"estimate's workflow status is Approved\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.estimates[0].wfStatus).eq(\"APPROVED\");\r", "});\r", "\r", "\r", "" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {{Re-estimateAll}},\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Create Revision Estimate - Validation error - Previous line item id is not correct", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Previous Line Id is invalid for revision estimate\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " console.log(message);\r", " pm.expect(code).to.eql(\"INVALID_PREVIOUS_LINE_ITEM_ID\");\r", " pm.expect(message).to.eql(\"Previous Line Id is invalid for revision estimate\");\r", " }\r", ");" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "// Add a delay of 500 milliseconds (adjust the value as needed)", "setTimeout(function() {", " // Your script logic here", " console.log(\"Delay complete!\");", "}, 500);", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"businessService\": \"{{buisnessService}}\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"{{tenantId}}\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"previousLineItemId\": \"94a89f18-5443-40b3-a0bb-6309079777\",\r\n \"sorId\": 45,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": \"250.28\",\r\n \"noOfunit\": \"13\",\r\n \"uom\": \"KG\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": \"3253.6\",\r\n \"additionalDetails\": {}\r\n }\r\n ]\r\n },\r\n {\r\n \"previousLineItemId\": \"{{estLineitem2}}\",\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"amountDetail\": [\r\n {\r\n \"type\": \"GST\",\r\n \"amount\": \"585.6\"\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"{{dateOfProposal}}\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\r\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"Muster-roll-MR_2023-24_06_08_000427.pdf\",\r\n \"fileStoreId\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"documentUid\": \"652d5212-477d-4c98-8deb-599f3e5f16a8\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"WorkOrder (3).pdf\",\r\n \"fileStoreId\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"documentUid\": \"e29bd685-a6dc-420f-8c22-59dc4061689a\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 10012.3,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SUBMIT\",\r\n \"assignees\": [\r\n \"40e3b45a-0f64-4e8c-8768-aab82c095b2d\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_create", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_create" ] } }, "response": [] }, { "name": "Update Revision Estimate - Validation Error - Revision number is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is not successful\", () =>\r", " pm.expect(pm.response.to.have.status(400))\r", ");\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_REVISION_NUMBER\");\r", " pm.expect(message).to.eql(\"Revision number is mandatory for revision estimate\");\r", "}\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"estimate\": {\r\n \"id\": \"{{estimateId}}\",\r\n \"estimateNumber\": \"{{estimateNumber}}\",\r\n // \"revisionNumber\": \"{{revNo-WO}}\",\r\n \"businessService\": \"{{buisnessService}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"status\": \"ACTIVE\",\r\n \"wfStatus\": \"CREATED\",\r\n \"name\": \"{{randomWord}}\",\r\n \"description\": \"{{randomWord}}\",\r\n \"executingDepartment\": \"WRK\",\r\n \"address\": {\r\n \"id\": \"{{PJ-addressid}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"clientReferenceId\": null,\r\n \"doorNo\": null,\r\n \"latitude\": 0,\r\n \"longitude\": 0,\r\n \"locationAccuracy\": 0,\r\n \"type\": null,\r\n \"addressLine1\": null,\r\n \"addressLine2\": null,\r\n \"landmark\": null,\r\n \"city\": \"pg.citya\",\r\n \"pincode\": null,\r\n \"buildingName\": null,\r\n \"street\": null,\r\n \"boundaryType\": \"{{boundaryType}}\",\r\n \"boundary\": \"{{boundary}}\",\r\n \"locality\": null\r\n },\r\n \"estimateDetails\": [\r\n {\r\n \"id\": \"{{Lineitem1}}\",\r\n \"previousLineItemId\": \"{{prevEstLineitem1}}\",\r\n \"sorId\": \"45\",\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"description\": \"Testing 01\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"uom\": \"KG\",\r\n \"uomValue\": null,\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{Lineamount1}}\",\r\n \"type\": \"EstimatedAmount\",\r\n \"amount\": 3253.6,\r\n \"isActive\": true,\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"isActive\": true,\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{Lineitem2}}\",\r\n \"previousLineItemId\": \"{{prevEstLineitem2}}\",\r\n \"sorId\": null,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"unitRate\": null,\r\n \"noOfunit\": null,\r\n \"uom\": null,\r\n \"uomValue\": null,\r\n \"amountDetail\": [\r\n {\r\n \"id\": \"{{Lineamount2}}\",\r\n \"type\": \"GST\",\r\n \"amount\": 585.6,\r\n \"isActive\": true,\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"isActive\": true,\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"percentage\": \"18 %\",\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"description\": \"Goods and Service Tax\",\r\n \"active\": true,\r\n \"isAutoCalculated\": true,\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"isWorkOrderValue\": true,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"effectiveTo\": null,\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\"\r\n },\r\n \"amount\": \"585.6\"\r\n }\r\n }\r\n }\r\n ],\r\n \"additionalDetails\": {\r\n \"documents\": [\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_LABOUR_ANALYSIS\"\r\n },\r\n {\r\n \"fileName\": \"{{fileName}}\",\r\n \"fileStoreId\": \"{{fileStoreId}}\",\r\n \"documentUid\": \"{{fileStoreId}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"fileType\": \"ESTIMATE_DOC_MATERIAL_ANALYSIS\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"labourMaterialAnalysis\": {\r\n \"labour\": \"50\",\r\n \"material\": \"50\"\r\n },\r\n \"creator\": \"SMS QA testing\",\r\n \"location\": {\r\n \"locality\": \"B1\",\r\n \"ward\": \"B1\",\r\n \"city\": \"{{tenantId}}\"\r\n },\r\n \"ward\": \"B1\",\r\n \"locality\": \"SUN01\",\r\n \"projectNumber\": \"{{PJNo-est}}\",\r\n \"totalEstimatedAmount\": 3839.2,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"projectName\": \"{{randomWord}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"msgId\": \"1694085272328|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_update", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_update" ] } }, "response": [] }, { "name": "Search Estimate - Success - RevisionNumber", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var estimateNumber = res.estimates[0].estimateNumber;\r", " pm.expect(estimateNumber).to.eql(pm.collectionVariables.get(\"estimateNumber\"));\r", " }\r", ");\r", "" ], "type": "text/javascript" } }, { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"apiOperation\": \"SEARCH\"\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/estimate/v1/_search?tenantId={{tenantId}}&revisionNumber={{revNo-WO}}", "host": [ "{{base_url}}" ], "path": [ "estimate", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" }, { "key": "revisionNumber", "value": "{{revNo-WO}}" } ] } }, "response": [] } ] }, { "name": "Contract Service Test Script", "item": [ { "name": "Create Contrat -Success", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"RequestInfo is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " pm.expect(req.RequestInfo).to.not.be.null;\r", " pm.expect(req.RequestInfo).to.not.be.undefined;\r", "});\r", "\r", "pm.test(\"TenantId is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " var contract = req.contract;\r", " pm.expect(contract.tenantId).to.not.be.null;\r", " pm.expect(contract.tenantId).to.not.be.undefined;\r", " pm.expect(contract.tenantId).to.not.eql(\"\"); \r", "});\r", "\r", "pm.test(\"print and save ContractId in environment\", function () {\r", " var res = pm.response.json();\r", " var WOId = res.contracts[0].id;\r", " console.log('id:', WOId);\r", " pm.environment.set('WOId',WOId);\r", "}\r", ");\r", "\r", "pm.test(\"print and save ContractNumber in environment\", function () {\r", " var res = pm.response.json();\r", " var WONo = res.contracts[0].contractNumber;\r", " console.log('contractNumber:', WONo);\r", " pm.environment.set('WONo',WONo);\r", "}\r", ");\r", "\r", "let responseData = pm.response.json();\r", "\r", "//Storing the response data into collection variable to reuse\r", "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200)));\r", "\r", "pm.collectionVariables.set(\"lineitem1\", responseData.contracts[0].lineItems[0].id);\r", "\r", "pm.collectionVariables.set(\"lineamount1\", responseData.contracts[0].lineItems[0].amountBreakups[0].id);\r", "\r", "pm.collectionVariables.set(\"lineitem2\", responseData.contracts[0].lineItems[1].id);\r", "\r", "pm.collectionVariables.set(\"lineamount2\", responseData.contracts[0].lineItems[1].amountBreakups[0].id);\r", "\r", "pm.collectionVariables.set(\"ward\", responseData.contracts[0].additionalDetails.ward);\r", "\r", "pm.collectionVariables.set(\"locality\", responseData.contracts[0].additionalDetails.locality);\r", "\r", "pm.collectionVariables.set(\"ContractId\", responseData.contracts[0].id);\r", "\r", "pm.collectionVariables.set(\"ContractNumber\", responseData.contracts[0].contractNumber);\r", "\r", "pm.collectionVariables.set(\"createdTime\", (responseData.contracts[0].auditDetails.createdTime));\r", "\r", "pm.collectionVariables.set(\"lastModifiedTime\", (responseData.contracts[0].auditDetails.lastModifiedTime));\r", "\r", "pm.collectionVariables.set(\"wfStatus\", responseData.contracts[0].wfStatus);\r", "\r", "pm.collectionVariables.set(\"contractType\", responseData.contracts[0].contractType);\r", "\r", "pm.collectionVariables.set(\"orgId\", responseData.contracts[0].orgId);\r", "\r", "pm.collectionVariables.set(\"orgName\", responseData.contracts[0].additionalDetails.orgName);\r", "\r", "pm.collectionVariables.set(\"cboOrgNumber\", responseData.contracts[0].additionalDetails.cboOrgNumber);\r", "\r", "pm.collectionVariables.set (\"completionPeriod\", responseData.contracts[0].completionPeriod);\r", "\r", "// Get the current date in milliseconds\r", "var currentDateMillis = new Date().getTime();\r", "\r", "// Store the current date in milliseconds in the environment\r", "pm.environment.set(\"currentDateMillis\", currentDateMillis);\r", "\r", "// Get the completion period from the collection variables\r", "var completionPeriodDays = pm.collectionVariables.get(\"completionPeriod\");\r", "\r", "// Check if the completionPeriodDays is a valid number\r", "if (!isNaN(completionPeriodDays)) {\r", " // Calculate the end date by adding the completion period to the current date\r", " var endDateMillis = currentDateMillis + (completionPeriodDays * 24 * 60 * 60 * 1000);\r", "\r", " // Set the end date as an environment variable for future use\r", " pm.environment.set(\"endDateMillis\", endDateMillis);\r", "\r", " // Log the end date in milliseconds\r", " console.log(\"End Date in Milliseconds: \" + endDateMillis);\r", "} else {\r", " console.log(\"Invalid completion period value. Please set a valid number in the collection variable 'completionPeriod'.\");\r", "}\r", "" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "exec": [ "pm.collectionVariables.set(\"orgIdqa\",\"c5885e80-f2ec-49c2-be5c-02295d5e3f79\")\r", "pm.collectionVariables.set(\"orgIdDev\",\"035a20d7-e5be-4fb2-97c4-9c441d8bd8b6\")" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgIdqa}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SUPERUSERA\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"org-Test\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"org-TestTest\",\r\n \"cboCode\": \"{{orgIdqa}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSERA\",\r\n \"name\": \"SUPERUSERA\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000017\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"{{empUserId}}\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {{userinfo}},\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [ { "name": "Create Contrat -Success", "originalRequest": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"Automation CBO\",\r\n \"cboCode\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"ccc05cbc-6430-4bcd-95ac-fab4c9e66385\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "status": "OK", "code": 200, "_postman_previewlanguage": "json", "header": [ { "key": "Date", "value": "Fri, 08 Sep 2023 11:54:34 GMT" }, { "key": "Content-Type", "value": "application/json" }, { "key": "Transfer-Encoding", "value": "chunked" }, { "key": "Connection", "value": "keep-alive" }, { "key": "Vary", "value": "Accept-Encoding" }, { "key": "Strict-Transport-Security", "value": "max-age=63072000; includeSubdomains; preload" }, { "key": "X-Lua-Resty-WAF-ID", "value": "6e2ba8165f1f919f0366" }, { "key": "x-correlation-id", "value": "4b26bd85-1fb5-4840-8349-7c02bc00045a" }, { "key": "Cache-Control", "value": "no-cache, no-store, max-age=0, must-revalidate" }, { "key": "Content-Security-Policy", "value": "default-src 'self' https: 'unsafe-eval' 'unsafe-inline'; object-src 'none'; img-src 'self' https: data: blob:; style-src https: blob: 'unsafe-inline'; worker-src 'self' blob:; font-src 'self' https: data: blob:; child-src 'self' https: data: blob:;" }, { "key": "Referrer-Policy", "value": "no-referrer-when-downgrade" }, { "key": "X-Content-Type-Options", "value": "nosniff" }, { "key": "X-Download-Options", "value": "noopen" }, { "key": "X-Frame-Options", "value": "sameorigin" }, { "key": "X-XSS-Protection", "value": "1" }, { "key": "Content-Encoding", "value": "gzip" } ], "cookie": [], "body": "{\n \"ResponseInfo\": {\n \"apiId\": \"Rainmaker\",\n \"ver\": null,\n \"ts\": null,\n \"resMsgId\": \"uief87324\",\n \"msgId\": \"1694151844714|en_IN\",\n \"status\": \"successful\"\n },\n \"contracts\": [\n {\n \"id\": \"e8ff7fc1-2869-4dc8-a9fe-9ee6e8167445\",\n \"contractNumber\": \"WO/2023-24/000339\",\n \"supplementNumber\": null,\n \"versionNumber\": null,\n \"oldUuid\": null,\n \"businessService\": null,\n \"tenantId\": \"pg.citya\",\n \"wfStatus\": \"PENDING_FOR_VERIFICATION\",\n \"executingAuthority\": \"IA\",\n \"contractType\": \"CON-01\",\n \"totalContractedAmount\": 10012,\n \"securityDeposit\": 0,\n \"agreementDate\": 0,\n \"issueDate\": null,\n \"defectLiabilityPeriod\": 0,\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\n \"startDate\": 0,\n \"endDate\": 0,\n \"completionPeriod\": 30,\n \"status\": \"INWORKFLOW\",\n \"lineItems\": [\n {\n \"id\": \"fa204bfb-51f2-48b7-9f8a-21c78500b3df\",\n \"estimateId\": \"c4270493-354d-469b-a6ee-068bce075341\",\n \"estimateLineItemId\": \"8799c513-9dec-483a-9513-376dbaac950c\",\n \"tenantId\": \"pg.citya\",\n \"unitRate\": 250.28,\n \"noOfunit\": 13,\n \"category\": \"NON-SOR\",\n \"name\": \"Testing 01\",\n \"status\": \"ACTIVE\",\n \"amountBreakups\": [\n {\n \"id\": \"c8829791-a338-4d5d-8921-cb9ac3ef6ffb\",\n \"estimateAmountBreakupId\": \"a0fa29ab-40b8-4442-93b0-81cbd2981555\",\n \"amount\": 3253.6,\n \"status\": \"ACTIVE\",\n \"additionalDetails\": null\n }\n ],\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1694174074572,\n \"lastModifiedTime\": 1694174074572\n },\n \"additionalDetails\": null\n },\n {\n \"id\": \"bfd793c4-8ed0-4c21-8b45-0db5963d16a1\",\n \"estimateId\": \"c4270493-354d-469b-a6ee-068bce075341\",\n \"estimateLineItemId\": \"cee4dc24-32d0-4cd7-90ae-4b177e6fc670\",\n \"tenantId\": \"pg.citya\",\n \"unitRate\": 0,\n \"noOfunit\": 0,\n \"category\": \"OVERHEAD\",\n \"name\": \"GST\",\n \"status\": \"ACTIVE\",\n \"amountBreakups\": [\n {\n \"id\": \"cb6624f1-ec2b-4eaa-9666-fe01294a67a2\",\n \"estimateAmountBreakupId\": \"a154eba1-4c17-44b8-a709-2fdddbe5f5cc\",\n \"amount\": 585.6,\n \"status\": \"ACTIVE\",\n \"additionalDetails\": null\n }\n ],\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1694174074572,\n \"lastModifiedTime\": 1694174074572\n },\n \"additionalDetails\": {\n \"row\": {\n \"name\": {\n \"id\": \"2\",\n \"code\": \"GST\",\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\n \"type\": \"percentage\",\n \"value\": \"18\",\n \"active\": true,\n \"description\": \"Goods and Service Tax\",\n \"effectiveTo\": null,\n \"effectiveFrom\": \"1694172775346\",\n \"isAutoCalculated\": true,\n \"isWorkOrderValue\": true\n },\n \"amount\": \"585.6\",\n \"percentage\": \"18 %\"\n }\n }\n }\n ],\n \"documents\": [],\n \"processInstance\": {\n \"id\": \"d6ae1ab9-7c0e-4dd4-b70e-5acebdd41271\",\n \"tenantId\": \"pg.citya\",\n \"businessService\": \"CONTRACT\",\n \"businessId\": \"WO/2023-24/000339\",\n \"action\": \"CREATE\",\n \"moduleName\": \"contract-service\",\n \"state\": {\n \"auditDetails\": {\n \"createdBy\": \"01203742-db1a-4256-a935-f767635e2ef7\",\n \"lastModifiedBy\": \"01203742-db1a-4256-a935-f767635e2ef7\",\n \"createdTime\": 1684756438010,\n \"lastModifiedTime\": 1684756438010\n },\n \"uuid\": \"061ae74c-ffc8-4102-8f0c-9483dc065a90\",\n \"tenantId\": \"pg\",\n \"businessServiceId\": \"2b74eff6-b77a-4cbe-a4b5-097ef6bbb9e9\",\n \"sla\": 172800000,\n \"state\": \"PENDING_FOR_VERIFICATION\",\n \"applicationStatus\": \"INWORKFLOW\",\n \"docUploadRequired\": false,\n \"isStartState\": false,\n \"isTerminateState\": false,\n \"isStateUpdatable\": true,\n \"actions\": [\n {\n \"auditDetails\": {\n \"createdBy\": \"01203742-db1a-4256-a935-f767635e2ef7\",\n \"lastModifiedBy\": \"01203742-db1a-4256-a935-f767635e2ef7\",\n \"createdTime\": 1684756438010,\n \"lastModifiedTime\": 1684756438010\n },\n \"uuid\": \"3948b6fd-2c7e-4bda-bcb5-864068554e0e\",\n \"tenantId\": \"pg\",\n \"currentState\": \"061ae74c-ffc8-4102-8f0c-9483dc065a90\",\n \"action\": \"SEND_BACK\",\n \"nextState\": \"e773d1dc-4ed1-4c44-985e-60c60adaf919\",\n \"roles\": [\n \"WORK_ORDER_VERIFIER\"\n ]\n },\n {\n \"auditDetails\": {\n \"createdBy\": \"01203742-db1a-4256-a935-f767635e2ef7\",\n \"lastModifiedBy\": \"01203742-db1a-4256-a935-f767635e2ef7\",\n \"createdTime\": 1684756438010,\n \"lastModifiedTime\": 1684756438010\n },\n \"uuid\": \"bd1b5cfb-ca8a-4a83-b12e-5a4d8fbe0fa7\",\n \"tenantId\": \"pg\",\n \"currentState\": \"061ae74c-ffc8-4102-8f0c-9483dc065a90\",\n \"action\": \"VERIFY_AND_FORWARD\",\n \"nextState\": \"9f8ff734-4f05-4d4a-9e8d-3721183c531e\",\n \"roles\": [\n \"WORK_ORDER_VERIFIER\"\n ]\n }\n ]\n },\n \"comment\": null,\n \"documents\": null,\n \"assignes\": [\n {\n \"id\": 444,\n \"userName\": \"SMS QA testing\",\n \"name\": \"SMS QA testing\",\n \"type\": \"EMPLOYEE\",\n \"mobileNumber\": \"9043685314\",\n \"emailId\": \"\",\n \"roles\": [\n {\n \"id\": null,\n \"name\": \"HRMS Admin\",\n \"code\": \"HRMS_ADMIN\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"WORK_ORDER_VIEWER\",\n \"code\": \"WORK_ORDER_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"BILL_ACCOUNTANT\",\n \"code\": \"BILL_ACCOUNTANT\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"WORK ORDER CREATOR\",\n \"code\": \"WORK_ORDER_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"ESTIMATE VERIFIER\",\n \"code\": \"ESTIMATE_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"BILL_VERIFIER\",\n \"code\": \"BILL_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"ESTIMATE APPROVER\",\n \"code\": \"ESTIMATE_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"Organization viewer\",\n \"code\": \"ORG_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"WORK ORDER VERIFIER\",\n \"code\": \"WORK_ORDER_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"PROJECT VIEWER\",\n \"code\": \"PROJECT_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"BILL_APPROVER\",\n \"code\": \"BILL_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"MUSTER ROLL VERIFIER\",\n \"code\": \"MUSTER_ROLL_VERIFIER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"OFFICER IN CHARGE\",\n \"code\": \"OFFICER_IN_CHARGE\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"PROJECT CREATOR\",\n \"code\": \"PROJECT_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"Employee Common\",\n \"code\": \"EMPLOYEE_COMMON\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"BILL_VIEWER\",\n \"code\": \"BILL_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"TECHNICAL SANCTIONER\",\n \"code\": \"TECHNICAL_SANCTIONER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"BILL_CREATOR\",\n \"code\": \"BILL_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"MUSTER ROLL APPROVER\",\n \"code\": \"MUSTER_ROLL_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"ESTIMATE VIEWER\",\n \"code\": \"ESTIMATE_VIEWER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"WORK ORDER APPROVER\",\n \"code\": \"WORK_ORDER_APPROVER\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"ESTIMATE CREATOR\",\n \"code\": \"ESTIMATE_CREATOR\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"State Dashboard Admin\",\n \"code\": \"STADMIN\",\n \"tenantId\": \"pg.citya\"\n },\n {\n \"id\": null,\n \"name\": \"MUKTA Admin\",\n \"code\": \"MUKTA_ADMIN\",\n \"tenantId\": \"pg.citya\"\n }\n ],\n \"tenantId\": \"pg.citya\",\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\n }\n ]\n },\n \"auditDetails\": {\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\n \"createdTime\": 1694174074572,\n \"lastModifiedTime\": 1694174074572\n },\n \"additionalDetails\": {\n \"officerInChargeId\": \"SMS QA testing\",\n \"projectType\": \"CPS-CWS\",\n \"ward\": \"B1\",\n \"projectName\": \"tramelled\",\n \"orgName\": \"Automation CBO\",\n \"projectId\": \"PJ/2023-24/09/000898\",\n \"estimateDocs\": [\n {\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\",\n \"tenantId\": \"pg.citya\",\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\"\n },\n {\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\",\n \"tenantId\": \"pg.citya\",\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\"\n },\n {\n \"fileName\": \"WorkOrder-WO_2023-24_000266 (2).pdf\",\n \"fileType\": \"ESTIMATE_DOC_DETAILED_ESTIMATE\",\n \"tenantId\": \"pg.citya\",\n \"documentUid\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\",\n \"fileStoreId\": \"8234d8ef-73d7-4986-b5af-c557a6436c94\"\n },\n {\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\n },\n {\n \"fileName\": \"\",\n \"fileType\": \"Others\"\n }\n ],\n \"cboName\": \"Automation CBO\",\n \"cboCode\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\n \"totalEstimatedAmount\": 10012,\n \"termsAndConditions\": [\n {\n \"description\": \"\"\n }\n ],\n \"locality\": \"SUN01\",\n \"estimateNumber\": \"ES/2023-24/000792\",\n \"officerInChargeDesgn\": \"Executive Engineer\",\n \"officerInChargeName\": {\n \"code\": \"SMS QA testing\",\n \"name\": \"SMS QA testing\"\n },\n \"projectDesc\": \"tramelled\",\n \"cboOrgNumber\": \"ORG-000220\"\n }\n }\n ],\n \"pagination\": null\n}" } ] }, { "name": "Create Contract - Validation error - Contract is required", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"CONTRACT\");\r", " pm.expect(message).to.eql(\"Contract is mandatory\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n // \"contract\": {\r\n // \"tenantId\": \"{{tenantId}}\",\r\n // \"wfStatus\": \"string\",\r\n // \"executingAuthority\": \"IA\",\r\n // \"contractType\": \"CON-01\",\r\n // \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n // \"securityDeposit\": 0,\r\n // \"agreementDate\": 0,\r\n // \"defectLiabilityPeriod\": 0,\r\n // \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n // \"startDate\": 0,\r\n // \"endDate\": 0,\r\n // \"status\": \"ACTIVE\",\r\n // \"completionPeriod\": \"30\",\r\n // \"lineItems\": [\r\n // {\r\n // \"estimateId\": \"{{estId-WO}}\",\r\n // \"tenantId\": \"{{tenantId}}\",\r\n // \"status\": \"ACTIVE\",\r\n // \"additionalDetails\": {}\r\n // }\r\n // ],\r\n // \"documents\": [],\r\n // \"processInstance\": null,\r\n // \"additionalDetails\": {\r\n // \"officerInChargeId\": \"SMS QA testing\",\r\n // \"projectType\": \"{{projectType}}\",\r\n // \"ward\": \"B1\",\r\n // \"projectName\": \"{{randomWord}}\",\r\n // \"orgName\": \"Automation CBO\",\r\n // \"projectId\": \"{{PJNo-est}}\",\r\n // \"estimateDocs\": [\r\n // {\r\n // \"fileName\": \"{{estfileName}}\",\r\n // \"fileType\": \"{{estfileType}}\",\r\n // \"tenantId\": \"{{tenantId}}\",\r\n // \"documentUid\": \"{{estfileStoreId}}\",\r\n // \"fileStoreId\": \"{{estfileStoreId}}\"\r\n // },\r\n // {\r\n // \"fileName\": \"{{estfileName}}\",\r\n // \"fileType\": \"{{estfileType}}\",\r\n // \"tenantId\": \"{{tenantId}}\",\r\n // \"documentUid\": \"{{estfileStoreId}}\",\r\n // \"fileStoreId\": \"{{estfileStoreId}}\"\r\n // },\r\n // {\r\n // \"fileName\": \"{{estfileName}}\",\r\n // \"fileType\": \"{{estfileType}}\",\r\n // \"tenantId\": \"{{tenantId}}\",\r\n // \"documentUid\": \"{{estfileStoreId}}\",\r\n // \"fileStoreId\": \"{{estfileStoreId}}\"\r\n // },\r\n // {\r\n // \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n // },\r\n // {\r\n // \"fileName\": \"\",\r\n // \"fileType\": \"Others\"\r\n // }\r\n // ],\r\n // \"cboName\": \"Automation CBO\",\r\n // \"cboCode\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n // \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n // \"termsAndConditions\": [\r\n // {\r\n // \"description\": \"\"\r\n // }\r\n // ],\r\n // \"locality\": \"SUN01\",\r\n // \"estimateNumber\": \"{{estNo-WO}}\",\r\n // \"officerInChargeDesgn\": \"Executive Engineer\",\r\n // \"officerInChargeName\": {\r\n // \"code\": \"SMS QA testing\",\r\n // \"name\": \"SMS QA testing\"\r\n // },\r\n // \"projectDesc\": \"{{randomWord}}\",\r\n // \"cboOrgNumber\": \"ORG-000220\"\r\n // }\r\n // },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - TenantId is required", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"NotNull.contractRequest.contract.tenantId\");\r", " pm.expect(message).to.eql(\"must not be null\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n // \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgId}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"{{ward}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"{{orgName}}\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - ExecutingAuthority is required", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"NotNull.contractRequest.contract.executingAuthority\");\r", " pm.expect(message).to.eql(\"must not be null\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n // \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - ExecutingAuthority is invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_EXECUTING_AUTHORITY\");\r", " pm.expect(message).to.eql(\"Invalid Executing Authority [abc]\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"abc\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - ContractType is required", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"CONTRACT.CONTRACTTYPE\");\r", " pm.expect(message).to.eql(\"Contract Type is mandatory\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n // \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - ContractType is invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_CONTRACT_TYPE\");\r", " pm.expect(message).to.eql(\"Invalid Contract Type [abc]\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"abc\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - OrgId is required", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"CONTRACT.ORGNISATIONID\");\r", " pm.expect(message).to.eql(\"OrgnisationId is mandatory\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n // \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - OrgId is invalid", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_ORGID\");\r", " pm.expect(message).to.eql(\"Org [ad71b04745e4] is not present\");\r", " }\r", ");" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\":{\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SUPERUSERA\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"org-Test\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"org-TestTest\",\r\n \"cboCode\": \"{{orgIdqa}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSERA\",\r\n \"name\": \"SUPERUSERA\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000017\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {{userinfo}},\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - CompletionPeriod is required", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"CONTRACT.COMPLETION_PERIOD\");\r", " pm.expect(message).to.eql(\"Completion Period is mandatory and its min value is one day\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n // \"completionPeriod\": \"30\",\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Create Contract - Validation error - CompletionPeriod is zero", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"CONTRACT.COMPLETION_PERIOD\");\r", " pm.expect(message).to.eql(\"Completion Period is mandatory and its min value is one day\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"string\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"CON-01\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"9583cf0e-c7ae-4ca3-be3a-ad71b04745e4\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"status\": \"ACTIVE\",\r\n \"completionPeriod\": 0,\r\n \"lineItems\": [\r\n {\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": {}\r\n }\r\n ],\r\n \"documents\": [],\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"ward\": \"B1\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"orgName\": \"Automation CBO\",\r\n \"projectId\": \"{{PJNo-est}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"cboName\": \"{{orgName}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}},\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"locality\": \"SUN01\",\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"cboOrgNumber\": \"ORG-000220\"\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"CREATE\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694151844714|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_create", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_create" ] } }, "response": [] }, { "name": "Update Contract - Success - WF Send back", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Contract's workflow status is Send Back\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.contracts[0].wfStatus).eq(\"PENDING_FOR_CORRECTION\");\r", "});" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"supplementNumber\": null,\r\n \"versionNumber\": 0,\r\n \"oldUuid\": null,\r\n \"businessService\": null,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"issueDate\": null,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgId}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"status\": \"INWORKFLOW\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\",\r\n \"amount\": {{totalEstimatedAmount}},\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 0.0,\r\n \"noOfunit\": 0.0,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\",\r\n \"amount\": 585.6,\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"active\": true,\r\n \"description\": \"Goods and Service Tax\",\r\n \"effectiveTo\": null,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"isAutoCalculated\": true,\r\n \"isWorkOrderValue\": true\r\n },\r\n \"amount\": \"585.6\",\r\n \"percentage\": \"18 %\"\r\n }\r\n }\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"ward\": \"{{ward}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeId\": \"SUPERUSER\",\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSER\",\r\n \"name\": \"SUPERUSER\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}}\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"SEND_BACK\"\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {{userinfo}},\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "Update Contract - Success - WF Edit and Re-submit", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Contract's workflow status is Edit and Resubmit\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.contracts[0].wfStatus).eq(\"PENDING_FOR_VERIFICATION\");\r", "});" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"supplementNumber\": null,\r\n \"versionNumber\": 0,\r\n \"oldUuid\": null,\r\n \"businessService\": null,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"issueDate\": null,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgId}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"status\": \"INWORKFLOW\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\",\r\n \"amount\": {{totalEstimatedAmount}},\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 0.0,\r\n \"noOfunit\": 0.0,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\",\r\n \"amount\": 585.6,\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"active\": true,\r\n \"description\": \"Goods and Service Tax\",\r\n \"effectiveTo\": null,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"isAutoCalculated\": true,\r\n \"isWorkOrderValue\": true\r\n },\r\n \"amount\": \"585.6\",\r\n \"percentage\": \"18 %\"\r\n }\r\n }\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"ward\": \"{{ward}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeId\": \"SUPERUSER\",\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSER\",\r\n \"name\": \"SUPERUSER\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}}\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"EDIT\",\r\n \"assignees\": [\r\n \"{{empUserId}}\"\r\n ]\r\n},\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {{userinfo}},\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "Update Contract - Success - WF Verify and Forwarded", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Contract's workflow status is Verify and Forwarded\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.contracts[0].wfStatus).eq(\"PENDING_FOR_APPROVAL\");\r", "});" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"supplementNumber\": null,\r\n \"versionNumber\": 0,\r\n \"oldUuid\": null,\r\n \"businessService\": null,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"issueDate\": null,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgId}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"status\": \"INWORKFLOW\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\",\r\n \"amount\": {{totalEstimatedAmount}},\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 0.0,\r\n \"noOfunit\": 0.0,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\",\r\n \"amount\": 585.6,\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"active\": true,\r\n \"description\": \"Goods and Service Tax\",\r\n \"effectiveTo\": null,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"isAutoCalculated\": true,\r\n \"isWorkOrderValue\": true\r\n },\r\n \"amount\": \"585.6\",\r\n \"percentage\": \"18 %\"\r\n }\r\n }\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"ward\": \"{{ward}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeId\": \"SUPERUSER\",\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSER\",\r\n \"name\": \"SUPERUSER\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}}\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"VERIFY_AND_FORWARD\",\r\n \"assignees\": [\r\n \"{{empUserId}}\"\r\n ]\r\n},\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {{userinfo}},\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "Update Contract - Success - WF Approved", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Contract's workflow status is Approved\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.contracts[0].wfStatus).eq(\"PENDING_FOR_ACCEPTANCE\");\r", "});" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"supplementNumber\": null,\r\n \"versionNumber\": 0,\r\n \"oldUuid\": null,\r\n \"businessService\": null,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"issueDate\": null,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgId}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"status\": \"INWORKFLOW\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\",\r\n \"amount\": {{totalEstimatedAmount}},\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 0.0,\r\n \"noOfunit\": 0.0,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\",\r\n \"amount\": 585.6,\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"active\": true,\r\n \"description\": \"Goods and Service Tax\",\r\n \"effectiveTo\": null,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"isAutoCalculated\": true,\r\n \"isWorkOrderValue\": true\r\n },\r\n \"amount\": \"585.6\",\r\n \"percentage\": \"18 %\"\r\n }\r\n }\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"auditDetails\": {\r\n \"createdBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"lastModifiedBy\": \"71d23f7e-30c9-4ba4-b81b-e1862cd3fd9d\",\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"ward\": \"{{ward}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeId\": \"SUPERUSER\",\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSER\",\r\n \"name\": \"SUPERUSER\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}}\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n},\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\":{{userinfo}},\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "CBO Auth Token", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>", " pm.expect(pm.response.to.have.status(200))", ");", "", "pm.test(\"Change auth token for workflow accept\", function () {", " let responseData = pm.response.json();", " var token = responseData.access_token;", " pm.environment.set('token', token);", " ", " var userRequestBody =responseData.UserRequest;", "", "// Store the response body in an environment variable", " pm.environment.set(\"cboUser\", JSON.stringify(userRequestBody));", " var cboUid = responseData.UserRequest.uuid;", " pm.environment.set(\"cboUid\",cboUid);", "});" ], "type": "text/javascript", "packages": {} } }, { "listen": "prerequest", "script": { "packages": {}, "type": "text/javascript" } } ], "request": { "method": "POST", "header": [ { "key": "authority", "value": "unified-dev.digit.org", "uuid": "e9f6e603-a6d0-4a78-ae49-50e401844a85" }, { "key": "accept", "value": "*/*", "uuid": "f5959164-4afd-4338-b960-3509c45d4dc7" }, { "key": "accept-language", "value": "en-GB,en-US;q=0.9,en;q=0.8", "uuid": "7b66ecfe-5e72-41df-b460-81110d433982" }, { "key": "access-control-allow-origin", "value": "*", "uuid": "a90be3c1-e994-4bda-aed7-e89325ef6c4f" }, { "key": "authorization", "value": "Basic ZWdvdi11c2VyLWNsaWVudDo=", "uuid": "b21744be-c070-4fbb-93a4-f0c790f1d57e" }, { "key": "cookie", "value": "_ga_2E44ZSYXS7=GS1.1.1693551022.10.0.1693551537.0.0.0; _ga=GA1.1.1506416593.1687179320; _ga_P1TZCPKF6S=GS1.1.1695629661.2.0.1695629664.57.0.0; _ga_H9YC8FEN6F=GS1.1.1696831541.125.1.1696831564.37.0.0; io=f_4QRb-VaOOVAUJ0AAAB; locale=en_IN; PGADMIN_LANGUAGE=en; _ga_XBQP06FR8V=GS1.1.1700469736.4.0.1700469739.57.0.0; _oauth2_proxy=eyJFbWFpbCI6ImFuc2guZ295YWxAZWdvdmVybm1lbnRzLm9yZyIsIlVzZXIiOiJhbnNoLWVnb3YifQ==|1700724084|8Aayfxx0DRsJ4Lgw6jJiVnYjs_k=; __cuid=44ff2be0a12e4499973904b80d92ef3d; _ga_6130JJKLD4=GS1.1.1701163100.2.1.1701163237.24.0.0; amp_fef1e8=21a46ed7-716d-4b59-aa13-c513dd00a213R...1hgajhup1.1hgajq2p8.la.48.pi", "uuid": "76c8a72a-c736-4264-a439-2fd5eb3eff70" }, { "key": "origin", "value": "https://unified-dev.digit.org", "uuid": "f96cb6c7-03e3-4cbb-9f97-d1fc1a15f734" }, { "key": "referer", "value": "https://unified-dev.digit.org/works-shg-app/otp", "uuid": "ef08808e-eac9-4581-8156-444c7a7ce30a" }, { "key": "sec-ch-ua", "value": "\"Chromium\";v=\"118\", \"Google Chrome\";v=\"118\", \"Not=A?Brand\";v=\"99\"", "uuid": "9a1f5541-3227-4dc3-a66a-c520b3e906a6" }, { "key": "sec-ch-ua-mobile", "value": "?0", "uuid": "0910350c-b0bf-41e3-80cf-5af5518c38d4" }, { "key": "sec-ch-ua-platform", "value": "\"Linux\"", "uuid": "e850b5bd-a1fc-4fdb-8089-6fcc85d95a50" }, { "key": "sec-fetch-dest", "value": "empty", "uuid": "2972a711-e813-4fc9-83bc-16bd4fb29ab2" }, { "key": "sec-fetch-mode", "value": "cors", "uuid": "264e841e-3b97-490b-8e63-d3fef575224e" }, { "key": "sec-fetch-site", "value": "same-origin", "uuid": "0d59e2cc-72ef-4483-bb55-c8243f08ef1a" }, { "key": "user-agent", "value": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36", "uuid": "d9ba0835-1b9e-42b0-af91-ea40ee5b7fb5" } ], "body": { "mode": "formdata", "formdata": [ { "key": "username", "value": "{{cboUserName}}", "type": "text" }, { "key": "password", "value": "{{cboPass}}", "type": "text" }, { "key": "userType", "value": "CITIZEN", "type": "text" }, { "key": "tenantId", "value": "{{tenantId}}", "type": "text" }, { "key": "scope", "value": "read", "type": "text" }, { "key": "grant_type", "value": "password", "type": "text" } ] }, "url": { "raw": "{{base_url}}/user/oauth/token", "host": [ "{{base_url}}" ], "path": [ "user", "oauth", "token" ] } }, "response": [] }, { "name": "Update Contract - Success - WF Accepted", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Contract's workflow status is Accept\", function () {\r", " let responseData = pm.response.json();\r", " pm.expect(responseData.contracts[0].wfStatus).eq(\"ACCEPTED\");\r", "});" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"status\": \"INWORKFLOW\",\r\n \"endDate\": 0,\r\n \"startDate\": 1694111400000,\r\n \"agreementDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"contractType\": \"{{contractType}}\",\r\n \"defectLiabilityPeriod\": 0,\r\n \"executingAuthority\": \"IA\",\r\n \"issueDate\": 1694179071576,\r\n \"orgId\": \"{{orgId}}\",\r\n \"securityDeposit\": 0,\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"totalContractedAmount\": \"{{totalEstimatedAmount}}\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"status\": \"ACTIVE\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"name\": null,\r\n \"auditDetails\": {\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": \"{{dateOfProposal}}\",\r\n \"createdBy\": \"{{empUserId}}\",\r\n \"lastModifiedBy\": \"{{empUserId}}\"\r\n },\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null,\r\n \"amount\": \"10012\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\"\r\n }\r\n ],\r\n \"category\": null,\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"noOfunit\": 13,\r\n \"unitRate\": 250.28\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"status\": \"ACTIVE\",\r\n \"tenantId\": \"pg.citya\",\r\n \"name\": null,\r\n \"auditDetails\": {\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": \"{{dateOfProposal}}\",\r\n \"createdBy\": \"{{empUserId}}\",\r\n \"lastModifiedBy\": \"{{empUserId}}\"\r\n },\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null,\r\n \"amount\": \"585.6\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\"\r\n }\r\n ],\r\n \"category\": null,\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"noOfunit\": 0,\r\n \"unitRate\": 0\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"additionalDetails\": {\r\n \"officerInChargeId\": \"SUPERUSER\",\r\n \"attendanceRegisterNumber\": null,\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"orgName\": \"{{orgName}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"ward\": \"{{ward}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"cboName\": null,\r\n \"estimateDocs\": [\r\n {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\",\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\"\r\n },\r\n {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\",\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\"\r\n },\r\n {\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\",\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\"\r\n },\r\n {\r\n \"tenantId\": null,\r\n \"documentUid\": null,\r\n \"fileStoreId\": null,\r\n \"fileName\": null,\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"tenantId\": null,\r\n \"documentUid\": null,\r\n \"fileStoreId\": null,\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"totalEstimatedAmount\": \"{{totalEstimatedAmount}}\",\r\n \"completionPeriod\": null,\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"officerInChargeName\": {\r\n \"code\": \"SUPERUSER\",\r\n \"name\": \"SUPERUSER\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"timeExtReason\": null,\r\n \"timeExt\": null\r\n },\r\n \"auditDetails\": {\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": \"{{dateOfProposal}}\",\r\n \"createdBy\": \"{{empUserId}}\",\r\n \"lastModifiedBy\": \"{{empUserId}}\"\r\n },\r\n \"businessService\": null,\r\n \"supplementNumber\": null\r\n },\r\n \"workflow\": {\r\n \"action\": \"ACCEPT\",\r\n \"comment\": \"Work Order has been accepted by CBO\",\r\n \"assignees\": []\r\n },\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{token}}\",\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "Update Contract - Validation error - TenantId is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"NotNull.contractRequest.contract.tenantId\");\r", " pm.expect(message).to.eql(\"must not be null\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"supplementNumber\": null,\r\n \"versionNumber\": 0,\r\n \"oldUuid\": null,\r\n \"businessService\": null,\r\n \"tenantId\": null,\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"issueDate\": null,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": \"{{orgId}}\",\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"status\": \"INWORKFLOW\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\",\r\n \"amount\": {{totalEstimatedAmount}},\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 0.0,\r\n \"noOfunit\": 0.0,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\",\r\n \"amount\": 585.6,\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"active\": true,\r\n \"description\": \"Goods and Service Tax\",\r\n \"effectiveTo\": null,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"isAutoCalculated\": true,\r\n \"isWorkOrderValue\": true\r\n },\r\n \"amount\": \"585.6\",\r\n \"percentage\": \"18 %\"\r\n }\r\n }\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"auditDetails\": {\r\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"ward\": \"{{ward}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}}\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"ACCEPT\",\r\n \"assignees\": [\r\n \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\"\r\n ]\r\n},\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "Update Contract - Validation error - OrgId is null", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => {\r", " pm.expect(pm.response.to.have.status(400));\r", "});\r", " \r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"CONTRACT.ORGNISATIONID\");\r", " pm.expect(message).to.eql(\"OrgnisationId is mandatory\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"contract\": {\r\n \"id\": \"{{ContractId}}\",\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"supplementNumber\": null,\r\n \"versionNumber\": 0,\r\n \"oldUuid\": null,\r\n \"businessService\": null,\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"wfStatus\": \"{{wfStatus}}\",\r\n \"executingAuthority\": \"IA\",\r\n \"contractType\": \"{{contractType}}\",\r\n \"totalContractedAmount\": {{totalEstimatedAmount}},\r\n \"securityDeposit\": 0,\r\n \"agreementDate\": 0,\r\n \"issueDate\": null,\r\n \"defectLiabilityPeriod\": 0,\r\n \"orgId\": null,\r\n \"startDate\": 0,\r\n \"endDate\": 0,\r\n \"completionPeriod\": 30,\r\n \"status\": \"INWORKFLOW\",\r\n \"lineItems\": [\r\n {\r\n \"id\": \"{{lineitem1}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem1}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 250.28,\r\n \"noOfunit\": 13.0,\r\n \"category\": \"NON-SOR\",\r\n \"name\": \"Testing 01\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount1}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount1}}\",\r\n \"amount\": {{totalEstimatedAmount}},\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": null\r\n },\r\n {\r\n \"id\": \"{{lineitem2}}\",\r\n \"estimateId\": \"{{estId-WO}}\",\r\n \"estimateLineItemId\": \"{{estLineitem2}}\",\r\n \"tenantId\": \"pg.citya\",\r\n \"unitRate\": 0.0,\r\n \"noOfunit\": 0.0,\r\n \"category\": \"OVERHEAD\",\r\n \"name\": \"GST\",\r\n \"status\": \"ACTIVE\",\r\n \"amountBreakups\": [\r\n {\r\n \"id\": \"{{lineamount2}}\",\r\n \"estimateAmountBreakupId\": \"{{estLineamount2}}\",\r\n \"amount\": 585.6,\r\n \"status\": \"ACTIVE\",\r\n \"additionalDetails\": null\r\n }\r\n ],\r\n \"auditDetails\": {\r\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"createdTime\": {{dateOfProposal}},\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"row\": {\r\n \"name\": {\r\n \"id\": \"2\",\r\n \"code\": \"GST\",\r\n \"name\": \"ES_COMMON_OVERHEADS_GST\",\r\n \"type\": \"percentage\",\r\n \"value\": \"18\",\r\n \"active\": true,\r\n \"description\": \"Goods and Service Tax\",\r\n \"effectiveTo\": null,\r\n \"effectiveFrom\": \"1694172775346\",\r\n \"isAutoCalculated\": true,\r\n \"isWorkOrderValue\": true\r\n },\r\n \"amount\": \"585.6\",\r\n \"percentage\": \"18 %\"\r\n }\r\n }\r\n }\r\n ],\r\n \"documents\": null,\r\n \"processInstance\": null,\r\n \"auditDetails\": {\r\n \"createdBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"lastModifiedBy\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"createdTime\": \"{{dateOfProposal}}\",\r\n \"lastModifiedTime\": {{dateOfProposal}}\r\n },\r\n \"additionalDetails\": {\r\n \"ward\": \"{{ward}}\",\r\n \"cboCode\": \"{{orgId}}\",\r\n \"locality\": \"{{locality}}\",\r\n \"projectId\": \"{{PJId-est}}\",\r\n \"projectDesc\": \"{{randomWord}}\",\r\n \"projectName\": \"{{randomWord}}\",\r\n \"projectType\": \"{{projectType}}\",\r\n \"cboOrgNumber\": \"{{cboOrgNumber}}\",\r\n \"estimateDocs\": [\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileName\": \"{{estfileName}}\",\r\n \"fileType\": \"{{estfileType}}\",\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"documentUid\": \"{{estfileStoreId}}\",\r\n \"fileStoreId\": \"{{estfileStoreId}}\"\r\n },\r\n {\r\n \"fileType\": \"ESTIMATE_DOC_DESIGN_DOCUMENT\"\r\n },\r\n {\r\n \"fileName\": \"\",\r\n \"fileType\": \"Others\"\r\n }\r\n ],\r\n \"estimateNumber\": \"{{estNo-WO}}\",\r\n \"officerInChargeId\": \"SMS QA testing\",\r\n \"termsAndConditions\": [\r\n {\r\n \"description\": \"\"\r\n }\r\n ],\r\n \"officerInChargeName\": {\r\n \"code\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\"\r\n },\r\n \"officerInChargeDesgn\": \"Executive Engineer\",\r\n \"totalEstimatedAmount\": {{totalEstimatedAmount}}\r\n }\r\n },\r\n \"workflow\": {\r\n \"action\": \"APPROVE\"\r\n},\r\n \"RequestInfo\": {\r\n \"apiId\": \"Rainmaker\",\r\n \"authToken\": \"{{auth}}\",\r\n \"userInfo\": {\r\n \"id\": 444,\r\n \"uuid\": \"bff9c3f6-6a25-45c4-b7ae-dddc016598fd\",\r\n \"userName\": \"SMS QA testing\",\r\n \"name\": \"SMS QA testing\",\r\n \"mobileNumber\": \"9043685314\",\r\n \"emailId\": \"\",\r\n \"locale\": null,\r\n \"type\": \"EMPLOYEE\",\r\n \"roles\": [\r\n {\r\n \"name\": \"HRMS Admin\",\r\n \"code\": \"HRMS_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK_ORDER_VIEWER\",\r\n \"code\": \"WORK_ORDER_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_ACCOUNTANT\",\r\n \"code\": \"BILL_ACCOUNTANT\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER CREATOR\",\r\n \"code\": \"WORK_ORDER_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VERIFIER\",\r\n \"code\": \"ESTIMATE_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VERIFIER\",\r\n \"code\": \"BILL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE APPROVER\",\r\n \"code\": \"ESTIMATE_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Organization viewer\",\r\n \"code\": \"ORG_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER VERIFIER\",\r\n \"code\": \"WORK_ORDER_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT VIEWER\",\r\n \"code\": \"PROJECT_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_APPROVER\",\r\n \"code\": \"BILL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL VERIFIER\",\r\n \"code\": \"MUSTER_ROLL_VERIFIER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"OFFICER IN CHARGE\",\r\n \"code\": \"OFFICER_IN_CHARGE\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"PROJECT CREATOR\",\r\n \"code\": \"PROJECT_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"Employee Common\",\r\n \"code\": \"EMPLOYEE_COMMON\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_VIEWER\",\r\n \"code\": \"BILL_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"TECHNICAL SANCTIONER\",\r\n \"code\": \"TECHNICAL_SANCTIONER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"BILL_CREATOR\",\r\n \"code\": \"BILL_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUSTER ROLL APPROVER\",\r\n \"code\": \"MUSTER_ROLL_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE VIEWER\",\r\n \"code\": \"ESTIMATE_VIEWER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"WORK ORDER APPROVER\",\r\n \"code\": \"WORK_ORDER_APPROVER\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"ESTIMATE CREATOR\",\r\n \"code\": \"ESTIMATE_CREATOR\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"State Dashboard Admin\",\r\n \"code\": \"STADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n },\r\n {\r\n \"name\": \"MUKTA Admin\",\r\n \"code\": \"MUKTA_ADMIN\",\r\n \"tenantId\": \"pg.citya\"\r\n }\r\n ],\r\n \"active\": true,\r\n \"tenantId\": \"pg.citya\",\r\n \"permanentCity\": \"CityA\"\r\n },\r\n \"msgId\": \"1694166185259|en_IN\",\r\n \"plainAccessRequest\": {}\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_update", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_update" ] } }, "response": [] }, { "name": "Search Contract - Success - Search by WO Id", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var ContractId = res.contracts[0].id;\r", " pm.expect(ContractId).to.eql(pm.collectionVariables.get(\"ContractId\"));\r", " }\r", ");\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"mukta-services\",\r\n \"ver\": null,\r\n \"ts\": null,\r\n \"action\": null,\r\n \"did\": null,\r\n \"key\": null,\r\n \"msgId\": \"Search Contract\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"ids\": [\r\n \"{{ContractId}}\"\r\n ],\r\n \"estimateIds\": [],\r\n \"estimateLineItemIds\": [],\r\n \"contractType\": \"\",\r\n \"orgIds\": [],\r\n \"contractNumber\": \"\",\r\n \"fromDate\": null,\r\n \"toDate\": null,\r\n \"pagination\": {\r\n \"limit\": \"10\",\r\n \"offSet\": \"\",\r\n \"sortBy\": \"\",\r\n \"order\": \"desc\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_search?tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Contract - Success - Search by estimateId", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "// pm.test(\"Search response is received\", function () {\r", "// var res = pm.response.json();\r", "// var estimateId = res.contracts[0].estimateId;\r", "// pm.expect(estimateId).to.eql(pm.collectionVariables.get(\"estimateId\"));\r", "// }\r", "// );\r", "\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"mukta-services\",\r\n \"ver\": null,\r\n \"ts\": null,\r\n \"action\": null,\r\n \"did\": null,\r\n \"key\": null,\r\n \"msgId\": \"Search Contract\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"ids\": [\r\n \r\n ],\r\n \"estimateIds\": [\"{{estimateId}}\"],\r\n \"estimateLineItemIds\": [],\r\n \"contractType\": \"\",\r\n \"orgIds\": [],\r\n \"contractNumber\": \"\",\r\n \"fromDate\": null,\r\n \"toDate\": null,\r\n \"pagination\": {\r\n \"limit\": \"10\",\r\n \"offSet\": \"\",\r\n \"sortBy\": \"\",\r\n \"order\": \"desc\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_search?tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Contract - Success - Search by Contract Type", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var contractType = res.contracts[0].contractType;\r", " pm.expect(contractType).to.eql(pm.collectionVariables.get(\"contractType\"));\r", " }\r", ");\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"mukta-services\",\r\n \"ver\": null,\r\n \"ts\": null,\r\n \"action\": null,\r\n \"did\": null,\r\n \"key\": null,\r\n \"msgId\": \"Search Contract\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"ids\": [\r\n \r\n ],\r\n \"estimateIds\": [],\r\n \"estimateLineItemIds\": [],\r\n \"contractType\": \"{{contractType}}\",\r\n \"orgIds\": [],\r\n \"contractNumber\": \"\",\r\n \"fromDate\": null,\r\n \"toDate\": null,\r\n \"pagination\": {\r\n \"limit\": \"10\",\r\n \"offSet\": \"\",\r\n \"sortBy\": \"\",\r\n \"order\": \"desc\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_search?tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Contract - Success - Search by Contract Number", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "\r", "pm.test(\"Search response is received\", function () {\r", " var res = pm.response.json();\r", " var contractNumber = res.contracts[0].contractNumber;\r", " pm.expect(contractNumber).to.eql(pm.collectionVariables.get(\"ContractNumber\"));\r", " \r", " }\r", ");\r", "\r", "pm.test(\"Contract's search is successful\", function () {\r", " let responseData = pm.response.json();\r", " \r", " pm.collectionVariables.set('wfStatus', responseData.contracts[0].wfStatus);\r", " pm.collectionVariables.set('status', responseData.contracts[0].status);\r", " pm.collectionVariables.set(\"startDate\", responseData.contracts[0].startDate);\r", " pm.collectionVariables.set(\"endDate\", responseData.contracts[0].endDate);\r", " pm.environment.set('lMTime', responseData.contracts[0].auditDetails.lastModifiedTime);\r", " pm.environment.set(\"contractLineItemRef1\", responseData.contracts[0].lineItems[0].contractLineItemRef);\r", " pm.environment.set(\"contractLineItemRef2\", responseData.contracts[0].lineItems[1].contractLineItemRef);\r", " pm.environment.set(\"MB-CO\", responseData.contracts[0].contractNumber);\r", " pm.environment.set(\"entryDate\",responseData.contracts[0].startDate);\r", "});\r", "" ], "type": "text/javascript", "packages": {} } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"mukta-services\",\r\n \"ver\": null,\r\n \"ts\": null,\r\n \"action\": null,\r\n \"did\": null,\r\n \"key\": null,\r\n \"msgId\": \"Search Contract\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"ids\": [\r\n ],\r\n \"estimateIds\": [],\r\n \"estimateLineItemIds\": [],\r\n \"contractType\": \"\",\r\n \"orgIds\": [],\r\n \"contractNumber\": \"{{ContractNumber}}\",\r\n \"fromDate\": null,\r\n \"toDate\": null,\r\n \"pagination\": {\r\n \"limit\": \"10\",\r\n \"offSet\": \"\",\r\n \"sortBy\": \"\",\r\n \"order\": \"desc\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_search?tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Contract - Success - Search by From and To date", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () =>\r", " pm.expect(pm.response.to.have.status(200))\r", ");\r", "" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"mukta-services\",\r\n \"ver\": null,\r\n \"ts\": null,\r\n \"action\": null,\r\n \"did\": null,\r\n \"key\": null,\r\n \"msgId\": \"Search Contract\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"ids\": [\r\n ],\r\n \"estimateIds\": [],\r\n \"estimateLineItemIds\": [],\r\n \"contractType\": \"\",\r\n \"orgIds\": [],\r\n \"contractNumber\": \"\",\r\n \"fromDate\": {{createdTime}},\r\n \"toDate\": {{lastModifiedTime}},\r\n \"pagination\": {\r\n \"limit\": \"10\",\r\n \"offSet\": \"\",\r\n \"sortBy\": \"\",\r\n \"order\": \"desc\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_search?tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] }, { "name": "Search Contract - Validation Error - createdTo without createdFrom param", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Response is successful\", () => \r", " pm.expect(pm.response.to.have.status(400)));\r", "\r", "pm.test(\"Correct Error with message and code is received\", function () {\r", " var res = pm.response.json();\r", " var code = res.Errors[0].code;\r", " var message = res.Errors[0].message;\r", " pm.expect(code).to.eql(\"INVALID_SEARCH_PARAM\");\r", " pm.expect(message).to.eql(\"Cannot specify toDate without a fromDate\");\r", " }\r", ");" ], "type": "text/javascript" } } ], "request": { "method": "POST", "header": [], "body": { "mode": "raw", "raw": "{\r\n \"RequestInfo\": {\r\n \"apiId\": \"mukta-services\",\r\n \"ver\": null,\r\n \"ts\": null,\r\n \"action\": null,\r\n \"did\": null,\r\n \"key\": null,\r\n \"msgId\": \"Search Contract\",\r\n \"authToken\": \"{{auth}}\"\r\n },\r\n \"tenantId\": \"{{tenantId}}\",\r\n \"ids\": [\r\n ],\r\n \"estimateIds\": [],\r\n \"estimateLineItemIds\": [],\r\n \"contractType\": \"\",\r\n \"orgIds\": [],\r\n \"contractNumber\": \"\",\r\n \"toDate\": {{lastModifiedTime}},\r\n \"pagination\": {\r\n \"limit\": \"10\",\r\n \"offSet\": \"\",\r\n \"sortBy\": \"\",\r\n \"order\": \"desc\"\r\n }\r\n}", "options": { "raw": { "language": "json" } } }, "url": { "raw": "{{base_url}}/contract/v1/_search?tenantId={{tenantId}}", "host": [ "{{base_url}}" ], "path": [ "contract", "v1", "_search" ], "query": [ { "key": "tenantId", "value": "{{tenantId}}" } ] } }, "response": [] } ] }, { "name": "Measurement service Test Script", "item": [ { "name": "Measurement Create-Success", "event": [ { "listen": "prerequest", "script": { "exec": [ "" ], "type": "text/javascript", "packages": {} } }, { "listen": "test", "script": { "exec": [ "pm.test(\"RequestInfo is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " pm.expect(req.RequestInfo).to.not.be.null;\r", " pm.expect(req.RequestInfo).to.not.be.undefined;\r", "});\r", "\r", "pm.test(\"Auth-Token is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " var RequestInfo = req.RequestInfo;\r", " pm.expect(RequestInfo.authToken).to.not.be.null;\r", " pm.expect(RequestInfo.authToken).to.not.be.undefined;\r", " pm.expect(RequestInfo.authToken).to.not.eql(\"\"); \r", "});\r", "\r", "pm.test(\"TenantId is required\", function () {\r", " var req = JSON.parse(pm.request.body.raw);\r", " if(req && req.length>0){\r", " for(let i=0;i0){\r", " for(let i=0;i0){\r", " for(let i=0;i0){\r", " for(let i=0;i0){\r", " for(let i=0;i0){\r", "// for(let i=0;i0){\r", "// for(let i=0;i