---
id: service-read-individual-record-read
title: "Read consent record"
description: "This endpoint is used to read a consent record for an individial for a chosen data agreement. There should be one unambiguous consent record for an individual."
sidebar_label: "Read consent record"
hide_title: true
hide_table_of_contents: true
api: eJzdWNty3LgR/ZUuvESq4nBk2d7NTrk2kSzvZuItryPJSaq8qnIP2SSxIgEaAEeaqOZtvySfli9JNcDbcEaOnLdEDxJFoht9Od2ngQeRkk2MrJ3USizEdSEtkEprLZUDaaGxlILTYAhTQEi0sqQcGEq0SSHTBlCBVKlcy1RiGd5AUmhLClJ0CJgbooqUi+G6IENgC92UKawItCJoFFYrmTe6sV/W3mAZi0jomgyytctULIQls5YJXRKmy37ZpRfndyISNRqsyJGxYvHxYeLuByU/NwTLC9AZb6VXv1LiRCQkf63RFSISCisSC8HOnHW+LFm1oc+NNJSKhTMNRcImBVUoFg/CbWoWsc5IlYvtNnoIGgvClMyg8++z18Hl8/PZYP/XKY8mPg16YHkhtjesyta8jWXp05MT/pNo5Ug5fsS6LmXiYzr/1bKOh9FuteGIOxmk2wyFCI+M6QPnpCv5xeudhVMbz6appvvakLU0YOAILaSUSUUpSAWOgblqZJlKlcOq1Mnt7yzYmhKZtcYfM04RrFR5SXAxTlcHvaqxjoGH8OHd8i8f3vjdnEEGu1ZwtAtYMLSWVmoVjTB4LCJxP1PazaSa8foVWhKLDEtL46x9FJL97pVdtrr+hJZBZR06EjfRJL4y3c9wJDJtKnRiIUQk6B6r2of4m5cvvn12enpKv0++TZ6vVs+T0+S7706e7UX7Z58cCxVu2PkaLRf1CpNbWG3A6org7P2yL3sLd9IVunFcEcsLOHr/9jiClJR2HHtXoANX0AbQcCR/EanBzP0iIpAxxYCwk/uwXlpQ2sGGHFinTZdTgi6CgCoFrcoN0L20zn82qKx0MVyw/l2tFlLtNRa4ZiMu+0ytGgcygxo5DdDU3hlAuJK5QtcYigBhjaVMe6FRR8pJcXuhNPaFNSn5A6m5n2W3s0qnVIqF2MHcXhquiwkqGa93hUyKHvQFWlgRKcjlmtSeC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9kwD3r263rspx09nyBs0x//mDPkPaWBAz8FG+ETHCntyCvgM2Hpw1BjQscRUJzHE7ULaAVfbXRjOCKzW9p8/8lPPmOQPIiV/++Hjiz+/Lfrfd8UoG+E4PQt9aP5gJDIt9AW8bv3IkEkCpaPpWsj15hsIEVbrDSaFEqdSxWBv6UJSzOjq7BVyjF1G6iNXkuOV6tFmxyVtG2wr0j5+QHtXjyC0/DKK+ZAtNcWnof8N9G3CAYU34wIqTLd9SNMfD+iCiWDzjZ1rY37Yw+0ASjyx+HVLkKHxXu13wvB0b9+++cxkxvC1R2l0hbhEET3YYj0k04YfALIoC3ZPjh+rGysp+Uym1m9JkMyV30Yo/HglBjyr7G0fP5MZS4dnwSwLMn5zazmybPWKThKCqU5UWQjIIUrj0QERXdQ0ppKTgz3Td9ccSVLzhorwcbpCv0xPdFVXUpUCQWUe/cM5U0Y1SxPDwiedQGbVDpvZ4VKkeHElTIhZX2n7mqzxqQgOI1P9mJ+d3cXo/8ca5PPW1k7/2n5+s27qzczltkOl0NDHriiU5003N26mufmFvJ1enL6In4eP2PZWltXoRrZwxd803PTJOMjlvsfuNpsK8PRvZvXJUp/AeAD/dAyx8fuwlOMD6f+trBzf4c/RCQW00uMm0gU2jpW9vDAU/EHU263/PpzQ8azXCTWaDxwA8lIy89pPz4/GuOjy3ZWOIZHr1YPetmRg2Jm8K08jNG3zB179zBbPlS11PFfG7h7T/qIXWH/L1zT9rYyk4bVZ0lCtRt92xuvtuPJ4Mc3TAbYMsXAkreeJdsH9vJgjKaEGUzg32zQQZFXXHRvafN9vzx8eVSgJ+mwmiNzs91u/w0o03eT
sidebar_class_name: "get api-method"
info_path: docs/consent-management-individual-api/igrant-io-api-documentation
custom_edit_url: null
---

> **Build this with an AI coding agent.** Install the iGrant.io Agent Skills, then ask your agent to build the integration:
>
> ```bash
> npx skills add L3-iGrant/skills
> ```


import ApiTabs from "@theme/ApiTabs";
import DiscriminatorTabs from "@theme/DiscriminatorTabs";
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import SecuritySchemes from "@theme/ApiExplorer/SecuritySchemes";
import MimeTabs from "@theme/MimeTabs";
import ParamsItem from "@theme/ParamsItem";
import ResponseSamples from "@theme/ResponseSamples";
import SchemaItem from "@theme/SchemaItem";
import SchemaTabs from "@theme/SchemaTabs";
import Markdown from "@theme/Markdown";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";

<h1 className={"openapi__heading"}>Read consent record</h1>

<MethodEndpoint method={"get"} path={"/service/individual/record/data-agreement/{dataAgreementId}"}></MethodEndpoint>



This endpoint is used to read a consent record for an individial for a chosen data agreement. There should be one unambiguous consent record for an individual.

## Request

<details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Path Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"description":"Unique ID of an object","in":"path","name":"dataAgreementId","required":true,"schema":{"type":"string"}}}></ParamsItem></ul></div></details><details style={{"marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collapsed={false} open={true}><summary style={{}}><h3 className={"openapi-markdown__details-summary-header-params"}>Header Parameters</h3></summary><div><ul><ParamsItem className={"paramsItem"} param={{"in":"header","name":"X-ConsentBB-IndividualId","required":true,"schema":{"type":"string"},"description":"Individual ID"}}></ParamsItem></ul></div></details><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Consent record for individual retrieved successfully

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>consentRecord</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

A consent record expresses consent (as defined in this building block's specification) to a single DataAgreement. There must be a UNIQUE constraint on (data agreement revision, individual)

</div><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c9901","description":"Objects may be passed back by some API endpoints without an ID (PK), denoting that they are a \"draft\", i.e. a ConsentRecord that is not yet stored in the database and only exist in transit. Draft ConsentRecords do not have a Revision, but if paired up with a Signature, a valid Revision should be generated."}}></SchemaItem><SchemaItem collapsible={false} name={"dataAgreementId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","x-fk-model":"DataAgreement","description":"The DataAgreement to which consent has been given"}}></SchemaItem><SchemaItem collapsible={false} name={"dataAgreementRevisionId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","x-fk-model":"Revision","description":"The Revision of the data agreement which consent has been given to"}}></SchemaItem><SchemaItem collapsible={false} name={"dataAgreementRevisionHash"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"a1b2c3d4e5f6...","description":"Copy of the revision hash. The hash is the included in the signature and ensures against tampering with the original agreement."}}></SchemaItem><SchemaItem collapsible={false} name={"individualId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","x-fk-model":"Individual","description":"The Individual who has signed this consent record"}}></SchemaItem><SchemaItem collapsible={false} name={"optIn"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":true,"description":"True: The individual has positively opted in. False: The individual has explicitly said no (or withdrawn a previous consent)."}}></SchemaItem><SchemaItem collapsible={false} name={"state"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`unsigned`, `signed`]"} schema={{"type":"string","format":"","example":"signed","description":"The state field is used to record state changes after-the-fact. It is maintained by the Consent BB itself. Valid states: unsigned/pending more signatures/signed","enum":["unsigned","signed"]}}></SchemaItem><SchemaItem collapsible={false} name={"signatureId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","x-fk-model":"Signature","description":"A signature that hashes all the values of the consent record and has signed it with the key of the Invidiual, making it verifiable and tamper-proof. TBD: Relation to a Signature schema?"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>sectorPreferences</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"sector"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"Name of the sector"}}></SchemaItem><SchemaItem collapsible={false} name={"optIn"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Defines sector is opted in or not"}}></SchemaItem><SchemaItem collapsible={false} name={"isLastUpdated"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Defines consent record for this sector is last updated"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></div></details></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"consentRecord\": {\n    \"id\": \"65471222e8c7c3bb3c2c9901\",\n    \"dataAgreementId\": \"string\",\n    \"dataAgreementRevisionId\": \"string\",\n    \"dataAgreementRevisionHash\": \"a1b2c3d4e5f6...\",\n    \"individualId\": \"string\",\n    \"optIn\": true,\n    \"state\": \"signed\",\n    \"signatureId\": \"string\",\n    \"sectorPreferences\": [\n      {\n        \"sector\": \"\",\n        \"optIn\": true,\n        \"isLastUpdated\": true\n      }\n    ]\n  }\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

bad input parameter

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div></div></TabItem><TabItem label={"401"} value={"401"}><div>

Unauthorized

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"500"} value={"500"}><div>

Internal server error

</div><details style={{"textAlign":"left","marginBottom":"1rem"}} className={"openapi-markdown__details"} data-collaposed={true} open={false}><summary style={{}}><strong>Response Headers</strong></summary><ul style={{"marginLeft":"1rem"}}></ul></details><div><MimeTabs className={"openapi-tabs__mime"} schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs className={"openapi-tabs__schema"}><TabItem label={"Schema"} value={"Schema"}><details style={{}} className={"openapi-markdown__details response"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-response"}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"errorCode"} required={true} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","example":400}}></SchemaItem><SchemaItem collapsible={false} name={"errorDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Bad input parameter"}}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n  \"errorCode\": 400,\n  \"errorDescription\": \"Bad input parameter\"\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem></ApiTabs></div></div>
      