From the FSM Registry screen, an admin can create the sanitation worker page using the add option.
Admins can fill the "Add Sanitation Worker" form to create sanitation workers in the system.
Admins can fill details such as Mobile Number, Name, Date of Birth, Photograph, Address, Skills, etc.
The mobile number has to be unique, otherwise a validation error will be shown and the user will not be able to submit the form.
There is a role details section at the bottom which is non-mandatory.
Using this role details section, an admin can specify the functional roles that this worker has, such as driver, helper, etc.
By default, all workers will have a generic SANITATION_WORKER role.
The functional roles have been mapped to the system roles using this master.
Currently, driver and helper functional roles are present in the system. Both are created as citizens.
Sanitation workers can have multiple functional roles, that is, they can be a driver as well as a helper.
Employer has two options: ULB and private vendor. This specifies the current employer of this worker. This can be changed in Edit Sanitation Worker.
Sanitation workers can also be tagged to vendors on this page based on whether the employer type is a ULB or a private vendor. This implies that the vendor select dropdown is populated based on the employer type.
Vendors can be a ULB or a private vendor. This is specified in this master.
After submitting the necessary details, an admin can click on submit and a response page is shown.
We will hit the "/individual/v1/_create" endpoint to create sanitation workers
The curl is given below:
curl 'https://unified-dev.digit.org/individual/v1/_create?tenantId=pg.citya' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry/new-worker' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"Individual":{"tenantId":"pg.citya","name":{"givenName":"Yin Yang"},"dateOfBirth":897955200000,"gender":"MALE","mobileNumber":"7733773377","address":[{"tenantId":"pg.citya","city":"pg.citya","locality":{"code":"SUN01"},"type":"PERMANENT"}],"identifiers":[{"identifierType":"DRIVING_LICENSE_NUMBER","identifierId":"RJ 12 40412"}],"skills":[{"type":"DRIVING","level":"UNSKILLED"},{"type":"OPERATOR","level":"UNSKILLED"}],"photo":null,"additionalFields":{"fields":[{"key":"FUNCTIONAL_ROLE_1","value":"DRIVER"},{"key":"EMPLOYMENT_TYPE_1","value":"FIXED"},{"key":"FUNCTIONAL_ROLE_COUNT","value":"01"},{"key":"EMPLOYER","value":"ULB"}]},"isSystemUser":true,"userDetails":{"username":"7733773377","tenantId":"pg.citya","roles":[{"code":"FSM_DRIVER","tenantId":"pg.citya"},{"code":"SANITATION_WORKER","tenantId":"pg.citya"},{"code":"CITIZEN","tenantId":"pg.citya"}],"type":"CITIZEN"}},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702468403390|en_IN","plainAccessRequest":{}}}' \
--compressed
If a vendor is selected while creating a sanitation worker, we are calling this endpoint "/vendor/v1/_update" to tag this worker to a vendor after the individual create has responded with success.
The curl is given below:
curl 'https://unified-dev.digit.org/vendor/v1/_update?tenantId=pg.citya' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry/new-worker' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"vendor":{"id":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","tenantId":"pg.citya","name":"testing","address":{"tenantId":"pg.citya","doorNo":"","plotNo":"","id":"525c701b-9d76-431a-85be-5957885c75c5","landmark":"","city":"CityA","district":"CityA","region":"CityA","state":null,"country":"in","pincode":"","additionalDetails":"{\"description\": \"\"}","buildingName":"","street":"","locality":{"code":"SUN01","name":"Ajit Nagar - Area1","label":"Locality","latitude":"31.63089","longitude":"74.871552","children":[],"materializedPath":null},"geoLocation":null,"auditDetails":null},"owner":{"id":780,"uuid":"602dcd18-a9a0-4eb1-bf3d-d2d25402fc0c","userName":"9876543211","password":null,"salutation":null,"name":"testing","gender":"MALE","mobileNumber":"9876543211","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":null,"active":true,"dob":1361318400000,"pwdExpiryDate":1708017613000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Desluding Operator","code":"FSM_DSO","tenantId":"pg"},{"id":null,"name":"Citizen","code":"CITIZEN","tenantId":"pg"}],"fatherOrHusbandName":"testing","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"715","createdDate":1698519013000,"lastModifiedBy":"927","lastModifiedDate":1702470891000,"otpReference":null,"tenantId":"pg"},"vehicles":[{"owner":{"id":781,"uuid":"86cf4d58-1c57-4878-8a73-3cbef096bf97","userName":"07e76b6d-32c5-41ea-a661-74cc3251e785","password":null,"salutation":null,"name":"Rajesh","gender":"MALE","mobileNumber":"9876543212","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":"","active":true,"dob":0,"pwdExpiryDate":1708077096000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Driver","code":"FSM_DRIVER","tenantId":"pg"}],"fatherOrHusbandName":"Rajesh","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"715","createdDate":1698519096000,"lastModifiedBy":"927","lastModifiedDate":1702470891000,"otpReference":null,"tenantId":"pg"},"id":"5214b5fd-f760-4cc7-8982-39da770cafbc","tenantId":"pg.citya","registrationNumber":"AB 12 AS 1234","model":"TATA","type":"TATA.407","tankCapacity":1000,"suctionType":"SEWER_SUCTION_MACHINE","pollutionCertiValidTill":0,"InsuranceCertValidTill":0,"fitnessValidTill":0,"roadTaxPaidTill":0,"gpsEnabled":true,"additionalDetails":{"description":""},"source":"Municipal records","vendorVehicleStatus":"ACTIVE","status":"ACTIVE","auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1698499296513,"lastModifiedTime":1702451091704}},{"owner":{"id":862,"uuid":"19aaa423-8a4c-49a4-89af-f19620302352","userName":"33192d06-27b4-41c2-b077-aa2d97d96e71","password":null,"salutation":null,"name":"raju","gender":"MALE","mobileNumber":"6543210987","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":"","active":true,"dob":0,"pwdExpiryDate":1709309830000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Driver","code":"FSM_DRIVER","tenantId":"pg"}],"fatherOrHusbandName":"raju","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"715","createdDate":1700821030000,"lastModifiedBy":"927","lastModifiedDate":1702470891000,"otpReference":null,"tenantId":"pg"},"id":"e6425160-7fa6-42ee-bdd3-7530dd41dc17","tenantId":"pg.citya","registrationNumber":"PO 23 GH 9876","model":"TATA","type":"TATA.407","tankCapacity":1000,"suctionType":"SEWER_SUCTION_MACHINE","pollutionCertiValidTill":0,"InsuranceCertValidTill":0,"fitnessValidTill":0,"roadTaxPaidTill":0,"gpsEnabled":true,"additionalDetails":{"description":""},"source":"Municipal records","vendorVehicleStatus":"ACTIVE","status":"ACTIVE","auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1700801230911,"lastModifiedTime":1702451091527}}],"drivers":[{"id":"3f1b3a51-9ab9-43a2-8afb-f3c544cdcda1","tenantId":"pg.citya","name":"rajesh","owner":{"id":931,"uuid":"8a9fd87d-23dd-42af-aa24-b518bbc7a713","userName":"1111111147","password":null,"salutation":null,"name":"rajesh","gender":"MALE","mobileNumber":"1111111147","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":null,"active":true,"dob":1262390400000,"pwdExpiryDate":1706798530000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Driver","code":"FSM_DRIVER","tenantId":"pg.citya"},{"id":null,"name":"FSM Driver","code":"FSM_DRIVER","tenantId":"pg"}],"fatherOrHusbandName":"rajesh","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"927","createdDate":1702389651000,"lastModifiedBy":"927","lastModifiedDate":1702389651000,"otpReference":null,"tenantId":"pg"},"ownerId":"8a9fd87d-23dd-42af-aa24-b518bbc7a713","additionalDetails":null,"description":null,"licenseNumber":"456789032166783","status":"ACTIVE","auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698864130067,"lastModifiedTime":1700715369667},"vendorDriverStatus":"ACTIVE"},{"id":"3d916d24-5756-4d01-b547-b4f2feac4366","tenantId":"pg.citya","name":"Krishana","owner":{"id":932,"uuid":"2499b3ef-c501-4780-9241-bfdd7c12b289","userName":"1111111141","password":null,"salutation":null,"name":"Krishana","gender":"MALE","mobileNumber":"1111111141","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":null,"active":true,"dob":1169683200000,"pwdExpiryDate":1706439751000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Driver","code":"FSM_DRIVER","tenantId":"pg.citya"},{"id":null,"name":"FSM Driver","code":"FSM_DRIVER","tenantId":"pg"}],"fatherOrHusbandName":"Krishana","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"927","createdDate":1702389651000,"lastModifiedBy":"927","lastModifiedDate":1702389651000,"otpReference":null,"tenantId":"pg"},"ownerId":"2499b3ef-c501-4780-9241-bfdd7c12b289","additionalDetails":null,"description":null,"licenseNumber":"987654321067890","status":"ACTIVE","auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698564751818,"lastModifiedTime":1698995381495},"vendorDriverStatus":"ACTIVE"}],"workers":[{"id":"28db807d-b1f7-4ec0-8198-3a24849564ef","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"eb446b2b-c79b-4b36-ac86-cc1a12d4b7e4","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1701253383254},"vendorWorkerStatus":"ACTIVE"},{"id":"64c3e042-7c08-4339-8d8b-c91517993025","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"9a43e3d9-2499-4272-b316-3f10a1458d29","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1700733128794},"vendorWorkerStatus":"ACTIVE"},{"id":"681cff35-5ed1-4819-b682-f68d8d88c48c","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"b39b9bea-7df5-40d4-9e96-ea3036adeb88","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1700710831040},"vendorWorkerStatus":"ACTIVE"},{"id":"d1adde76-49ce-40ab-891a-17d01499a6f5","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"b00a79bc-4574-4749-a371-e706a404588f","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1700730405052},"vendorWorkerStatus":"ACTIVE"},{"id":"31a41afd-dc9f-4ea0-a331-d8be9c655059","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"IND-2023-11-29-010926","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1701252195270},"vendorWorkerStatus":"ACTIVE"},{"id":"d6741795-4171-4307-bd65-4d2b29c46364","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"e496c773-251b-42eb-9812-450f453e6cbb","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1701695433280},"vendorWorkerStatus":"ACTIVE"},{"id":"dacc15d6-fda6-4f29-8635-cec877ee2649","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"16f9ba98-cb15-4d10-883a-b6d04184b14b","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1701943427056},"vendorWorkerStatus":"ACTIVE"},{"id":"c5cc4c36-7791-488a-becb-13a2b5ce9b59","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"19ec0f63-9cc9-4c84-9414-00bdfb1110cc","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1702272847021},"vendorWorkerStatus":"ACTIVE"},{"id":"9ec0387b-1a0a-406a-b511-ac4526f6ee50","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"7ac94e46-8278-4aff-9693-908f58902fca","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1702024388227},"vendorWorkerStatus":"ACTIVE"},{"id":"31d6a8d2-568c-4956-a87f-81d9caf27adc","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"92c84f7a-ff92-4530-a678-a817540f2c28","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1698499213598,"lastModifiedTime":1702448704333},"vendorWorkerStatus":"ACTIVE"},{"id":"6563352a-648b-475b-b2f3-08745155840b","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"19a1da54-5269-4170-b6af-1654cd69e677","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1702272832743},"vendorWorkerStatus":"ACTIVE"},{"id":"376dac06-52a4-4a65-b759-435d3a2cc330","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"a32a1429-cc4f-4038-878c-610ea4d36d3a","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1698499213598,"lastModifiedTime":1702448935221},"vendorWorkerStatus":"ACTIVE"},{"id":"704af1f6-e2b4-48fa-86bd-60e701163e9d","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"1c1cde73-15c0-44f9-991f-78df04eb4e0d","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1702272841574},"vendorWorkerStatus":"ACTIVE"},{"id":"4c64320b-e5c6-485d-9578-144f482ac3f2","tenantId":"pg.citya","vendorId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","individualId":"37dcceb0-40f5-42fd-a801-078e95bad933","additionalDetails":null,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1698499213598,"lastModifiedTime":1702036374284},"vendorWorkerStatus":"ACTIVE"},{"individualId":"0ca71210-80bb-4b5a-a33b-68865e4728eb","vendorWorkerStatus":"ACTIVE"}],"additionalDetails":{"description":""},"source":"WhatsApp","description":null,"ownerId":"602dcd18-a9a0-4eb1-bf3d-d2d25402fc0c","agencyType":"ULB","paymentPreference":"post-service","status":"ACTIVE","auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1698499213598,"lastModifiedTime":1702451091813}},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702468403810|en_IN","plainAccessRequest":{}}}' \
--compressed
Role-action mapping is done for the above two API endpoints for the following role:
FSM_ADMIN
From the FSM card in the home screen, there is a link to the "FSM Registry". FSM admins have access to manage the FSM Registry.
The FSM Registry is multi-tabbed search screen.
Using the FSM Registry, FSM admins can manage vehicles, vendors, and sanitation workers in the system.
There are three tabs available, that is, Vendor, Vehicle, Sanitation Worker.
Vendor and vehicle were already there in FSM 1.3. The Sanitation Worker tab have now been added.
This tab shows a list of sanitation workers in the system.
Admins can search for sanitation workers with the sanitation worker ID, name, and mobile number.
Admins can disable/enable sanitation workers.
There is a vendor dropdown available to each sanitation worker which shows a list of vendors that they can be tagged to. An admin can tag a sanitation worker to a vendor using that dropdown.
Vendors are listed based on agency type. Currently, there are two types of agency: ULB and private vendor.
If a sanitation worker is employed by the ULB, then the dropdown will show vendors whose agency type is ULB, and likewise for private vendors.
We are using the individual registry to create, update, and disable sanitation workers.
If an admin disables a sanitation worker already tagged to a vendor, then that vendor tagging is also disabled. This implies that the if an admin enables that user, we need to tag the vendor again.
There is an 'Add' option at the top right of this screen using which admins can create vehicle, vendor, and sanitation worker.
Note: There is a SANITATION_WORKER role in the system. All sanitation workers created through the system will have this role.
We will hit hit the individual search API to get a list of sanitation workers using the SANITATION_WORKER system role.
The curl is given below:
We will hit the "vendor/v1/_search" endpoint to get a list of vendors.
The curl is given below:
We will hit the "/vendor/v1/_update" to update tagging of sanitation workers to vendors.
The curl is given below:
We will utilise the individual update API for disabling/enabling sanitation workers.
The curl is given below:
Role-action mapping is done for the above mentioned API endpoints for FSM admin users with the following role code:
Sanitation Worker UI Documentation
As part of FSM v1.4, sanitation worker related features/screens have been added to the FSM UI. These screens are accessible with current FSM related roles such as FSM_Admin, Creator, Editor, Collector, etc.
The following screens are available for the sanitation worker UI:
From the Screen Admin can search for Sanitation worker and go to it's .
From the , admin can click on "Edit" action
Admin will be redirected to the edit sanitation worker page
This page contains the same form as . The only difference is all the fields are auto populated based on the worker that we are updating
Admin can update all the details except Sanitation Worker Id and Name
Clicking on Submit will show a response screen saying Sanitation Worker details updated successfully
We are hitting Individual Update endpoint "/individual/v1/_update" to update the details of a Sanitation worker
Refer the curl below:
If during update, vendor details are changed then along with individual update we are calling vendor update "/vendor/v1/_update"
Refer the curl below
Role action mapping is done for the above 2 endpoints for "FSM_ADMIN" role
Clicking on a particular ID takes the user to the .
The employer selection of a sanitation worker can be done while .
FSM_ADMIN
curl 'https://unified-dev.digit.org/individual/v1/_search?tenantId=pg.citya&limit=10&offset=0&sortBy=createdTime&sortOrder=DESC&_=1702466726727' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry?selectedTabs=WORKER' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"Individual":{"roleCodes":["SANITATION_WORKER"],"tenantId":"pg.citya"},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702466726727|en_IN","plainAccessRequest":{}}}' \
--compressed
curl 'https://unified-dev.digit.org/vendor/v1/_search?tenantId=pg.citya&vehicleIds=&driverIds=&status=ACTIVE' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry?selectedTabs=WORKER' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702466726728|en_IN","plainAccessRequest":{}}}' \
--compressed
curl 'https://unified-dev.digit.org/vendor/v1/_update?tenantId=pg.citya' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry?selectedTabs=WORKER' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"vendor":{"id":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","tenantId":"pg.citya","name":"djhdjkdhsjkh","address":{"tenantId":"pg.citya","doorNo":"","plotNo":"","id":"7132305a-ecd1-4f5e-af02-9894103a3742","landmark":"","city":"CityA","district":"CityA","region":"CityA","state":null,"country":"in","pincode":"","additionalDetails":"{\"description\": \"\"}","buildingName":"","street":"","locality":{"code":"SUN01","name":"Ajit Nagar - Area1","label":"Locality","latitude":"31.63089","longitude":"74.871552","children":[],"materializedPath":null},"geoLocation":null,"auditDetails":null},"owner":{"id":933,"uuid":"5b610239-fa1c-4538-b771-90cf255304b3","userName":"7787678673","password":null,"salutation":null,"name":"djhdjkdhsjkh","gender":"MALE","mobileNumber":"7787678673","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":null,"active":true,"dob":0,"pwdExpiryDate":1710525714000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Desluding Operator","code":"FSM_DSO","tenantId":"pg"},{"id":null,"name":"Citizen","code":"CITIZEN","tenantId":"pg"}],"fatherOrHusbandName":"djhdjkdhsjkh","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"927","createdDate":1702393314000,"lastModifiedBy":"927","lastModifiedDate":1702481871000,"otpReference":null,"tenantId":"pg"},"vehicles":null,"drivers":null,"workers":[{"id":"59090353-59f6-4242-86ea-bbd92ecbe674","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"1e5ad42e-2734-48fc-b934-fc32ef5058a6","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702462026145},"vendorWorkerStatus":"ACTIVE"},{"id":"1e19a4f0-3ead-4985-bb59-aa4b57df6af2","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"c050f0e5-d0a0-4f2a-83c0-63876827d6e1","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702462071879},"vendorWorkerStatus":"ACTIVE"},{"id":"acf5a060-08db-4173-9232-c923653a57e4","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702457057286},"vendorWorkerStatus":"INACTIVE"},{"id":"0a79d0d1-ac14-4ed4-a6cc-7971a29043e2","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"f6f99ec9-9fcd-489c-8f66-58a4a63432b3","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702459924693},"vendorWorkerStatus":"ACTIVE"},{"id":"39cc81f9-58e7-4912-9743-81f51ba03cd5","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"8215eb13-f247-4782-9acd-665214d24a98","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702461623872},"vendorWorkerStatus":"ACTIVE"}],"additionalDetails":{"description":""},"source":"WhatsApp","description":null,"ownerId":"5b610239-fa1c-4538-b771-90cf255304b3","agencyType":"ULB","paymentPreference":"post-service","status":"ACTIVE","auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702462071879}},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702466976575|en_IN","plainAccessRequest":{}}}' \
--compressed
curl 'https://unified-dev.digit.org/individual/v1/_update' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry?selectedTabs=WORKER' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"tenantId":"pg.citya","Individual":{"id":"02bc1a5b-fed9-4176-bada-974aeeb8e613","individualId":"IND-2023-12-11-011010","tenantId":"pg.citya","clientReferenceId":null,"userId":null,"userUuid":null,"name":{"givenName":"sdjhsdhsdkjhs","familyName":null,"otherNames":null},"dateOfBirth":"01/01/1970","gender":"MALE","bloodGroup":null,"mobileNumber":"7897897899","altContactNumber":null,"email":null,"address":[{"id":"d2a6e81d-c3ce-4608-af11-5b0d0ca0aa0d","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","tenantId":"pg.citya","doorNo":null,"latitude":0,"longitude":0,"locationAccuracy":0,"type":"PERMANENT","addressLine1":null,"addressLine2":null,"landmark":null,"city":"pg.citya","pincode":null,"buildingName":null,"street":null,"locality":{"code":"SUN01","name":null,"label":null,"latitude":null,"longitude":null,"children":null,"materializedPath":null},"ward":null,"isDeleted":false,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702288646617,"lastModifiedTime":1702459735736}}],"fatherName":null,"husbandName":null,"relationship":null,"identifiers":[{"id":"c29c1d4d-a652-41ed-919e-690ebc26641a","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","identifierType":"SYSTEM_GENERATED","identifierId":"********************************e613","isDeleted":false,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","createdTime":1702288646617,"lastModifiedTime":1702288646617}}],"skills":[{"id":"19a53767-cf30-40ef-b319-448a71543d6b","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","type":"DRIVING","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702288646617,"lastModifiedTime":1702381056019}},{"id":"d033165f-e71a-492d-9047-a0f7a8100bf9","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","type":"Driving","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702459735089,"lastModifiedTime":1702459735089}},{"id":"83d3c583-4195-49d9-8447-3fdea59a3f47","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","type":"Lab Operator","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702459735089,"lastModifiedTime":1702459735089}},{"id":"db0d86de-5f6e-42b0-8978-1953bd4a71a4","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","type":"Driving","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702459735737,"lastModifiedTime":1702459735737}},{"id":"8c623d37-5a83-431a-8c09-5cd6a3bc54c2","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","type":"Lab Operator","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702459735737,"lastModifiedTime":1702459735737}}],"photo":null,"additionalFields":{"schema":null,"version":null,"fields":[{"key":"FUNCTIONAL_ROLE_1","value":"SANITATION_HELPER"},{"key":"EMPLOYMENT_TYPE_1","value":"FIXED"},{"key":"FUNCTIONAL_ROLE_COUNT","value":"01"},{"key":"EMPLOYER","value":"ULB"}]},"isDeleted":false,"rowVersion":11,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702288646617,"lastModifiedTime":1702459735737},"clientAuditDetails":{"createdBy":null,"lastModifiedBy":null,"createdTime":0,"lastModifiedTime":0},"isSystemUser":true,"isSystemUserActive":false,"userDetails":{"username":"7897897899","password":null,"tenantId":"pg.citya","roles":[{"name":null,"code":"SANITATION_HELPER","description":null,"tenantId":"pg.citya"},{"name":null,"code":"SANITATION_WORKER","description":null,"tenantId":"pg.citya"},{"name":null,"code":"CITIZEN","description":null,"tenantId":"pg.citya"}],"type":"CITIZEN"}},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702467231568|en_IN","plainAccessRequest":{}}}' \
--compressed
curl 'https://unified-dev.digit.org/individual/v1/_update?tenantId=pg.citya' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry/edit-worker?id=IND-2023-12-11-011010' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"Individual":{"id":"02bc1a5b-fed9-4176-bada-974aeeb8e613","individualId":"IND-2023-12-11-011010","tenantId":"pg.citya","clientReferenceId":null,"userId":null,"userUuid":null,"name":{"givenName":"sdjhsdhsdkjhs","familyName":null,"otherNames":null},"dateOfBirth":-19800000,"gender":"MALE","bloodGroup":null,"mobileNumber":"7897897899","altContactNumber":null,"email":null,"address":[{"id":"d2a6e81d-c3ce-4608-af11-5b0d0ca0aa0d","clientReferenceId":null,"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","tenantId":"pg.citya","doorNo":null,"latitude":0,"longitude":0,"locationAccuracy":0,"type":"PERMANENT","addressLine1":null,"addressLine2":null,"landmark":null,"city":"pg.citya","pincode":null,"buildingName":null,"street":null,"locality":{"code":"SUN02","name":null,"label":null,"latitude":null,"longitude":null,"children":null,"materializedPath":null},"ward":null,"isDeleted":false,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702288646617,"lastModifiedTime":1702459735736}}],"fatherName":null,"husbandName":null,"relationship":null,"identifiers":null,"skills":[{"type":"Driving","level":"UNSKILLED"}],"photo":null,"additionalFields":{"fields":[{"key":"FUNCTIONAL_ROLE_1","value":"SANITATION_HELPER"},{"key":"EMPLOYMENT_TYPE_1","value":"FIXED"},{"key":"FUNCTIONAL_ROLE_COUNT","value":"01"},{"key":"EMPLOYER","value":"ULB"}]},"isDeleted":false,"rowVersion":11,"auditDetails":{"createdBy":"4a747fc5-6a8c-4645-8748-fec35f1b9e17","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702288646617,"lastModifiedTime":1702459735737},"clientAuditDetails":{"createdBy":null,"lastModifiedBy":null,"createdTime":0,"lastModifiedTime":0},"isSystemUser":true,"isSystemUserActive":true,"userDetails":{"username":"7897897899","password":null,"tenantId":"pg.citya","roles":[{"code":"CITIZEN","tenantId":"pg.citya"},{"code":"SANITATION_WORKER","tenantId":"pg.citya"},{"code":"SANITATION_HELPER","tenantId":"pg.citya"}],"type":"CITIZEN"}},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702469181914|en_IN","plainAccessRequest":{}}}' \
--compressed
curl 'https://unified-dev.digit.org/vendor/v1/_update?tenantId=pg.citya' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/registry/edit-worker?id=IND-2023-12-11-011010' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"vendor":{"id":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","tenantId":"pg.citya","name":"djhdjkdhsjkh","address":{"tenantId":"pg.citya","doorNo":"","plotNo":"","id":"7132305a-ecd1-4f5e-af02-9894103a3742","landmark":"","city":"CityA","district":"CityA","region":"CityA","state":null,"country":"in","pincode":"","additionalDetails":"{\"description\": \"\"}","buildingName":"","street":"","locality":{"code":"SUN01","name":"Ajit Nagar - Area1","label":"Locality","latitude":"31.63089","longitude":"74.871552","children":[],"materializedPath":null},"geoLocation":null,"auditDetails":null},"owner":{"id":933,"uuid":"5b610239-fa1c-4538-b771-90cf255304b3","userName":"7787678673","password":null,"salutation":null,"name":"djhdjkdhsjkh","gender":"MALE","mobileNumber":"7787678673","emailId":"abc@egov.com","altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"correspondenceAddress":null,"active":true,"dob":0,"pwdExpiryDate":1710545514000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"FSM Desluding Operator","code":"FSM_DSO","tenantId":"pg"},{"id":null,"name":"Citizen","code":"CITIZEN","tenantId":"pg"}],"fatherOrHusbandName":"djhdjkdhsjkh","relationship":"OTHER","bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"927","createdDate":1702393314000,"lastModifiedBy":"927","lastModifiedDate":1702486776000,"otpReference":null,"tenantId":"pg"},"vehicles":null,"drivers":null,"workers":[{"id":"59090353-59f6-4242-86ea-bbd92ecbe674","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"1e5ad42e-2734-48fc-b934-fc32ef5058a6","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702462026145},"vendorWorkerStatus":"ACTIVE"},{"id":"1e19a4f0-3ead-4985-bb59-aa4b57df6af2","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"c050f0e5-d0a0-4f2a-83c0-63876827d6e1","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702462071879},"vendorWorkerStatus":"ACTIVE"},{"id":"0a79d0d1-ac14-4ed4-a6cc-7971a29043e2","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"f6f99ec9-9fcd-489c-8f66-58a4a63432b3","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702459924693},"vendorWorkerStatus":"ACTIVE"},{"id":"39cc81f9-58e7-4912-9743-81f51ba03cd5","tenantId":"pg.citya","vendorId":"da5dae4c-95d7-43b6-a92f-e504d6000ef8","individualId":"8215eb13-f247-4782-9acd-665214d24a98","additionalDetails":null,"auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702461623872},"vendorWorkerStatus":"ACTIVE"},{"individualId":"02bc1a5b-fed9-4176-bada-974aeeb8e613","vendorWorkerStatus":"ACTIVE"}],"additionalDetails":{"description":""},"source":"WhatsApp","description":null,"ownerId":"5b610239-fa1c-4538-b771-90cf255304b3","agencyType":"ULB","paymentPreference":"post-service","status":"ACTIVE","auditDetails":{"createdBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","lastModifiedBy":"49341961-f413-4ae1-b7f8-92a8d9136f38","createdTime":1702373514847,"lastModifiedTime":1702466976705}},"RequestInfo":{"apiId":"Rainmaker","authToken":"06170439-7751-41d9-8043-04ede25e9499","userInfo":{"id":927,"uuid":"49341961-f413-4ae1-b7f8-92a8d9136f38","userName":"ADMIN","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Administrator","code":"FSM_ADMIN","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702469182205|en_IN","plainAccessRequest":{}}}' \
--compressed
In FSM 1.3 EDITOR users could take workflow actions and assign drivers to FSM Applications now we have changed that assignment. Now EDITOR users can assign a driver and multiple helpers to an FSM Application. And both driver and helper are Sanitation workers now.
EDITOR User role code:
FSM_EDITOR_EMP
Login with EDITOR user and go to FSM Inbox
From Inbox choose any application whose status is pending for DSO assignment
Go to the application details page from inbox
From the Action bar options click on "Assign Vehicle and Sanitation Workers"
A Popup window will open which looks like the following
We have two new options here, Assign Driver and Assign Sanitation Worker
Assign Driver is single select and mandatory
Assign Sanitation worker is multi-select and we can assign multiple Sanitation workers. Assigning worker is non mandatory though
Both these dropdowns are searchable i.e., EDITOR can search by name and Sanitation worker ID
These dropdowns are populated based on the vendor that is tagged to the current FSM Application.
User can click on Assign to take this action. A toast message is displayed showing the update is successful.
After this action, added Sanitation workers are displayed on the Application Details screen under DSO Details Section
To fetch FSM application details we are hitting this endpoint "/fsm/v1/_search"
Refer the below curl:
curl 'https://unified-dev.digit.org/fsm/v1/_search?tenantId=pg.citya&applicationNos=1013-FSM-2023-12-13-000381&_=1702476865870' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/application-details/1013-FSM-2023-12-13-000381' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"f8eee39f-1194-4d39-85de-12dc9c572a7c","msgId":"1702476865870|en_IN","plainAccessRequest":{}}}' \
--compressed
To update FSM application we are hitting this endpoint "/fsm/v1/_update"
Refer to the below curl:
curl 'https://unified-dev.digit.org/fsm/v1/_update?tenantId=pg.citya&_=1702476876985' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/application-details/1013-FSM-2023-12-13-000381' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"fsm":{"citizen":{"id":960,"uuid":"d75d542f-a3bb-42c3-884a-d7fb5e6f14b3","userName":"d90dffe9-05b2-42cd-b87f-9756b0782dec","name":"Janu","password":null,"mobileNumber":"9035169720","tenantId":"pg","salutation":null,"emailId":null,"altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceCity":null,"correspondencePinCode":null,"active":true,"dob":null,"pwdExpiryDate":1710251842000,"locale":null,"type":"CITIZEN","signature":null,"accountLocked":false,"roles":[{"id":null,"name":"Citizen","code":"CITIZEN","tenantId":"pg"}],"bloodGroup":null,"identificationMark":null,"photo":null,"createdBy":"925","createdDate":1702475842000,"lastModifiedBy":"925","lastModifiedDate":1702475842000,"otpReference":null,"gender":null},"id":"f25e914d-e14e-4a9e-97d1-dc2cc51611f3","tenantId":"pg.citya","applicationNo":"1013-FSM-2023-12-13-000381","description":null,"accountId":"d75d542f-a3bb-42c3-884a-d7fb5e6f14b3","additionalDetails":{"tripAmount":750},"applicationStatus":"DSO_INPROGRESS","source":"COUNTER","sanitationtype":null,"propertyUsage":"RESIDENTIAL.ROW_HOUSES","vehicleType":null,"noOfTrips":1,"vehicleCapacity":"1000","status":null,"vehicleId":null,"driverId":"3d916d24-5756-4d01-b547-b4f2feac4366","vehicle":null,"dsoId":"e427ddf2-7c49-47f1-ba0f-4418bb10f0b7","dso":null,"possibleServiceDate":1702425600000,"pitDetail":{"type":null,"id":"ca0cb638-eaec-4b7a-8f5d-5924c4a4bc4a","tenantId":"pg.citya","height":0,"length":0,"width":0,"diameter":0,"distanceFromRoad":0,"auditDetails":{"createdBy":"7e1c6207-49e9-41b4-a965-dea0cdeb677c","lastModifiedBy":"12c0c924-ec4f-41e8-aa41-92c00226ce85","createdTime":1702475842827,"lastModifiedTime":1702475982894},"additionalDetails":null},"address":{"tenantId":"pg.citya","doorNo":null,"plotNo":null,"id":"f5c6c3d9-8634-46e2-b662-22efc130ea03","landmark":null,"city":"CityA","district":null,"region":null,"state":null,"country":null,"pincode":"143001","additionalDetails":null,"auditDetails":{"createdBy":"7e1c6207-49e9-41b4-a965-dea0cdeb677c","lastModifiedBy":"12c0c924-ec4f-41e8-aa41-92c00226ce85","createdTime":1702475842827,"lastModifiedTime":1702475982894},"buildingName":null,"street":null,"slumName":null,"locality":{"code":"SUN03","name":"Bharath Colony","label":"Locality","latitude":null,"longitude":null,"children":[],"materializedPath":null},"geoLocation":{"id":"66d6755a-7ca3-41ab-8a76-89ebbb1166b4","latitude":20.2099797,"longitude":85.6973022,"additionalDetails":null}},"auditDetails":{"createdBy":"7e1c6207-49e9-41b4-a965-dea0cdeb677c","lastModifiedBy":"12c0c924-ec4f-41e8-aa41-92c00226ce85","createdTime":1702475842827,"lastModifiedTime":1702475982894},"wasteCollected":null,"completedOn":0,"advanceAmount":0,"applicationType":"Adhoc Service","oldApplicationNo":null,"paymentPreference":null,"processInstance":null},"workflow":{"action":"REASSING","comments":"VEHICLE_REPAIR"},"RequestInfo":{"apiId":"Rainmaker","authToken":"f8eee39f-1194-4d39-85de-12dc9c572a7c","userInfo":{"id":926,"uuid":"12c0c924-ec4f-41e8-aa41-92c00226ce85","userName":"EDITOR","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Employee Application Editor","code":"FSM_EDITOR_EMP","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702476876985|en_IN","plainAccessRequest":{}}}' \
--compressed
To get a particular vendor data tagged to the current application we are hitting this endpoint "/vendor/v1/_search"
Refer to the below curl
curl 'https://unified-dev.digit.org/vendor/v1/_search?tenantId=pg.citya&ids=e427ddf2-7c49-47f1-ba0f-4418bb10f0b7' \
-H 'authority: unified-dev.digit.org' \
-H 'accept: application/json, text/plain, */*' \
-H 'accept-language: en-US,en;q=0.9' \
-H 'content-type: application/json;charset=UTF-8' \
-H 'origin: https://unified-dev.digit.org' \
-H 'referer: https://unified-dev.digit.org/sanitation-ui/employee/fsm/application-details/1013-FSM-2023-12-13-000381' \
-H 'sec-ch-ua: "Not_A Brand";v="8", "Chromium";v="120", "Google Chrome";v="120"' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'sec-fetch-dest: empty' \
-H 'sec-fetch-mode: cors' \
-H 'sec-fetch-site: same-origin' \
-H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"f8eee39f-1194-4d39-85de-12dc9c572a7c","userInfo":{"id":926,"uuid":"12c0c924-ec4f-41e8-aa41-92c00226ce85","userName":"EDITOR","name":"Plant operator","mobileNumber":"8282828121","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"FSM Employee Application Editor","code":"FSM_EDITOR_EMP","tenantId":"pg.citya"},{"name":"FSM Employee Application Viewer","code":"FSM_VIEW_EMP","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1702476878085|en_IN","plainAccessRequest":{}}}' \
--compressed
Role action mapping for the above three endpoints is done for this role
FSM_EDITOR_EMP
From the FSM Registry page Admins can Search for a Sanitation Worker and go to it's details page by clicking on Sanitation Worker Id
This page shows all the details about a Sanitation worker
Sample Page Screenshot is given below for reference
Admin users will get an action bar at the bottom of the page which has two actions
Edit -> This takes the user to Edit Sanitation worker Page
Delete -> This calls the update Individual API and disables this user ( Soft delete)
A corresponding toast message is shown
After taking delete action page is automatically redirected to the FSM Registry
We are hitting this endpoint "/individual/v1/_search" to fetch Sanitation Worker Details
Refer the curl below:
```powershell
curl --location 'https://unified-dev.digit.org/individual/v1/_search?tenantId=pg.citya&offset=0&limit=100&_=1700205653156' \
--header 'authority: unified-dev.digit.org' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'content-type: application/json' \
--header 'cookie: MicrosoftApplicationsTelemetryDeviceId=55de1d9a-a0cf-4d5b-9255-85b5b1493061; MicrosoftApplicationsTelemetryFirstLaunchTime=2023-10-16T06:23:27.369Z; PGADMIN_LANGUAGE=en; _oauth2_proxy=eyJFbWFpbCI6InNoYWlsZXNoLmt1bWFyQGVnb3Zlcm5tZW50cy5vcmciLCJVc2VyIjoic2hhaWxlc2gtZWdvdiJ9|1700033260|CTEqBthhJjZd2eND93q4SwyRXNc=; __cuid=9b7e8966323a4b45aa49cdd35080b492; amp_fef1e8=606c34a4-95cc-4a2b-bb9c-23bcfd531c60R...1hfbmtumv.1hfbmu1bc.37.l.3s' \
--header 'origin: https://unified-dev.digit.org' \
--header 'referer: https://unified-dev.digit.org/works-ui/employee/masters/view-wageseeker?tenantId=pg.citya&individualId=IND-2023-09-25-002330' \
--header 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Windows"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-origin' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
--data '{
"Individual": {
"roleCodes":["SANITATION_WORKER"],
"mobileNumber":"9494949494",
"individualName":"Dummy1",
"individualId": "IND-2023-11-23-010831"
},
"RequestInfo": {
"apiId": "Rainmaker",
"authToken": "4ff28c82-654f-4403-9f2d-8547b9c35687",
"userInfo": {
"id": 618,
"uuid": "40e3b45a-0f64-4e8c-8768-aab82c095b2d",
"userName": "AUTO1",
"name": "Jagankumar E",
"mobileNumber": "7654376563",
"emailId": null,
"locale": null,
"type": "EMPLOYEE",
"roles": [
{
"name": "HRMS Admin",
"code": "HRMS_ADMIN",
"tenantId": "pg.citya"
},
{
"name": "ESTIMATE VERIFIER",
"code": "ESTIMATE_VERIFIER",
"tenantId": "pg.citya"
},
{
"name": "OFFICER IN CHARGE",
"code": "OFFICER_IN_CHARGE",
"tenantId": "pg.citya"
},
{
"name": "PROJECT CREATOR",
"code": "PROJECT_CREATOR",
"tenantId": "pg.citya"
},
{
"name": "BILL_CREATOR",
"code": "BILL_CREATOR",
"tenantId": "pg.citya"
},
{
"name": "ESTIMATE VIEWER",
"code": "ESTIMATE_VIEWER",
"tenantId": "pg.citya"
},
{
"name": "MB_APPROVER",
"code": "MB_APPROVER",
"tenantId": "pg.citya"
},
{
"name": "MUKTA Admin",
"code": "MUKTA_ADMIN",
"tenantId": "pg.citya"
},
{
"name": "WORK ORDER CREATOR",
"code": "WORK_ORDER_CREATOR",
"tenantId": "pg.citya"
},
{
"name": "ESTIMATE APPROVER",
"code": "ESTIMATE_APPROVER",
"tenantId": "pg.citya"
},
{
"name": "MB_VERIFIER",
"code": "MB_VERIFIER",
"tenantId": "pg.citya"
},
{
"name": "WORK ORDER VERIFIER",
"code": "WORK_ORDER_VERIFIER",
"tenantId": "pg.citya"
},
{
"name": "PROJECT VIEWER",
"code": "PROJECT_VIEWER",
"tenantId": "pg.citya"
},
{
"name": "MB_CREATOR",
"code": "MB_CREATOR",
"tenantId": "pg.citya"
},
{
"name": "MUSTER ROLL VERIFIER",
"code": "MUSTER_ROLL_VERIFIER",
"tenantId": "pg.citya"
},
{
"name": "Localisation admin",
"code": "LOC_ADMIN",
"tenantId": "pg.citya"
},
{
"name": "Employee Common",
"code": "EMPLOYEE_COMMON",
"tenantId": "pg.citya"
},
{
"name": "BILL_VIEWER",
"code": "BILL_VIEWER",
"tenantId": "pg.citya"
},
{
"name": "TECHNICAL SANCTIONER",
"code": "TECHNICAL_SANCTIONER",
"tenantId": "pg.citya"
},
{
"name": "MUSTER ROLL APPROVER",
"code": "MUSTER_ROLL_APPROVER",
"tenantId": "pg.citya"
},
{
"name": "WORK ORDER APPROVER",
"code": "WORK_ORDER_APPROVER",
"tenantId": "pg.citya"
},
{
"name": "ESTIMATE CREATOR",
"code": "ESTIMATE_CREATOR",
"tenantId": "pg.citya"
},
{
"name": "MDMS Admin",
"code": "MDMS_ADMIN",
"tenantId": "pg.citya"
},
{
"name": "MB_VIEWER",
"code": "MB_VIEWER",
"tenantId": "pg.citya"
},
{
"name": "SUPER USER",
"code": "SUPERUSER",
"tenantId": "pg.citya"
}
],
"active": true,
"tenantId": "pg.citya",
"permanentCity": null
},
"msgId": "1700205653156|en_IN",
"plainAccessRequest": {}
}
}'
```
When individual is deleted we are making use of individual update "/individual/v1/_update"
Refer to the curl below
```powershell
curl --location 'https://unified-dev.digit.org/individual/v1/_update?_=1700205712385' \
--header 'authority: unified-dev.digit.org' \
--header 'accept: application/json, text/plain, */*' \
--header 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
--header 'content-type: application/json' \
--header 'cookie: MicrosoftApplicationsTelemetryDeviceId=55de1d9a-a0cf-4d5b-9255-85b5b1493061; MicrosoftApplicationsTelemetryFirstLaunchTime=2023-10-16T06:23:27.369Z; PGADMIN_LANGUAGE=en; _oauth2_proxy=eyJFbWFpbCI6InNoYWlsZXNoLmt1bWFyQGVnb3Zlcm5tZW50cy5vcmciLCJVc2VyIjoic2hhaWxlc2gtZWdvdiJ9|1700033260|CTEqBthhJjZd2eND93q4SwyRXNc=; __cuid=9b7e8966323a4b45aa49cdd35080b492; amp_fef1e8=606c34a4-95cc-4a2b-bb9c-23bcfd531c60R...1hfbmtumv.1hfbmu1bc.37.l.3s' \
--header 'origin: https://unified-dev.digit.org' \
--header 'referer: https://unified-dev.digit.org/works-ui/employee/masters/modify-wageseeker?tenantId=pg.citya&individualId=IND-2023-09-25-002330' \
--header 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Windows"' \
--header 'sec-fetch-dest: empty' \
--header 'sec-fetch-mode: cors' \
--header 'sec-fetch-site: same-origin' \
--header 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
--data '{"Individual":{"tenantId":"pg.citya","name":{"givenName":"Anjali"},"dateOfBirth":"20/09/1990","gender":"FEMALE","mobileNumber":"7007099195","fatherName":"Belram","relationship":"HUSBAND","additionalFields":{"fields":[{"key":"SOCIAL_CATEGORY","value":"SC"}]},"address":[{"id":"2f96f127-825e-4de0-971a-caaab582d186","individualId":"8b8c53ea-9d47-476d-b5ff-fd70aaf1a6d2","tenantId":"pg.citya","city":"pg.citya","doorNo":"NA","street":"NA","type":"PERMANENT","locality":{"code":"SUN01"},"ward":{"code":"B1"}}],"auditDetails":{"createdBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","lastModifiedBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","createdTime":1695621659633,"lastModifiedTime":1695621659633},"id":"8b8c53ea-9d47-476d-b5ff-fd70aaf1a6d2","individualId":"IND-2023-09-25-002330","skills":[{"id":"a41c97c7-73ed-4376-af5e-6e0bc2c8fd68","clientReferenceId":null,"individualId":"8b8c53ea-9d47-476d-b5ff-fd70aaf1a6d2","type":"FEMALE_MULIA","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","lastModifiedBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","createdTime":1695621659638,"lastModifiedTime":1695621659638},"code":"UNSKILLED.FEMALE_MULIA"},{"id":"95c91c30-7e26-4187-9626-46b68e4f6ccc","clientReferenceId":null,"individualId":"8b8c53ea-9d47-476d-b5ff-fd70aaf1a6d2","type":"MALE_MULIA","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","lastModifiedBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","createdTime":1695621659638,"lastModifiedTime":1695621659638},"code":"UNSKILLED.MALE_MULIA"},{"id":"47b92eaf-4e31-4513-908d-ad8bd4b4e9dc","clientReferenceId":null,"individualId":"8b8c53ea-9d47-476d-b5ff-fd70aaf1a6d2","type":"SCAVENGER","level":"UNSKILLED","experience":null,"isDeleted":false,"auditDetails":{"createdBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","lastModifiedBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","createdTime":1695621659638,"lastModifiedTime":1695621659638},"code":"UNSKILLED.SCAVENGER"}],"rowVersion":1,"identifiers":[{"id":"3491e99d-d9a3-41d5-bdaf-2538fae19ef9","clientReferenceId":"a73d268a-07b6-ab4f-76c6-fe7e3d38188e","individualId":"8b8c53ea-9d47-476d-b5ff-fd70aaf1a6d2","identifierType":"AADHAAR","identifierId":"********7656","isDeleted":false,"auditDetails":{"createdBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","lastModifiedBy":"1ec60cb3-a0c1-4d24-97ef-7a57f58e820d","createdTime":1695621659637,"lastModifiedTime":1695621659637}}]},"RequestInfo":{"apiId":"Rainmaker","authToken":"17b86f8a-6063-4028-abef-fbf005c1ba75","userInfo":{"id":618,"uuid":"40e3b45a-0f64-4e8c-8768-aab82c095b2d","userName":"AUTO1","name":"Jagankumar E","mobileNumber":"7654376563","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"HRMS Admin","code":"HRMS_ADMIN","tenantId":"pg.citya"},{"name":"ESTIMATE VERIFIER","code":"ESTIMATE_VERIFIER","tenantId":"pg.citya"},{"name":"OFFICER IN CHARGE","code":"OFFICER_IN_CHARGE","tenantId":"pg.citya"},{"name":"PROJECT CREATOR","code":"PROJECT_CREATOR","tenantId":"pg.citya"},{"name":"BILL_CREATOR","code":"BILL_CREATOR","tenantId":"pg.citya"},{"name":"ESTIMATE VIEWER","code":"ESTIMATE_VIEWER","tenantId":"pg.citya"},{"name":"MB_APPROVER","code":"MB_APPROVER","tenantId":"pg.citya"},{"name":"MUKTA Admin","code":"MUKTA_ADMIN","tenantId":"pg.citya"},{"name":"WORK ORDER CREATOR","code":"WORK_ORDER_CREATOR","tenantId":"pg.citya"},{"name":"ESTIMATE APPROVER","code":"ESTIMATE_APPROVER","tenantId":"pg.citya"},{"name":"MB_VERIFIER","code":"MB_VERIFIER","tenantId":"pg.citya"},{"name":"WORK ORDER VERIFIER","code":"WORK_ORDER_VERIFIER","tenantId":"pg.citya"},{"name":"PROJECT VIEWER","code":"PROJECT_VIEWER","tenantId":"pg.citya"},{"name":"MB_CREATOR","code":"MB_CREATOR","tenantId":"pg.citya"},{"name":"MUSTER ROLL VERIFIER","code":"MUSTER_ROLL_VERIFIER","tenantId":"pg.citya"},{"name":"Localisation admin","code":"LOC_ADMIN","tenantId":"pg.citya"},{"name":"Employee Common","code":"EMPLOYEE_COMMON","tenantId":"pg.citya"},{"name":"BILL_VIEWER","code":"BILL_VIEWER","tenantId":"pg.citya"},{"name":"TECHNICAL SANCTIONER","code":"TECHNICAL_SANCTIONER","tenantId":"pg.citya"},{"name":"MUSTER ROLL APPROVER","code":"MUSTER_ROLL_APPROVER","tenantId":"pg.citya"},{"name":"WORK ORDER APPROVER","code":"WORK_ORDER_APPROVER","tenantId":"pg.citya"},{"name":"ESTIMATE CREATOR","code":"ESTIMATE_CREATOR","tenantId":"pg.citya"},{"name":"MDMS Admin","code":"MDMS_ADMIN","tenantId":"pg.citya"},{"name":"MB_VIEWER","code":"MB_VIEWER","tenantId":"pg.citya"},{"name":"SUPER USER","code":"SUPERUSER","tenantId":"pg.citya"}],"active":true,"tenantId":"pg.citya","permanentCity":null},"msgId":"1700205712385|en_IN","plainAccessRequest":{}}}'
```
When we delete a Sanitation worker who is tagged to a vendor we are updating the worker - vendor tagging to inactive.
Refer to the curl below:
```powershell
curl --location 'http://localhost:3000/vendor/v1/_update?tenantId=pg.citya' \
--header 'Accept: application/json, text/plain, */*' \
--header 'Accept-Language: en-US,en;q=0.9' \
--header 'Connection: keep-alive' \
--header 'Content-Type: application/json;charset=UTF-8' \
--header 'Origin: http://localhost:3000' \
--header 'Referer: http://localhost:3000/sanitation-ui/employee/fsm/registry?selectedTabs=DRIVER' \
--header 'Sec-Fetch-Dest: empty' \
--header 'Sec-Fetch-Mode: cors' \
--header 'Sec-Fetch-Site: same-origin' \
--header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \
--header 'sec-ch-ua: "Google Chrome";v="119", "Chromium";v="119", "Not?A_Brand";v="24"' \
--header 'sec-ch-ua-mobile: ?0' \
--header 'sec-ch-ua-platform: "Windows"' \
--data-raw '{
"vendor": {
"id": "ea138945-f35b-42a3-96af-9ded096fb809",
"tenantId": "pg.citya",
"name": "Raj",
"address": {
"tenantId": "pg.citya",
"doorNo": "",
"plotNo": "",
"id": "894f60f2-0d27-4f24-b1ec-a0017920b51a",
"landmark": "",
"city": "CityA",
"district": "CityA",
"region": "CityA",
"state": null,
"country": "in",
"pincode": "",
"additionalDetails": "{\"description\": \"\"}",
"buildingName": "",
"street": "",
"locality": {
"code": "SUN01",
"name": "Ajit Nagar - Area1",
"label": "Locality",
"latitude": "31.63089",
"longitude": "74.871552",
"children": [],
"materializedPath": null
},
"geoLocation": null,
"auditDetails": null
},
"owner": {
"id": 861,
"uuid": "31b14828-1c46-42bb-9364-8f456509c375",
"userName": "6543217890",
"password": null,
"salutation": null,
"name": "Raj",
"gender": "MALE",
"mobileNumber": "6543217890",
"emailId": "abc@egov.com",
"altContactNumber": null,
"pan": null,
"aadhaarNumber": null,
"permanentAddress": null,
"permanentCity": null,
"permanentPinCode": null,
"correspondenceCity": null,
"correspondencePinCode": null,
"correspondenceAddress": null,
"active": true,
"dob": 1700611200000,
"pwdExpiryDate": 1708695918000,
"locale": null,
"type": "CITIZEN",
"signature": null,
"accountLocked": false,
"roles": [
{
"id": null,
"name": "FSM Desluding Operator",
"code": "FSM_DSO",
"tenantId": "pg"
},
{
"id": null,
"name": "Citizen",
"code": "CITIZEN",
"tenantId": "pg"
}
],
"fatherOrHusbandName": "Raj",
"relationship": "OTHER",
"bloodGroup": null,
"identificationMark": null,
"photo": null,
"createdBy": "715",
"createdDate": 1700820918000,
"lastModifiedBy": "715",
"lastModifiedDate": 1700826327000,
"otpReference": null,
"tenantId": "pg"
},
"vehicles": null,
"drivers": [
{
"id": "f24d113e-c163-4aa1-a1b3-b54807308a40",
"tenantId": "pg.citya",
"name": "pintu",
"owner": {
"id": 820,
"uuid": "fc688f84-6b5c-4da5-ae69-3580d3d81fc6",
"userName": "1111111149",
"password": null,
"salutation": null,
"name": "pintu",
"gender": "MALE",
"mobileNumber": "1111111149",
"emailId": "abc@egov.com",
"altContactNumber": null,
"pan": null,
"aadhaarNumber": null,
"permanentAddress": null,
"permanentCity": null,
"permanentPinCode": null,
"correspondenceCity": null,
"correspondencePinCode": null,
"correspondenceAddress": null,
"active": true,
"dob": 0,
"pwdExpiryDate": 1706888228000,
"locale": null,
"type": "CITIZEN",
"signature": null,
"accountLocked": false,
"roles": [
{
"id": null,
"name": "FSM Driver",
"code": "FSM_DRIVER",
"tenantId": "pg.citya"
},
{
"id": null,
"name": "FSM Driver",
"code": "FSM_DRIVER",
"tenantId": "pg"
}
],
"fatherOrHusbandName": "pintu",
"relationship": "OTHER",
"bloodGroup": null,
"identificationMark": null,
"photo": null,
"createdBy": "715",
"createdDate": 1699013642000,
"lastModifiedBy": "715",
"lastModifiedDate": 1700827360000,
"otpReference": null,
"tenantId": "pg"
},
"ownerId": "fc688f84-6b5c-4da5-ae69-3580d3d81fc6",
"additionalDetails": null,
"description": null,
"licenseNumber": "12345678999995",
"status": "DISABLED",
"auditDetails": {
"createdBy": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"lastModifiedBy": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"createdTime": 1698993428899,
"lastModifiedTime": 1700807560471
},
"vendorDriverStatus": "ACTIVE"
}
],
"workers": [
{
"id": "f3104f07-9b62-460d-8b9c-e16a4b6c740f",
"tenantId": "pg.citya",
"vendorId": "ea138945-f35b-42a3-96af-9ded096fb809",
"individualId": "IND-2023-11-23-010844",
"additionalDetails": null,
"auditDetails": {
"createdBy": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"lastModifiedBy": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"createdTime": 1700801118082,
"lastModifiedTime": 1700803699721
},
"vendorWorkerStatus": "ACTIVE"
},
{
"individualId":"IND-2023-11-23-010831",
"vendorWorkerStatus":"ACTIVE"
}
],
"additionalDetails": {
"description": ""
},
"source": "WhatsApp",
"description": null,
"ownerId": "31b14828-1c46-42bb-9364-8f456509c375",
"agencyType": "ULB",
"paymentPreference": "post-service",
"status": "ACTIVE",
"auditDetails": {
"createdBy": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"lastModifiedBy": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"createdTime": 1700801118082,
"lastModifiedTime": 1700806527779
}
},
"RequestInfo": {
"apiId": "Rainmaker",
"authToken": "4ff28c82-654f-4403-9f2d-8547b9c35687",
"userInfo": {
"id": 715,
"uuid": "4a747fc5-6a8c-4645-8748-fec35f1b9e17",
"userName": "ADMIN",
"name": "ADMIN",
"mobileNumber": "9035169725",
"emailId": "",
"locale": null,
"type": "EMPLOYEE",
"roles": [
{
"name": "FSM Administrator",
"code": "FSM_ADMIN",
"tenantId": "pg.citya"
}
],
"active": true,
"tenantId": "pg.citya",
"permanentCity": "CityA"
},
"msgId": "1700732793623|en_IN",
"plainAccessRequest": {}
}
}'
```
Role Action mapping is done for the above three endpoints for FSM_ADMIN role
FSM_ADMIN