Notifications and the citizen home screen are part of the core module.
Screen flow for the citizen home
The notifications screen is a part of the user engagement module and shows all the active events, messages and broadcast messages.
For Event notifications, we are using OnGroundEventCard
component
For What's new notification, we are using WhatsNewCard
component
For Broadcast messages, we are using BroadcastWhatsNewCard
component
All these screens are accessible without logging in.
cURL for notification API -
curl 'https://qa.digit.org/egov-user-event/v1/events/_search?tenantId=pb.amritsar&_=1639123598630' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/citizen/engagement/notifications' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":null}}' \
--compressed
However, after logging in notification count becomes available to use and the system displays the unread notification count as a ticker on the notification icon.
Notification count cURL -
curl 'https://qa.digit.org/egov-user-event/v1/events/notifications/_count?tenantId=pb.amritsar&_=1639124556487' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/citizen' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"307ae48a-d684-4bf3-b109-9d2d2926e81b"}}' \
--compressed
Notification count update cURL -
curl 'https://qa.digit.org/egov-user-event/v1/events/lat/_update?tenantId=pb.amritsar&_=1639124605545' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/citizen/engagement/notifications' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"307ae48a-d684-4bf3-b109-9d2d2926e81b"}}' \
--compressed
Events are also a part of the Engagement module. Only active events are displayed on the events list page.
Events API cURL -
curl 'https://qa.digit.org/egov-user-event/v1/events/_search?tenantId=pb.amritsar&eventTypes=EVENTSONGROUND&_=1639134376115' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/citizen/engagement/events/details/b29e70c7-284f-489e-982e-67806245779c' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker","authToken":"307ae48a-d684-4bf3-b109-9d2d2926e81b"}}' \
--compressed
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Employee users with user roles including “EMPLOYEE ADMIN
" or “EMPLOYEE
" have access to the event actions.
curl 'https://qa.digit.org/egov-user-event/v1/events/_search?tenantId=pb.amritsar&status=ACTIVE,INACTIVE&eventTypes=BROADCAST&limit=10&offset=0&_=1639369326123' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/employee/engagement/messages/inbox' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker"}}' \
--compressed
curl 'https://qa.digit.org/egov-user-event/v1/events/_create?_=1639369667873' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/employee/engagement/messages/response' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"events":[{"recepient":null,"source":"WEBAPP","eventType":"BROADCAST","tenantId":"pb.amritsar","description":"contect","name":"Message","eventDetails":{"documents":[],"fromDate":1639506540000,"toDate":1640284140000}}],"RequestInfo":{"apiId":"Rainmaker","authToken":"df875063-9b4e-4fc7-bad6-f80844a6b4ed"}}' \
--compressed
curl 'https://qa.digit.org/egov-user-event/v1/events/_update?_=1639369794800' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/employee/engagement/messages/response?update=true' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"events":[{"tenantId":"pb.amritsar","id":"4d888e56-be4d-45a0-b05c-f7939f544213","referenceId":null,"eventType":"BROADCAST","eventCategory":null,"name":"Message","description":"content","status":"ACTIVE","source":"WEBAPP","postedBy":"d0710c4c-728a-446d-bc7e-d4614efe1463","recepient":null,"actions":null,"eventDetails":{"documents":[],"fromDate":1639440000000,"toDate":1640217600000},"auditDetails":{"createdBy":"d0710c4c-728a-446d-bc7e-d4614efe1463","createdTime":1639369670687,"lastModifiedBy":"d0710c4c-728a-446d-bc7e-d4614efe1463","lastModifiedTime":1639369670687},"recepientEventMap":null,"generateCounterEvent":null,"internallyUpdted":null,"user":{"id":12074,"userName":"QAADMIN","salutation":null,"name":"FSM Admin","gender":"MALE","mobileNumber":"9966999999","emailId":null,"altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceAddress":null,"correspondenceCity":null,"correspondencePinCode":null,"alternatemobilenumber":null,"active":true,"locale":null,"type":"EMPLOYEE","accountLocked":false,"accountLockedDate":0,"fatherOrHusbandName":"Test","relationship":"FATHER","signature":null,"bloodGroup":null,"photo":null,"identificationMark":null,"createdBy":12011,"lastModifiedBy":1,"tenantId":"pb.amritsar","roles":[{"code":"FSM_VIEW_EMP","name":"FSM Employee Application Viewer","tenantId":"pb.amritsar"},{"code":"FSM_ADMIN","name":"FSM Administrator","tenantId":"pb.amritsar"},{"code":"EMPLOYEE","name":"Employee","tenantId":"pb.amritsar"},{"code":"FSM_REPORT_VIEWER","name":"FSM Employee Report Viewer","tenantId":"pb.amritsar"},{"code":"STADMIN","name":"State Administrator","tenantId":"pb.amritsar"},{"code":"EMPLOYEE ADMIN","name":null,"tenantId":"pb.amritsar"},{"code":"FSM_DASHBOARD_VIEWER","name":"FSM Employee Dashboard Viewer","tenantId":"pb.amritsar"}],"uuid":"d0710c4c-728a-446d-bc7e-d4614efe1463","createdDate":"15-02-2021 14:41:32","lastModifiedDate":"06-04-2021 14:58:43","dob":"1990-09-09","pwdExpiryDate":"16-05-2021 14:41:32"}}],"RequestInfo":{"apiId":"Rainmaker","authToken":"df875063-9b4e-4fc7-bad6-f80844a6b4ed"}}' \
--compressed
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Employee users with user roles including “EMPLOYEE ADMIN
" or “EMPLOYEE
" have access to the event actions.
curl 'https://qa.digit.org/egov-user-event/v1/events/_search?tenantId=pb.amritsar&eventTypes=EVENTSONGROUND&limit=10&offset=0&_=1639367436102' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/employee/engagement/event/inbox' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"RequestInfo":{"apiId":"Rainmaker"}}' \
--compressed
curl 'https://qa.digit.org/egov-user-event/v1/events/_create?_=1639367625957' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/employee/engagement/event/response' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"events":[{"source":"WEBAPP","eventType":"EVENTSONGROUND","tenantId":"pb.amritsar","description":"Be safe bro","name":"HEY","eventcategory":"PUBLICHEALTH","eventDetails":{"fromDate":1639453920000,"toDate":1640505480000,"fromTime":"09:22","toTime":"13:28","address":"moon ","organizer":"SOMEONE","fees":"1000","longitude":74.8978579,"latitude":31.6160638}}],"RequestInfo":{"apiId":"Rainmaker","authToken":"df875063-9b4e-4fc7-bad6-f80844a6b4ed"}}' \
--compressed
curl 'https://qa.digit.org/egov-user-event/v1/events/_update?_=1639367667570' \
-H 'Connection: keep-alive' \
-H 'sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96", "Google Chrome";v="96"' \
-H 'Accept: application/json, text/plain, */*' \
-H 'DNT: 1' \
-H 'Content-Type: application/json;charset=UTF-8' \
-H 'sec-ch-ua-mobile: ?0' \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36' \
-H 'sec-ch-ua-platform: "Windows"' \
-H 'Origin: https://qa.digit.org' \
-H 'Sec-Fetch-Site: same-origin' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Dest: empty' \
-H 'Referer: https://qa.digit.org/digit-ui/employee/engagement/event/response?update=true' \
-H 'Accept-Language: en-US,en;q=0.9,hi;q=0.8' \
--data-raw '{"events":[{"tenantId":"pb.amritsar","id":"671036f4-671e-41be-b04d-ed330e545747","referenceId":null,"eventType":"EVENTSONGROUND","eventCategory":"PUBLICHEALTH","name":"HEY","description":"Be safe bro","status":"ACTIVE","source":"WEBAPP","postedBy":"d0710c4c-728a-446d-bc7e-d4614efe1463","recepient":null,"actions":null,"eventDetails":{"id":"ce296daf-0409-4f6d-a24c-406eeafcbbd9","eventId":"671036f4-671e-41be-b04d-ed330e545747","organizer":"SOMEONE","fromDate":1639453920000,"toDate":1640505480000,"latitude":31.6160638,"longitude":74.8978579,"address":"moon ","documents":null,"fees":"200","fromTime":"09:22","toTime":"13:28"},"auditDetails":{"createdBy":"d0710c4c-728a-446d-bc7e-d4614efe1463","createdTime":1639367627529,"lastModifiedBy":"d0710c4c-728a-446d-bc7e-d4614efe1463","lastModifiedTime":1639367627529},"recepientEventMap":null,"generateCounterEvent":null,"internallyUpdted":null,"user":{"id":12074,"userName":"QAADMIN","salutation":null,"name":"FSM Admin","gender":"MALE","mobileNumber":"9966999999","emailId":null,"altContactNumber":null,"pan":null,"aadhaarNumber":null,"permanentAddress":null,"permanentCity":null,"permanentPinCode":null,"correspondenceAddress":null,"correspondenceCity":null,"correspondencePinCode":null,"alternatemobilenumber":null,"active":true,"locale":null,"type":"EMPLOYEE","accountLocked":false,"accountLockedDate":0,"fatherOrHusbandName":"Test","relationship":"FATHER","signature":null,"bloodGroup":null,"photo":null,"identificationMark":null,"createdBy":12011,"lastModifiedBy":1,"tenantId":"pb.amritsar","roles":[{"code":"FSM_VIEW_EMP","name":"FSM Employee Application Viewer","tenantId":"pb.amritsar"},{"code":"FSM_ADMIN","name":"FSM Administrator","tenantId":"pb.amritsar"},{"code":"EMPLOYEE","name":"Employee","tenantId":"pb.amritsar"},{"code":"FSM_REPORT_VIEWER","name":"FSM Employee Report Viewer","tenantId":"pb.amritsar"},{"code":"STADMIN","name":"State Administrator","tenantId":"pb.amritsar"},{"code":"EMPLOYEE ADMIN","name":null,"tenantId":"pb.amritsar"},{"code":"FSM_DASHBOARD_VIEWER","name":"FSM Employee Dashboard Viewer","tenantId":"pb.amritsar"}],"uuid":"d0710c4c-728a-446d-bc7e-d4614efe1463","createdDate":"15-02-2021 14:41:32","lastModifiedDate":"06-04-2021 14:58:43","dob":"1990-09-09","pwdExpiryDate":"16-05-2021 14:41:32"},"eventcategory":"PUBLICHEALTH"}],"RequestInfo":{"apiId":"Rainmaker","authToken":"df875063-9b4e-4fc7-bad6-f80844a6b4ed"}}' \
--compressed
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.