curl --request POST \
--url https://api.eka.care/abdm/v1/consents/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"appointment_id": "<string>",
"care_contexts": [
{
"cc_ref": "<string>",
"patient_ref": "<string>"
}
],
"hip_identifier": {
"id": "<string>",
"name": "<string>"
},
"hiu": {
"clinic_id": "<string>",
"d_oid": "<string>",
"requester": {
"identifier": {
"system": "<string>",
"type": "<string>",
"value": "<string>"
},
"name": "<string>"
}
},
"patient": {
"health_id": "<string>",
"oid": "<string>"
},
"period": {
"expiry": "2023-11-07T05:31:56Z",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z"
},
"purpose": "Self Requested",
"record_types": "OPConsultation"
}
'