---
id: config-create-agreement
title: "Create data agreement"
description: "This endpoint creates a data agreement for an organisation."
sidebar_label: "Create data agreement"
hide_title: true
hide_table_of_contents: true
api: eJztXetyG7eSfhXU/LGUoqiLLdthnTq1smTHdJyYK8lx7bFcCTjTJBHNABMAI5pR8d8+yT7aPslWozH3IU3azh6fU0ylXNRw0MA0uht9+Xp4H0RgQi1SK5QMBsH1TBgGMkqVkJaFGrgFwziLuOWMTzVAAtKyidKMS6b0lEthOA7usxs5tIzHRjENNtPSMDsDFiMFyzTcCSOUZGriLhPpqEG4fyODXqBS0I7mMAoGQajkREzP3f1n+Y1BL0i55glY0CYYvP/QCzT8kYGxz1S0CAb3OMzijYP7gKdpLEJH8fB3g895H5hwBgnHT6nG+awAg3/hespZcHAcv5kEg/f3gV2kEAwCNf4dQlyAFTbGCxe1Ib0GR89khW+4KC48Z0wKoZj4hSFfODNCTmNgaaZTZYDZGbcs5JKNAYcakMgyq/qMnbHatEwYlklxB9rwmHEZdQ1j4wX7LuFy8R0TMhJ3Isp4jGvRKpvOGK+TvIRQ6Yh25OOBVPZAyANkz5gbCAYTHhsgrgsNUTB4H/hl497Qp4sKJ3puR7SKY9BvdVz7+2eeuFEqFuEi6AUxn0+y+Bk3wgS9IAE7U9GbyVtHmodW3OGHidJTsJaPY/wrFhMIF2EMwYdeY0s9Wdzc2s6M3HWWyQg0m89EOGMWxb/OWDPjcYycnKo70BKiPmPvZiBJgoWctrSjV5V7mjzfjczQRkxEHLu7IpjwLLbsjscZ9JjbuapWMR4lQrrhEYQiAhwdzricAhOWCUlU6toZwx3EtHGrZHaUs3qznZW0QZmO2+wVEf7rJzJWCzml3Um4DQZB0AvgI09SN+3j00dPjk9OTuBp+CR8OB4/DE/CJ0+OjltaEyx7NOnGpC88Jx0vCkmqU0U5yw2Qv2XZC1BpBFmFzaY67h/1j1rEfyEydfpsT5AGT1QcqznpPSR3oBnR3scVIF83nn1mbWoGh4f+Sj9UyWGqxR0PFwcrnnsEOuESRePt5WvGbVXa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/oWvefgnPhx4CwW3h5n5Ew3gjL052kE+pOpXXtvNfYYvblCn3Tsf0Q9cQFYoPkcHQg+DwbBTeDS6Cotimru+n0QcznNOJqcgOguff6q7vXfOq/ff6igjLhcVFbZDADoYfDfCmqkPuRvKI8/wuLvxe30zcoBhctMd+NuYqXr/wB0EzoK
sidebar_class_name: "post api-method"
info_path: docs/consent-management-admin-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"}>Create data agreement</h1>

<MethodEndpoint method={"post"} path={"/config/data-agreement"}></MethodEndpoint>



This endpoint creates a data agreement for an organisation. 
It also returns the latest revision of the created data agreement.


## Request

<MimeTabs className={"openapi-tabs__mime"}><TabItem label={"application/json"} value={"application/json-schema"}><details style={{}} className={"openapi-markdown__details mime"} data-collapsed={false} open={true}><summary style={{}} className={"openapi-markdown__details-summary-mime"}><h3 className={"openapi-markdown__details-summary-header-body"}>Body</h3></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"}>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={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={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>dataAttributes</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Data attributes contain specifications of exactly what is collected.


</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8501","description":"Data attribute ID"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Name","description":"Name of the attribute, for instance \"name\" or \"age\""}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Full name of the individual","description":"Description of the attribute"}}></SchemaItem><SchemaItem collapsible={false} name={"sensitivity"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Sensitivity of data attribute"}}></SchemaItem><SchemaItem collapsible={false} name={"category"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Personal","description":"Category of data attribute"}}></SchemaItem><SchemaItem collapsible={false} name={"scope"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"read","description":"Scope required for data attribute"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>restrictions</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={"credDefId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:3:CL:80:default","description":"Credential definition ID"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:2:Certificate Of Registration:6.0.0","description":"Schema ID"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={false} name={"purpose"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Marketing communications","description":"Name of purpose"}}></SchemaItem><SchemaItem collapsible={false} name={"purposeDescription"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"Collecting user data for personalised marketing","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":"consent","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":"data_source","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":"2024-01-15T00:00:00Z","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":true,"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":false,"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={"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><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>dataExchange</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"}}>

Data exchange details

</div><SchemaItem collapsible={false} name={"dataExchangeProfile"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`AIP10`, `OID4VC`]"} schema={{"type":"string","description":"Data exchange profile","enum":["AIP10","OID4VC"]}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Definition id for OID4VC data exchange profile"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaId"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Schema identifier"}}></SchemaItem><SchemaItem collapsible={false} name={"isExistingSchema"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Is schema existing"}}></SchemaItem></div></details></SchemaItem></div></details></SchemaItem></ul></details></TabItem></MimeTabs><div><div><ApiTabs label={undefined} id={undefined}><TabItem label={"200"} value={"200"}><div>

Data agreement (based on ISO 27560) created 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"}>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={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>dataAttributes</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Data attributes contain specifications of exactly what is collected.


</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"65471222e8c7c3bb3c2c8501","description":"Data attribute ID"}}></SchemaItem><SchemaItem collapsible={false} name={"name"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Name","description":"Name of the attribute, for instance \"name\" or \"age\""}}></SchemaItem><SchemaItem collapsible={false} name={"description"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Full name of the individual","description":"Description of the attribute"}}></SchemaItem><SchemaItem collapsible={false} name={"sensitivity"} required={false} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","format":"","example":false,"description":"Sensitivity of data attribute"}}></SchemaItem><SchemaItem collapsible={false} name={"category"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"Personal","description":"Category of data attribute"}}></SchemaItem><SchemaItem collapsible={false} name={"scope"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"read","description":"Scope required for data attribute"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>restrictions</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={"credDefId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:3:CL:80:default","description":"Credential definition ID"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","format":"","example":"H3DW1MUWZyBkP5LG4rTYRH:2:Certificate Of Registration:6.0.0","description":"Schema ID"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></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><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>dataExchange</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"}}>

Data exchange details

</div><SchemaItem collapsible={false} name={"dataExchangeProfile"} required={false} schemaName={"string"} qualifierMessage={"**Possible values:** [`AIP10`]"} schema={{"type":"string","description":"Data exchange profile","enum":["AIP10"]}}></SchemaItem><SchemaItem collapsible={false} name={"id"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Data agreement ID defined in AIP"}}></SchemaItem><SchemaItem collapsible={false} name={"credentialDefinitionId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Credential definition identifier"}}></SchemaItem><SchemaItem collapsible={false} name={"schemaId"} required={true} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Schema identifier"}}></SchemaItem><SchemaItem collapsible={false} name={"isExistingSchema"} required={true} schemaName={"boolean"} qualifierMessage={undefined} schema={{"type":"boolean","description":"Is schema existing"}}></SchemaItem><SchemaItem collapsible={false} name={"qrId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={false} name={"firebaseDynamicLink"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>presentationRequest</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Name of the presentation request"}}></SchemaItem><SchemaItem collapsible={false} name={"version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Version of the presentation request"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>requestedAttributes</strong><span className={"openapi-schema__name"}> object</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

Map of requested attributes

</div><SchemaItem collapsible={false} name={"name"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Name of the requested attribute"}}></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}} className={"openapi-markdown__details"}><summary style={{}}><span className={"openapi-schema__container"}><strong className={"openapi-schema__property"}>restrictions</strong><span className={"openapi-schema__name"}> object[]</span></span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}>

List of restrictions for the requested attribute

</div><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem","paddingBottom":".5rem"}}>Array [</div></li><SchemaItem collapsible={false} name={"schemaId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Schema identifier"}}></SchemaItem><SchemaItem collapsible={false} name={"credDefId"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","description":"Credential definition identifier"}}></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem></div></details></SchemaItem></div></details></SchemaItem></div></details></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></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\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    \"dataExchange\": {\n      \"dataExchangeProfile\": \"AIP10\",\n      \"id\": \"string\",\n      \"credentialDefinitionId\": \"string\",\n      \"schemaId\": \"string\",\n      \"isExistingSchema\": true,\n      \"qrId\": \"string\",\n      \"firebaseDynamicLink\": \"string\",\n      \"presentationRequest\": {\n        \"name\": \"string\",\n        \"version\": \"string\",\n        \"requestedAttributes\": {\n          \"name\": \"string\",\n          \"restrictions\": [\n            {\n              \"schemaId\": \"string\",\n              \"credDefId\": \"string\"\n            }\n          ]\n        }\n      }\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}"} 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>
      