PHR - Update subscription API not working

We are trying to update the subscription request health locker but the API is returning error.

Request Body:
{
“hiuId”: “medixcel-demo-health-locker”,
“subscriptionEditAndApprovalRequest”: {
“isApplicableForAllHIPs”: false,
“includedSources”: [
{
“hip”: {
“id”: “medixcel-lohegaon-clinic-hip”,
“name”: null
},
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: “”
},
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“ImmunizationRecord”,
“DischargeSummary”,
“OPConsultation”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“period”: {
“from”: “2017-04-01T07:30:00.000Z”,
“to”: “2025-05-14T07:30:00.000Z”
},
“categories”: [
“LINK”,
“DATA”
]
},
{
“hip”: {
“id”: “medixcel-demo-health-locker”,
“name”: null
},
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: “”
},
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“ImmunizationRecord”,
“DischargeSummary”,
“OPConsultation”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“period”: {
“from”: “2017-04-01T07:30:00.000Z”,
“to”: “2025-05-14T07:30:00.000Z”
},
“categories”: [
“LINK”,
“DATA”
]
},
{
“hip”: {
“id”: “medixcel-district-heart-care-centre-hip”,
“name”: null
},
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: “”
},
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“ImmunizationRecord”,
“DischargeSummary”,
“OPConsultation”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“period”: {
“from”: “2017-04-01T07:30:00.000Z”,
“to”: “2025-05-14T07:30:00.000Z”
},
“categories”: [
“LINK”,
“DATA”
]
},
{
“hip”: {
“id”: “mxcel-hip-mycare”,
“name”: null
},
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: “”
},
“hiTypes”: [
“DiagnosticReport”,
“Prescription”,
“ImmunizationRecord”,
“DischargeSummary”,
“OPConsultation”,
“HealthDocumentRecord”,
“WellnessRecord”
],
“period”: {
“from”: “2017-04-01T07:30:00.000Z”,
“to”: “2025-05-14T07:30:00.000Z”
},
“categories”: [
“LINK”,
“DATA”
]
}
]
}
}

API is returning “unknown error occurred” error message

@shubham_1745,
Please check the below API curl and try it once.
curl --location --request POST ‘https://dev.abdm.gov.in/gateway/v0.5/subscription-requests/cm/init
–header ‘X-CM-ID: sbx’
–header ‘Authorization: bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJBbFJiNVdDbThUbTlFSl9JZk85ejA2ajlvQ3Y1MXBLS0ZrbkdiX1RCdkswIn0.eyJleHAiOjE2NjYxNzM0NTUsImlhdCI6MTY2NjE3Mjg1NSwianRpIjoiNDkyZmU5YTEtZDgyNC00NGU4LWEyNGEtZmVhYWRiYjc3MjYwIiwiaXNzIjoiaHR0cHM6Ly9kZXYubmRobS5nb3YuaW4vYXV0aC9yZWFsbXMvY2VudHJhbC1yZWdpc3RyeSIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiIxNWYwM2Q3NC05YWY1LTRhYTgtYWM0ZC04ZTRjNzNiZGVlNzEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJNQU5JU0hfVEVTVCIsInNlc3Npb25fc3RhdGUiOiI3ZjZjZjc0ZC03MWFmLTRmMDgtYmQyMi0wYmExNjYyZDEzNWIiLCJhY3IiOiIxIiwiYWxsb3dlZC1vcmlnaW5zIjpbImh0dHA6Ly9sb2NhbGhvc3Q6OTAwNyJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiaGVhbHRoaWRfc2VydmVyIiwiSGlkSW50ZWdyYXRlZFByb2dyYW0iLCJoZnIiLCJoaXUiLCJvZmZsaW5lX2FjY2VzcyIsImhlYWx0aElkIiwicGhyIiwiT0lEQyIsImhlYWx0aF9sb2NrZXIiLCJoaXAiLCJocF9pZCJdfSwicmVzb3VyY2VfYWNjZXNzIjp7Ik1BTklTSF9URVNUIjp7InJvbGVzIjpbInVtYV9wcm90ZWN0aW9uIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6Im9wZW5pZCBlbWFpbCBwcm9maWxlIiwiY2xpZW50SWQiOiJNQU5JU0hfVEVTVCIsImNsaWVudEhvc3QiOiIxMC4yMzMuNjguMTkyIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtbWFuaXNoX3Rlc3QiLCJjbGllbnRBZGRyZXNzIjoiMTAuMjMzLjY4LjE5MiJ9.UnPzD4cbtM5j9s0l3K306TIh6CS_e95fH-RoaiUldnOEE8u2gtHbLIpTDhHKp_NIrL1QsMUE-NmHzUJ2b7-2OE75SgPmRlto0HG2TlyrCGU1y8lz2bR29exsERzyHhrRUr0agJ3bCbbxXXxTrzAYrOWpfm79NoBSngFRiLFeZFgDJWIng_yAXu6BWX2dacdXdqt0mHimguOvZK-egH8UrGdgFuh7Oiw3DG8FcH8RNmVKujORee9d6BS8Q1dJUHq-fzZPQpVk0qmeUonIHYuyt-7O38MtRWjI1RIk9hHv5MNfe-c–3lJGE98mhM017QYWgGQqY5_iJvt3Ipgt4f6gg’
–header ‘Content-Type: application/json’
–header ‘Cookie: TS011c04bd=01445fed0408adc16eff655b83386fc84dc6abb6b75bb30d5ec00b9defedfd710eaefd9b070975ba380648da459f4e1a7be0200116’
–data-raw ‘{
“requestId”: “ea1d9cc9-1c89-4735-aa71-71196d1ae2e9”,
“timestamp”: “2023-01-03T09:11:25.172000”,
“subscription”: {
“purpose”: {
“text”: “Self Requested”,
“code”: “PATRQT”,
“refUri”: “string”
},
“patient”: {
“id”: “manish03@sbx”
},
“hiu”: {
“id”: “GND-HIU”
},
“categories”: [
“LINK”,
“DATA”
],
“period”: {
“from”: “2022-12-22T08:54:51.397Z”,
“to”: “2023-12-18T08:54:51.397Z”
}
}
}’
Thanks

Hi @Govind_Deshmukh ,

The API you mentioned is to create subscription request. We have implemented that API successfully.

We are facing issue in update subscription API. In case user wants to update the subscription.
Endpoint Is - /patients/subscription-requests/{subscription-id}
Doc - https://sandbox.abdm.gov.in/swagger/ndhm-phr-app.yaml

Can you please verify for above mentioned API once?

Thanks.

Hi @Govind_Deshmukh, Any update on this?

Hi @shubham_1745, API is correct. It might be a temporary issue with the system. Pls try again and verify.