---
id: service-agreement-read
title: "Read data agreement"
description: "This endpoint is used to read the data agreement defined by the organisation in consent building block."
sidebar_label: "Read data agreement"
hide_title: true
hide_table_of_contents: true
api: eJztPNty20aWv9LFF0spkrpYsh3W1NTQki90nEgrSnFNIlfcBJpkRyCA6QZEMyq9zZfsp+2X7Lk07qBMRpp5mN1UKgEB9OnT536D7jq+sp7RcaKjsDPoXM61FSr040iHiYDr1CpfJJEwSsL/50r4MpFCzoxSCwWv+GqqQ3hlsqKnkZnJUFuJ4IQOhReFFl+bpDrwdTgTkyDybvqdbieKlaHXRj7sa5W51Z4aZnAvYDt4KZZGLlSijO0Mfr2r4XoV6n+kSoxORTQVMhTR5HflJbBK49NYJnO4DmE9/EKsc+AjBG3UP1JtFGyemFR1O9abq4XsDO46ySrGJTYxgHDn/v4zvmxjPInF54f7+/g/OFoCwPBSxnGgPTrN3u8WkbsrwdOJWtDC2OChE81gKiiV9s2PkegkwBunlRe7NSoMwxI3ECepQ0u8sLHy9NThRTQSFk4UKBGnJo6sgrckrAHSTVTGKeJ2X4ihqGxLohDqW+CEDIDYftsyFILvFjJcfQes9/Wt9lMZIC4mSmdz2L4C8kJ5kfH71yEc6WsvjJKeDntIlIm0cOwpLFVlNv3acWijXPDVaYkSXWKIiYJAmSsTVH7/hEIAqyLg0gouArmcpsFrabWFXyBg88g/m14RaOklcEy4mIIsqwTQCfBXoKfKW3lwDeJQZaT2m1JDyxcS+NqBa/VVLmLi5Yvjo5cHh4eH6pX30ns+mTz3Dr1XR98fNtjaue92kNqapWkz6Af9/f5+A9QlyIIDhVKQoIpXZQNYt5xrD1lklKdgJfIV97CIR0HIUetRq9uxPqIAFuuqUJA93wRzdfER4ZC5KZaKnYVcodxFC52g1OmpCCN+S4e3UXCr/N3qbsT8b26Hbz1mPydbg7qROqf7oDs+AGMiEwOq2mXnMghwm1kEnAJ7Chr4aa7AfoLdTdBuyprh7RKFA5komwjePFPJzGRPNcAkk62mMg0ScSsDsHSC1LdiqKW/QFsNy30Q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/4Bf+lsE8CuhA/+sYZmsbX2iVXuPf6Nf2PCSXiiviZ7cQAJZuk7WLasv3aKjwGqthVuDOp/NQJs2BxOj8vu7jCKuzLB/T3ehpTckL0HqkmjuZ+JBhjwhGu/vXRQpsrOhfOau2LtH7ZoPU9mOEO0mmTmOHy+Qbva+MMX1CNwRgER5LfQusRJaX3Dwd+XfdO7N2igpLNeheW+IcvtLkoF/CpudSPOKOB/Sx92VZf8BcUTbOlf89f5ydoFudnjt5FSWPD9X07g9SM=
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 data agreement</h1>

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



This endpoint is used to read the data agreement defined by the organisation in consent building block.

## 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><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Data agreement (based on ISO 27560) 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"}}><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>dataAgreement</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

An agreement contains the specification of a single purpose that can be consented to.  A DataAgreement is universal and can be consented to by *many* individuals through a DataAgreementRecord.


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8492","description":""}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"1.0.0","description":"The version of this specification to which a receipt conforms"}}></SchemaItem><SchemaItem collapsible={false} name={"controllerId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"ID of the controller"}}></SchemaItem><SchemaItem collapsible={false} name={"controllerUrl"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"URL of data controller (may be omitted if no data involved)"}}></SchemaItem><SchemaItem collapsible={false} name={"controllerName"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Name of data controller (may be omitted if no data involved)"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>policy</strong><span className={"openapi-schema__name"}> object</span><span className={"openapi-schema__divider"}></span><span className={"openapi-schema__required"}>required</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Policy under which this DataAgreement shall be governed.  When creating a data agreement, the latest policy can be used to fill the default value,  and organisation admin can decide to change it in the data agreement level.


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c7701","description":""}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Default data policy","description":"Name of the policy"}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"1.0.0","description":"Version of the policy (it can follow the semver format)"}}></SchemaItem><SchemaItem collapsible={false} name={"url"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"https://example.com/privacy-policy","description":"Permanent URL at which this very version of the Policy can be read, should not be allowed to change over time"}}></SchemaItem><SchemaItem collapsible={false} name={"jurisdiction"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"EU","description":"Jurisdiction"}}></SchemaItem><SchemaItem collapsible={false} name={"industrySector"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Healthcare","description":"Industry sector"}}></SchemaItem><SchemaItem collapsible={false} name={"dataRetentionPeriodDays"} required={false} schemaName={"integer"} qualifierMessage={undefined} schema={{"type":"integer","format":"","example":365,"description":"Data retention period in days"}}></SchemaItem><SchemaItem collapsible={false} name={"geographicRestriction"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"EU","description":"Geographic restriction"}}></SchemaItem><SchemaItem collapsible={false} name={"storageLocation"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"EU","description":"Storage location"}}></SchemaItem><SchemaItem collapsible={false} name={"thirdPartyDataSharing"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":true,"description":"Third party data sharing"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"dataAttributes"} required={false} schemaName={"object[]"} qualifierMessage={undefined} schema={{"type":"array","items":{"allOf":[{"type":"object","description":"Data attributes contain specifications of exactly what is collected.","x-not-in-database":false,"required":["name","description"],"properties":{"id":{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8501","description":"Data attribute ID"},"name":{"type":"string","format":"","example":"Name","description":"Name of the attribute, for instance \"name\" or \"age\""},"description":{"type":"string","format":"","example":"Full name of the individual","description":"Description of the attribute"},"sensitivity":{"type":"boolean","format":"","example":false,"description":"Sensitivity of data attribute"},"category":{"type":"string","format":"","example":"Personal","description":"Category of data attribute"},"scope":{"type":"string","format":"","example":"read","description":"Scope required for data attribute"}}},{"type":"object","properties":{"restrictions":{"type":"array","items":{"type":"object","description":"List of restrictions","x-not-in-database":false,"properties":{"credDefId":{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:3:CL:80:default","description":"Credential definition ID"},"schemaId":{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:2:Certificate Of Registration:6.0.0","description":"Schema ID"}}}}}}]},"description":"Data attributes contain specifications of exactly what is collected.\n"}}></SchemaItem><SchemaItem collapsible={false} name={"purpose"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Name of purpose"}}></SchemaItem><SchemaItem collapsible={false} name={"purposeDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Description of purpose"}}></SchemaItem><SchemaItem collapsible={false} name={"lawfulBasis"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`consent`, `legal_obligation`, `contract`, `vital_interest`, `public_task`, `legitimate_interest`]"} schema={{"type":"string","format":"","example":"","description":"Lawful basis of the agreement - consent / legal_obligation / contract / vital_interest / public_task / legitimate_interest","enum":["consent","legal_obligation","contract","vital_interest","public_task","legitimate_interest"]}}></SchemaItem><SchemaItem collapsible={false} name={"methodOfUse"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`null`, `data_source`, `data_using_service`]"} schema={{"type":"string","format":"","example":"","description":"Method of use - null / data_source / data_using_service","enum":[null,"data_source","data_using_service"]}}></SchemaItem><SchemaItem collapsible={false} name={"dpiaDate"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"The date on which the DPIA report is generated after a DPIA"}}></SchemaItem><SchemaItem collapsible={false} name={"dpiaSummaryUrl"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"The URl providing the DPIA result reports, summary etc that can be verified by any interested parties"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>signature</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Signature of authorising party of DataAgreement (Signatures may be chained in the case of multiple signatures)


</div><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c5501","description":"Objects may be passed back by some API endpoints without an id (PK), denoting that they are a \"draft\", i.e. a Signature that is not yet stored in the database and only exists in transit."}}></SchemaItem><SchemaItem collapsible={false} name={"payload"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"The final payload that is signed, constructed as a JSON serialisation of fields {verificationPayload: ..., verificationPayloadHash: ..., verificationMethod: ..., verificationArtifact: ..., verificationSignedBy: ..., verificationJwsHeader, timestamp: ..., signedWithoutObjectReference: ..., objectType: ..., objectReference: ...}. Serialised as a JSON dict. If the signature is generated before anything is stored in the database (and has a PK), then the objectReference should be omitted from the payload but filled in afterwards."}}></SchemaItem><SchemaItem collapsible={false} name={"signature"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"eyJhbGciOiJFZERTQSJ9...","description":"Signature of payload hash, the format of the signature should be specified by either verificationMethod or verificationJwsHeader"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationMethod"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Ed25519Signature2020","description":"A well-known string denoting which method is used. Valid values: TBD. This might be expanded with supported verification methods. There may be a minimal set of supported methods necessary."}}></SchemaItem><SchemaItem collapsible={false} name={"verificationPayload"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"Internally generated serialised version of the data referenced by objectType and objectReference - by extracting and serialising their data as JSON"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationPayloadHash"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"a1b2c3d4e5f6...","description":"Internally generated cryptographic hash of the value to be signed, i.e. the value of verificationPayload"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationArtifact"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"A verification artifact in the form of a scanned object, image, signature etc"}}></SchemaItem><SchemaItem collapsible={false} name={"verificationSignedBy"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"did:key:z6Mkf...","description":"Because an identifier's information may change over time, there is a need to store that information at the time of signing. In the case of a cryptographic signature, this field should contain some identifier for looking up or verifying the public key of the signing party. In the case of a non-cryptographic signature, this field could contain a natural individual's names, personal number, email addresses - store a snapshot that binds to the signature at the time of signing. In the case of a cryptographic signature, this may be the fingerprint of the individual's public key or in some cases, a token from the user's ID session."}}></SchemaItem><SchemaItem collapsible={false} name={"verificationSignedAs"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"individual","description":"DRAFT FIELD: Specifies the relationship between the authorising signature and the invidual which the payload concerns. This is relevant for Consent Records. Possible values: \"individual\" / \"delegate\"."}}></SchemaItem><SchemaItem collapsible={false} name={"verificationJwsHeader"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"","description":"Alternative to the verificationMethod, verificationHash and verificationSignature, give a JWS serialised object (RFC7515)"}}></SchemaItem><SchemaItem collapsible={false} name={"timestamp"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"2024-01-15T10:30:00Z","description":"Timestamp of signature, currently this field isn't part of the payload so it's not tamper-proof"}}></SchemaItem><SchemaItem collapsible={false} name={"signedWithoutObjectReference"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Indicates that objectReference was left blank in the serialised version that was signed"}}></SchemaItem><SchemaItem collapsible={false} name={"objectType"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`revision`, `signature`]"} schema={{"type":"string","format":"","example":"revision","description":"Name of the schema model that objectReference points to. Values: \"signature\" or \"revision\"","enum":["revision","signature"]}}></SchemaItem><SchemaItem collapsible={false} name={"objectReference"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c6601","description":"A symmetric relation / back reference to the objectType that was signed. We are currently just modelling signing another signature (a chain) or signing a Revision (which can be a revision of a consent record, an agreement, policy etc)."}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={false} name={"active"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":"","description":"DataAgreement is active and new DataAgreementRecords can be created"}}></SchemaItem><SchemaItem collapsible={false} name={"forgettable"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":"","description":"DataAgreementRecord may be deleted when consent is withdrawn, as its existence is not necessary for auditability."}}></SchemaItem><SchemaItem collapsible={false} name={"compatibleWithVersionId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","x-fk-model":"DataAgreement","description":"WIP: This field indicates that Data Agreement Records may be transferred from this  compatible previous revision of the same DataAgreement\n"}}></SchemaItem><SchemaItem collapsible={false} name={"lifecycle"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`draft`, `complete`]"} schema={{"type":"string","description":"WIP: Current Lifecycle state of the DataAgreement.  Lifecycle states are used to manage internal workflows and  should not be assigned semantic meanings for active Data Agreement Records.\n","enum":["draft","complete"]}}></SchemaItem><SchemaItem collapsible={false} name={"dataUsingServices"} required={false} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"type":"array","items":[{"type":"object","description":"Data using service organisation for the data agreement","x-not-in-database":false,"required":["name","sector","location"],"properties":{"name":{"type":"string","format":"","example":"","description":"Name of the data using service organisation"},"sector":{"type":"string","format":"","example":"","description":"Defines sector of the organisation"},"location":{"type":"string","format":"","example":"","description":"Defines location of the organisation"},"privacyDashboardUrl":{"type":"string","format":"","example":"","description":"Defines privacy dashboard url of the organisation"}}}]}}></SchemaItem><SchemaItem collapsible={false} name={"openApiSpecification"} required={false} schemaName={"object"} qualifierMessage={undefined} schema={{"type":"object","description":"This field contains OpenAPI specification document describing the API's endpoints, models, and operations."}}></SchemaItem><SchemaItem collapsible={false} name={"dataSources"} required={false} schemaName={"undefined[]"} qualifierMessage={undefined} schema={{"type":"array","items":[{"type":"object","description":"Data source organisation for the data agreement","x-not-in-database":false,"required":["name","sector","location"],"properties":{"name":{"type":"string","format":"","example":"","description":"Name of the data source organisation"},"sector":{"type":"string","format":"","example":"","description":"Defines sector of the organisation"},"location":{"type":"string","format":"","example":"","description":"Defines location of the organisation"},"privacyDashboardUrl":{"type":"string","format":"","example":"","description":"Defines privacy dashboard url of the organisation"}}}]}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>revision</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

A *generic* revision model captures the serialised contents of any schema's single row. This is then subject to 1) cryptographic signature and 2) auditing.

Aside from the "successor" column, a revision should be considered locked.

</div><SchemaItem collapsible={false} name={"id"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c6601","description":"Revision ID"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaName"} required={true} schemaName={"string"} qualifierMessage={"**Possible values:** [`dataAgreement`, `policy`, `dataAgreementRecord`]"} schema={{"type":"string","format":"","example":"dataAgreement","description":"Previously \"schema\" but for technical reasons should be called \"schemaName\"","enum":["dataAgreement","policy","dataAgreementRecord"]}}></SchemaItem><SchemaItem collapsible={false} name={"objectId"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8492","description":"The PK of the object that was serialised"}}></SchemaItem><SchemaItem collapsible={false} name={"objectData"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"The object that is serialised"}}></SchemaItem><SchemaItem collapsible={false} name={"signedWithoutObjectId"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Indicates that objectId was left blank in serizalizedSnapshot when calculating serializedHash. objectId may subsequently be filled in."}}></SchemaItem><SchemaItem collapsible={false} name={"serizalizedSnapshot"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"{...}","description":"Revisioned data (sed as JSON) as a dict. Apply JSON Canonicalization Scheme as per IETF RFC 8785.  It contains all the fields of the schema except sucessorId, serializedHash, serializedSnapshot.\n"}}></SchemaItem><SchemaItem collapsible={false} name={"serializedHash"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2","description":"Hash of serizalizedSnapshot (SHA-1)"}}></SchemaItem><SchemaItem collapsible={false} name={"timestamp"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"2024-01-15T10:30:00Z","description":"Timestamp of when revisioning happened. It should be ISO 8601 UTC date time"}}></SchemaItem><SchemaItem collapsible={false} name={"authorizedByIndividualId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"description":"Individual ID","type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"authorizedByOtherId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"64541a2e6e7569000145ab00","description":"Reference to an admin user that has created this revision"}}></SchemaItem><SchemaItem collapsible={false} name={"successorId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"x-fk-model":"Revision","type":"string","description":"If this revision is no longer the latest revision, refer to its successor"}}></SchemaItem><SchemaItem collapsible={false} name={"predecessorHash"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3","description":"Tamper-resistent artifact from previous record, copied from serializedHash"}}></SchemaItem><SchemaItem collapsible={false} name={"predecessorSignature"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"c3d4e5f6a1b2...","description":"Tamper-resistent artifact from previous record (we don't know if the previous record was signed or not)"}}></SchemaItem></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"[\n  {\n    \"dataAgreement\": {\n      \"id\": \"65471222e8c7c3bb3c2c8492\",\n      \"version\": \"1.0.0\",\n      \"controllerId\": \"string\",\n      \"controllerUrl\": \"string\",\n      \"controllerName\": \"string\",\n      \"policy\": {\n        \"id\": \"65471222e8c7c3bb3c2c7701\",\n        \"name\": \"Default data policy\",\n        \"version\": \"1.0.0\",\n        \"url\": \"https://example.com/privacy-policy\",\n        \"jurisdiction\": \"EU\",\n        \"industrySector\": \"Healthcare\",\n        \"dataRetentionPeriodDays\": 365,\n        \"geographicRestriction\": \"EU\",\n        \"storageLocation\": \"EU\",\n        \"thirdPartyDataSharing\": true\n      },\n      \"dataAttributes\": [\n        {\n          \"id\": \"65471222e8c7c3bb3c2c8501\",\n          \"name\": \"Name\",\n          \"description\": \"Full name of the individual\",\n          \"sensitivity\": false,\n          \"category\": \"Personal\",\n          \"scope\": \"read\",\n          \"restrictions\": [\n            {\n              \"credDefId\": \"H3DW1MUWZyBkP5LG4rTYRH:3:CL:80:default\",\n              \"schemaId\": \"H3DW1MUWZyBkP5LG4rTYRH:2:Certificate Of Registration:6.0.0\"\n            }\n          ]\n        }\n      ],\n      \"purpose\": \"string\",\n      \"purposeDescription\": \"string\",\n      \"lawfulBasis\": \"\",\n      \"methodOfUse\": \"\",\n      \"dpiaDate\": \"\",\n      \"dpiaSummaryUrl\": \"string\",\n      \"signature\": {\n        \"id\": \"65471222e8c7c3bb3c2c5501\",\n        \"payload\": \"{...}\",\n        \"signature\": \"eyJhbGciOiJFZERTQSJ9...\",\n        \"verificationMethod\": \"Ed25519Signature2020\",\n        \"verificationPayload\": \"{...}\",\n        \"verificationPayloadHash\": \"a1b2c3d4e5f6...\",\n        \"verificationArtifact\": \"\",\n        \"verificationSignedBy\": \"did:key:z6Mkf...\",\n        \"verificationSignedAs\": \"individual\",\n        \"verificationJwsHeader\": \"\",\n        \"timestamp\": \"2024-01-15T10:30:00Z\",\n        \"signedWithoutObjectReference\": false,\n        \"objectType\": \"revision\",\n        \"objectReference\": \"65471222e8c7c3bb3c2c6601\"\n      },\n      \"active\": \"\",\n      \"forgettable\": \"\",\n      \"compatibleWithVersionId\": \"string\",\n      \"lifecycle\": \"draft\",\n      \"dataUsingServices\": [\n        null\n      ],\n      \"openApiSpecification\": {},\n      \"dataSources\": [\n        null\n      ]\n    },\n    \"revision\": {\n      \"id\": \"65471222e8c7c3bb3c2c6601\",\n      \"schemaName\": \"dataAgreement\",\n      \"objectId\": \"65471222e8c7c3bb3c2c8492\",\n      \"objectData\": \"{...}\",\n      \"signedWithoutObjectId\": false,\n      \"serizalizedSnapshot\": \"{...}\",\n      \"serializedHash\": \"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2\",\n      \"timestamp\": \"2024-01-15T10:30:00Z\",\n      \"authorizedByIndividualId\": \"string\",\n      \"authorizedByOtherId\": \"64541a2e6e7569000145ab00\",\n      \"successorId\": \"string\",\n      \"predecessorHash\": \"b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3\",\n      \"predecessorSignature\": \"c3d4e5f6a1b2...\"\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={"404"} value={"404"}><div>

Resource not found

</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>
      