consentRequestId coming empty in hiu/notify request

Hi,
the key ‘consentRequestId’ is coming empty in the hiu notify call at v0.5/consents/hiu/notify.

This is the body that I got on consent was REVOKED.

{u'timestamp': u'2020-09-18T14:55:16.87108', u'requestId': u'a7751c51-a0dc-475b-8dac-b7df92c6c16e', u'notification': {u'status': u'REVOKED', u'consentRequestId': u'', u'consentArtefacts': [{u'id': u'c3b4486c-cc61-4ce6-82b2-e8c8b6d7b4d4'}]}}

is this expected to happen ?

Yes, that’s as expected. When users revokes a consent, you will get notified of the consent-artefact ID.
When user denies a request, then the consent-request-id is passed

Hello @angshuonline sir, @sukreet sir
I have added new Consent Request by login at https://dev.ndhm.gov.in/hiu#/.
I got request on PHR mob app and I have granted request allowed.
On my HIP callback, v0.5/consents/hip/notify api got hit, and received data as shown below.
{
“notification”: {
“consentDetail”: {
“consentId”: “3cf75a41-ddc0-448f-992f-6119e984e0e7”,
“createdAt”: “2020-09-30T06:07:55.27927”,
“purpose”: {
“text”: “Care Management”,
“code”: “CAREMGT”,
“refUri”: null
},
“patient”: {
“id”: “surajsurya06@sbx”
},
“consentManager”: {
“id”: “sbx”
},
“hip”: {
“id”: “HELTHCOCO_588687”,
“name”: null
},
“hiTypes”: [
“OPConsultation”,
“DiagnosticReport”,
“DischargeSummary”,
“Prescription”
],
“permission”: {
“accessMode”: “VIEW”,
“dateRange”: {
“from”: “2020-09-30T06:01:57.635”,
“to”: “2020-09-30T06:01:57.635”
},
“dataEraseAt”: “2020-10-01T18:01:00”,
“frequency”: {
“unit”: “HOUR”,
“value”: 1,
“repeats”: 0
}
},
“careContexts”: [
{
“patientReference”: “New OPD Request”,
“careContextReference”: “New OPD Request in Care COntext”
}
]
},
“status”: “GRANTED”,
“signature”: “ZFgJk/g49wJme12tNSzF9L86kB2NqBZvjbrtS7OZ2oJJpsks5RbLfrMDPHz92ZRQ2wPVi55NyelDFG6BzXuGWYgUvXxLGLh+3CqGF/jCn/zVxTQ5xJgNJzN04Fb9XwbO7GQAKj3jkOP2zx3ynX/bON4VRcwGuWlkUbks12Vxl6KIRa2MZY6aEvLuZN5wEkj54xuUpGaJxXI+TdRWa2FWlFvANC2a8CMDKuVxo7tBsl1Yh2C+KDyZr9FZuPRDnvs5K/LNXK5xG3OOL8L3yiqZ++BfajBROFkT7VMuRPA3rX7WxMmekb3E0eVNpGqo/Dq1q+Boz9sBxVS+kE7hCfrYzw==”,
“consentId”: “3cf75a41-ddc0-448f-992f-6119e984e0e7”
},
“requestId”: “5c8d369f-4b39-4b8b-80a4-d9d26035bad8”,
“timestamp”: “2020-09-30T06:07:55.551929”
}

how should I proceed further? Do I need to call v0.5/consents/hip/on-notify using this response?

This is the notification you receive when patient grants the consent-request. You need to acknowledge that you received the notification. Please follow https://sandbox.ndhm.gov.in/swagger/ndhm-hip.yaml.
You can find /v0.5/consents/hip/on-notify under Gateway section.

Hello,
I received the notification. What to do with /consents/hip/on-notify api under gatewat section? after /consents/hip/notify do we need to call /consents/hip/on-notify api ?

yes…you need to call /consents/hip/on-notify to send the acknowledgement

Hello,
after calling api, got this errror,
{
“error”: {
“code”: 2500,
“message”: “No mapping found for resp.requestId on cache”
}
}

and this is my raw data body,
{
“requestId”: “{{$guid}}”,
“timestamp”: “{{timestampUtcIso8601}}”,
“acknowledgement”: {
“status”: “OK”,
“consentId”: “3cf75a41-ddc0-448f-992f-6119e984e0e7”
}
}
I have added proper headers.
Did i did something wrong here?

the error is psresnet in the message … No mapping found for resp.requestId on cache.
Plus there is no resp key present in the data body

I used by adding resp key in body earlier.But again same error. I think issue was we need to be so much quick here, to call hip/on-notify here with proper data, otherwise it gives above error. Now, got success. Thanks.

Hey, I am getting same error. What value you are passing to resp.requestId? and what fix made it work for you?