---
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/ZUuvESq4nAk2d7NTm1tIlnezcRbjiPZSaq8qlIP2UNiBQI0AI40Uc1bviSfli9JNcDbXOTIeUv0IFEk0OjL6dPdeBQ5uczK2kujxUx8KKUD0nltpPYgHTSOcvAGLGEOCJnRjrQHS5mxOSyNBdQgdS5XMpeo4hvISuNIQ44eAQtLVJH2KXwoyRK40jQqhwWB0QSNxmohi8Y07svSG1SpSISpySJrO8/FTDiyK5nRFWE+75ddhe38TiSiRosVebJOzD497pj7UcvPDcH8EsySjzKLXynzIhGSv9boS5EIjRWJmWBjzjtb5iza0udGWsrFzNuGEuGykioUs0fh1zVvcd5KXYjNJnmMEkvCnOwg82+T19Hki4vJoP/XCU92bBrkwPxSbG5YlKv5GMe7z05O+E9mtCft+RHrWsks+HT6q2MZj6PTasse9zLubiMUPTxSpnecl17xi9dbC3d1PN8NNT3UlpyjAQNH6CCnpdSUg9TgGZiLRqpc6gIWymR3v3HgasrkslX+mHGK4KQuFMHlOFwd9KrGeQYewsd38z9/fBNO8xYZ7EbD0TZgwdJKOml0MsLgsUjEw0QbP5F6wusX6EjMlqgcjaP2SUi2uxd21cr6AzoGlfPoSdwkO/6V+X6EE7E0tkIvZkIkgh6wqoOLv3n18tvTs7Mz+m32bfZisXiRnWXffXdyuuftP4XgOKhwzcbX6DipF5jdwWINzlQE5+/nfdo7uJe+NI3njJhfwtH7t8cJ5KSNZ9/7Ej34ktaAlj35i8gtLv0vIgGZUgoIW7GP66UDbTysyYPzxnYxJeg8CKhzMFqtgR6k8+GzRe2kT+GS5W9LdZCbILHEFStx1Udq0XiQS6iRwwBNHYwBhGtZaPSNpQQQVqhk3m8aMVJBmumF8jQk1k7KHwjNw2R5N6lMTkrMxBbm9sLwodxBJeP1vpRZ2YO+RAcLIg2FX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vt+TcQjymH/+4ZsgHymMNvI06wi0caeMpCOCZUAU31JjRcQKUFumO2Bm0G79fm8ayRyZ3tP7hNnQ+Y5A8ikX478euWPzxrx/2bQssCN7cke5GtKBelNTqzJy/pQT0HgwJGxg/bBB9MnLo+A5CSL00XeZjFjKfKpQcXtfUtbH+931Ih5DIn4ZX21gYFu9lWb8Jjv71j38ecxlBuL6nXLoyjhv0ENu10FPEFiOGE9rkgNqalczJhgaucaEAquXEmRVZkoUGmTMI/DoZtyiZpfAaleNJL5eF9Nxzo1Lkw2HOcI9Xmxw8ZaU2yhSSXAKkcRFijqDpHhStSDGgmKECjeFCKunXQQg23lQYBuLMVLWSqDOKAQvmWSqa2BQ5jhlCqG+ATS590LNCrcny2KNkRtoFTuyyoMasJDhLT/Z8fn9/n2L4nBpbTNu9bvrz/PWbd9dvJrxnM1zDDHHg3MlN1jCPdNnFNBLjdXZy9jJ9kZ7y3to4X6Ee6cNXabsTyk7ER/Xkf+ASsc0MTw9+WiuUYdQOjn5sOfpTd7UoxmNguJfrzN9iapGI2e51wU0iSuM8C3t85P7zo1WbDb/+3JAN9SQRK7QBuJHOpePnvG9Un/Tx0VVblY/hyUvMg1Z2NKyZgwNpxob1jll678Zjw+NLSzH/tYLbN5JP6BXP/8KFaK8r16y4mjmz9qNve43MZlyDf3rDtIstJw/16C7Uo/aBrTzoo93SFFXg36zQwS3fc9K9pfUP/fL45ckNPZnH1eyZm81m8290X0Hr
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>
      