API Health Information Transfer Issue

Hi,

I am receiving Error : (1418) Date Range given is invalid in response of API
https://dev.abdm.gov.in/gateway/v0.5/health-information/hiu/on-request [1]
I have raised consent request and approved it.
I have received consent artefact on callback api.

Consent Artefect Id - 1 : f508c68a-2659-40cf-8e4e-16121b88b460
Consent Artefect Id - 2 : 1eed542a-be60-4238-a662-66567e878f62

Below is consent request json payload. [2]

[1] API : https://dev.abdm.gov.in/gateway/v0.5/health-information/cm/request

Request :
{
“requestId”: “cf340cf1-0e73-4280-905d-3fd4b99b9fb6”,
“timestamp”: “2022-05-23T05:08:01.1054195Z”,
“hiRequest”: {
“consent”: {
“id”: “1eed542a-be60-4238-a662-66567e878f62”,
“digitalSignature”: “KeP4znVD458RAR23aRe3kkqENfAuJ4FwH+Xqlf/FqPpC+/MZ6PGZiszcBMGrsVSh+fdFwaQVNHrCaM1ZqbaMqbs3XdCEamVrKpVfCK7+VaH20h+55aKIXde95cqTVoBy5dyj14W2wmO1+SnVroCZ6XQ8WitP7qmBNhZLl/tPW6tyv4u4joojDKYFJK368eafXKfEEnyHrRhdICYzio4+B9oUMP2CHI84vcjo0w/RnmcxoxMJ7m0oDLEI3O7+YYM08Pbm02fWWUm4XUaSIq1kqGvlPac5/S06MkxZ4NItsg4cJXcw/7k2dHyNdZyV2oD0MXv7U/wvCSAdvEQDQN3rPQ==”
},
“dateRange”: {
“from”: “1972-05-23T18:30:00.0000000Z”,
“to”: “2022-05-24T18:30:00.0000000Z”
},
“dataPushUrl”: “https://uatuhidom.driefcase.com/data/notification/v0.5/health-information/transfer”,
“keyMaterial”: {
“cryptoAlg”: “ECDH”,
“curve”: “Curve25519”,
“dhPublicKey”: {
“expiry”: “2022-05-23T07:08:01.1026918Z”,
“parameters”: “”,
“keyValue”: “AkX6KhvTEyN8AGdronMEvC70DR6lApGeja2lSKb5Y+xP”
},
“nonce”: “AbVz68tt0A+AlygW4SW7x8wCD9GS2PXssD0I8AnAvKc=”
}
}
}

API : https://dev.abdm.gov.in/gateway/v0.5/health-information/hiu/on-request
Response :
{
“requestId”: “60cdb08a-e00c-4416-a057-b7e4350d1417”,
“timestamp”: “2022-05-23T05:08:05.771525”,
“hiRequest”: null,
“error”: {
“code”: “1418”,
“message”: “Date Range given is invalid”
},
“resp”: {
“requestId”: “1b521f61-a3c7-4154-8f24-c9ce63f5d362”
}
}

[2]
API : https://dev.abdm.gov.in/gateway/v0.5/consent-requests/init
Request :
{
“requestId”: “58454f39-da21-4736-ae96-9065cd1a456a”,
“timestamp”: “2022-05-23T05:09:41.5901293Z”,
“consent”: {
“purpose”: {
“text”: “Care Management”,
“code”: “CAREMGT”,
“refUri”: null
},
“patient”: {
“id”: “sriramkailasam@sbx”,
“name”: null
},
“hip”: null,
“hiu”: {
“id”: “uhi-driefcase-hiu”
},
“requester”: {
“name”: “Dr. Sriram Kailasam”,
“identifier”: {
“type”: “Dr. Sriram Kailasam”,
“value”: “sriram@phpr”,
“system”: “”
}
},
“hiTypes”: [
“Prescription”,
“DiagnosticReport”,
“OPConsultation”,
“DischargeSummary”,
“ImmunizationRecord”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“permission”: {
“accessMode”: “VIEW”,
“dataEraseAt”: “2022-05-24T18:30:00.0000000Z”,
“dateRange”: {
“from”: “1972-05-23T18:30:00.0000000Z”,
“to”: “2022-05-24T18:30:00.0000000Z”
},
“frequency”: {
“unit”: “HOUR”,
“value”: “1”,
“repeats”: “1”
}
}
}
}

API : https://dev.abdm.gov.in/gateway/v0.5/consent-requests/on-init
Response :
{
“requestId”: “59b80605-8dd6-4950-93d6-c7ab2fc469a0”,
“timestamp”: “2022-05-23T05:06:46.300709”,
“consentRequest”: {
“id”: “d454cd27-fe45-4acd-bed5-73ea90deb3c7”
},
“error”: null,
“resp”: {
“requestId”: “58454f39-da21-4736-ae96-9065cd1a456a”
}
}

@Govind_Deshmukh kindly look into it.

Hey @Hemant,

Expiry date has to be greater then current time stamp.
Please try with that.

Thanks

If any one still looking for solution for this…
The date range given for consent-requests/init i.e from and to should also match in health-information/cm/request request payload