How Consent manager works? Also If I saved any consent in Consent manager then how can I access that saved consent?

How consent manager works and how it manages the different version of consents?

When I save any consent and I want to retrieve the saved consent then will it save the complete consent text of that version when I saved it or just the version and at the time of retrieval the version will be matched and consent text will be returned of the same version?

4 Likes

How consent manager works?

  • First we need to configure our different consent on developer portal inside consent-manager module.
  • When we configured and sync then all the configuration are available in our VRT redis server.
  • Then we have to deploy the consent manager microservice to our VRT server.
  • Consent Manager microservice exposed Below API

** Get all Configured Consent by Id

`curl --location '{{HOST}}/consent-manager/api/consent/get' \
--header 'Content-Type: application/json' \
--data '{
    "consentId": "PAN",
    "language": "",
    "orgId": "orgId",
    "appId": "appId",
    "loginId": "TEST",
    "channelId": "",
    "channelType": "",
    "requestDate": "",
    "employeeId": "",
    "requestId": "",
    "subChannelId": "",
    "source": "",
    "subSource": ""
}'
`

** Create Consent

curl --location '{{HOST}}/consent-manager/api/user-consent/create' \
--header 'Content-Type: application/json' \
--data '{
    "consentId": "consentId",
    "consentLanguageId": "consentLanguageId",
    "language": "ENGLISH",
    "remarks": "",
    "status": "SUCCESS",
    "version": "",
    "requestorId": "",
    "requestorType": "",
    "audio": "",
    "video": "",
    "channelType": "",
    "channelId": "",
    "employeeId": "",
    "recordIdentifier1": "recordIdentifier1",
    "recordIdentifier2": "recordIdentifier2",
    "recordIdentifier3": "recordIdentifier3",
    "subChannelName": "",
    "subChannelId": "",
    "lat": "",
    "lang": "",
    "source": "",
    "subSource": "",
    "deviceDetails": "",
    "loginId": "loginId",
    "appId": "appId",
    "orgId": "orgId",
    "consentData": "consentData" // Here we can store the original consent text/html
}'	 

** Get user Consent:

curl --location '{{HOST}}/consent-manager/api/user-consent/get' \
--header 'Content-Type: application/json' \
--data '{
    "id": "7ca2bc69-8c0c-43a4-87b1-00c6a0661571", // consent id which you will get in create consent response
    "appId": "appId",
    "orgId": "orgId"
}'

Version Control:

  • Currently Consent Configuration version maintained at Vahana Cloud level. But not at user level due to some limitation in VRT.
  • To know the user consent version we have a consent Data field in create consent API, Where we can store the consent text/html.
  • When we get the consent by id in get consent API, we also get the consent text/html for which user has given his consent.
3 Likes