{"schemaVersion":"1.0","sourceCommit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca","sourceVisibility":"private","article":{"id":"api-mansoq-abdm-hiu-views-patientconsentrequests-5f58252f","title":"Hiu Views.Patient Consent Requests API reference · mansoq-abdm","summary":"Static source contract for Hiu Views.Patient Consent Requests: 2 declared or inherited operation mappings, schema/field evidence and authorization/refusal references. Deployment and behavioral review remain explicit.","module":"IT & integrations","roles":["IT administrator","Developer","Integration engineer"],"facilities":["All configured facility types"],"kind":"reference","minutes":3,"prerequisites":["Use the API contract from the installed deployment and an authorized synthetic test environment.","Confirm facility/organization scope, action permissions and optional app enablement.","This reference is static source evidence; complete payload, authorization, failure and end-to-end review remains recorded as pending."],"steps":[],"sections":[{"title":"Declared route and availability","body":"This resource is declared in **mansoq-abdm** at `/api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests`. plugin/local mount; actual prefix and enablement require deployment verification A registered path and an indexed handler do not prove deployment availability, user permission or production readiness."},{"title":"Operation map","body":"| Method | Path | Action | Evidence |\n| --- | --- | --- | --- |\n| GET | `/api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests` | get | explicit Django path/view declaration |\n| POST | `/api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests` | post | explicit Django path/view declaration |"},{"title":"get · GET","body":"**GET /api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests** — action `get`. static contract extracted; runtime/permission/payload behavior review pending.\n\nPath and deployment-context parameters:\n\n| Location | Parameter | Type | Required |\n| --- | --- | --- | --- |\n| path | patient_id | UUID | true |\n| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | true |\n\nDirectly observed request reads (these do not constitute a complete accepted-payload or requiredness guarantee):\n\n| Location | Field | Declared/inferred read type | Requiredness evidence |\n| --- | --- | --- | --- |\n| query | `facility` | not declared at read site | not established |\n\n**Authorization:** no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.\n\n**Class policy declarations:** permission_classes: IsAuthenticated."},{"title":"post · POST","body":"**POST /api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests** — action `post`. static contract extracted; runtime/permission/payload behavior review pending.\n\nPath and deployment-context parameters:\n\n| Location | Parameter | Type | Required |\n| --- | --- | --- | --- |\n| path | patient_id | UUID | true |\n| deployment mount | installed_plugin_prefix | deployment-selected mount prefix | true |\n\n**body validation: ConsentRequestBody**. Declared fields below; inherited fields are retained in the schema inventory.\n\n| Field | Type | Required | Constraints |\n| --- | --- | --- | --- |\n| facility_id | str | true | No extra constraint extracted |\n| purpose_code | str | false | No extra constraint extracted |\n| hi_types | list[str] | false | No extra constraint extracted |\n| date_from | str | false | No extra constraint extracted |\n| date_to | str | false | No extra constraint extracted |\n| data_erase_at | str | false | No extra constraint extracted |\n| hip_id | str | false | No extra constraint extracted |\n| hip_name | str | false | No extra constraint extracted |\n\n**Authorization:** no literal permission name was resolved in the bounded handler/helper traversal. Authentication, inherited policies, object/facility scoping and middleware still require review; this does not mean public access.\n\n**Class policy declarations:** permission_classes: IsAuthenticated.\n\n**Explicit response statuses in observed code:** dynamic status. Other branches/framework exception handling may differ.\n\n**Declared refusal/error evidence:** ValidationError (dynamic detail; inspect source); _plug_error (dynamic detail; inspect source)."},{"title":"Integration review checklist","body":"Confirm the installed route and full schema; review authentication, organization/facility scoping, all accepted fields, value-state and date/time semantics, idempotency, pagination, response/exception branches and the allowed correction/reversal workflow. Test positive and negative cases with synthetic data. This source reference does not establish external certification or replace an illustrated user procedure."}],"troubleshooting":[{"problem":"A declared route is unavailable or a request is rejected","solution":"Compare the installed revision, actual API schema, optional plugin mount, HTTP-method restrictions and recorded validation/permission evidence. Do not bypass a refusal or send a production transaction to test documentation."}],"sources":[{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":57,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":62,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":41,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}],"related":["it-api-contract","it-api-auth","security-rcm-roles"],"verification":"Static API contract — behavior review pending","version":"f6e9f05f76d4","apiReferenceIds":["backend-path-c6e881aa5f58252f","backend-path-c6e881aa5f58252f:GET:get","backend-path-c6e881aa5f58252f:POST:post"]},"backend":{"resources":[{"id":"backend-path-c6e881aa5f58252f","declaredPath":"patients/<uuid:patient_id>/abha/consent-requests","dynamicPath":false,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"conditions":[],"kind":"view","view":"hiu_views.PatientConsentRequests","classId":"repositories/platform/mansoq-abdm:abdm.hiu.views.PatientConsentRequests","actionMapping":null,"operationIds":["backend-path-c6e881aa5f58252f:GET:get","backend-path-c6e881aa5f58252f:POST:post"],"path":"/api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests","mountStatus":"plugin/local mount; actual prefix and enablement require deployment verification","reviewStatus":"direct route enumerated; behavioral review pending"}],"operations":[{"id":"backend-path-c6e881aa5f58252f:GET:get","resourceId":"backend-path-c6e881aa5f58252f","repository":"repositories/platform/mansoq-abdm","boundary":"optional-plugin/local-service","method":"GET","path":"/api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests","declaredPattern":"patients/<uuid:patient_id>/abha/consent-requests","action":"get","viewset":"hiu_views.PatientConsentRequests","classId":"repositories/platform/mansoq-abdm:abdm.hiu.views.PatientConsentRequests","detail":null,"mountStatus":"plugin/local mount; actual prefix and enablement require deployment verification","routeEvidence":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"handlerSource":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":57,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"registrationConditions":[],"evidenceKind":"explicit Django path/view declaration","decoratorStatus":null,"decoratorPolicy":{},"methodEvidenceIds":["repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py:57:get"],"schemaIds":{},"classPermissionEvidence":[{"kind":"permission_classes","declaration":["IsAuthenticated"],"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":55,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"filterEvidence":[],"reviewStatus":"static contract extracted; runtime/permission/payload behavior review pending","pathParameters":[{"name":"patient_id","in":"path","type":"UUID","required":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}},{"name":"installed_plugin_prefix","in":"deployment mount","type":"deployment-selected mount prefix","required":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}]},{"id":"backend-path-c6e881aa5f58252f:POST:post","resourceId":"backend-path-c6e881aa5f58252f","repository":"repositories/platform/mansoq-abdm","boundary":"optional-plugin/local-service","method":"POST","path":"/api/{installed_plugin_prefix}/patients/{patient_id}/abha/consent-requests","declaredPattern":"patients/<uuid:patient_id>/abha/consent-requests","action":"post","viewset":"hiu_views.PatientConsentRequests","classId":"repositories/platform/mansoq-abdm:abdm.hiu.views.PatientConsentRequests","detail":null,"mountStatus":"plugin/local mount; actual prefix and enablement require deployment verification","routeEvidence":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"handlerSource":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":62,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"registrationConditions":[],"evidenceKind":"explicit Django path/view declaration","decoratorStatus":null,"decoratorPolicy":{},"methodEvidenceIds":["repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py:62:post"],"schemaIds":{"body validation":"repositories/platform/mansoq-abdm:abdm.hiu.views.ConsentRequestBody"},"classPermissionEvidence":[{"kind":"permission_classes","declaration":["IsAuthenticated"],"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":55,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"filterEvidence":[],"reviewStatus":"static contract extracted; runtime/permission/payload behavior review pending","pathParameters":[{"name":"patient_id","in":"path","type":"UUID","required":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}},{"name":"installed_plugin_prefix","in":"deployment mount","type":"deployment-selected mount prefix","required":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/urls.py","line":52,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}]}],"methodEvidence":[{"id":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py:57:get","name":"get","owner":"repositories/platform/mansoq-abdm:abdm.hiu.views.PatientConsentRequests","summary":"","source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":57,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"signatureParameters":[{"name":"patient_id","type":"unspecified","required":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":57,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"parametersRead":[{"name":"facility","in":"query","type":"not declared at read site","required":"not established","readStyle":"get","dynamicName":false,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":59,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"permissionChecks":[],"declaredErrors":[],"explicitResponseStatuses":[],"conditions":[],"schemaIds":[],"schemaUsages":[],"unconditionalRaise":false,"reviewStatus":"static declaration extracted; behavioral/security review pending"},{"id":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py:62:post","name":"post","owner":"repositories/platform/mansoq-abdm:abdm.hiu.views.PatientConsentRequests","summary":"","source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":62,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"signatureParameters":[{"name":"patient_id","type":"unspecified","required":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":62,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"parametersRead":[],"permissionChecks":[],"declaredErrors":[{"exception":"ValidationError","message":null,"dynamicMessage":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":67,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}},{"exception":"_plug_error","message":null,"dynamicMessage":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":72,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}},{"exception":"ValidationError","message":null,"dynamicMessage":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":74,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"explicitResponseStatuses":[{"value":null,"symbol":null,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":77,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"conditions":[],"schemaIds":["repositories/platform/mansoq-abdm:abdm.hiu.views.ConsentRequestBody"],"schemaUsages":[{"purpose":"body validation","schemaId":"repositories/platform/mansoq-abdm:abdm.hiu.views.ConsentRequestBody","source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":65,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"}}],"unconditionalRaise":false,"reviewStatus":"static declaration extracted; behavioral/security review pending"}],"schemas":[{"id":"repositories/platform/mansoq-abdm:abdm.hiu.views.ConsentRequestBody","name":"ConsentRequestBody","source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":41,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"kind":"Python declared schema/model evidence","fields":[{"name":"facility_id","type":"str","required":true,"hasDefault":false,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":42,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"purpose_code","type":"str","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":43,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"hi_types","type":"list[str]","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":44,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"date_from","type":"str","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":45,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"date_to","type":"str","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":46,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"data_erase_at","type":"str","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":47,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"hip_id","type":"str","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":48,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}},{"name":"hip_name","type":"str","required":false,"hasDefault":true,"source":{"path":"repositories/platform/mansoq-abdm/backend/src/abdm/hiu/views.py","line":49,"commit":"f6e9f05f76d443b26ebd2369f67d3c3bd52257ca"},"constraints":{}}],"validation":[],"baseTypes":["BaseModel"],"reviewStatus":"declared fields extracted; runtime validation review pending","referencedSchemaIds":[]}],"frameworkSettings":[]},"frontend":{"operations":[],"schemas":[]},"services":{"operations":[]},"boundaries":[]}