List all consent records
GET/service/individual/record/data-agreement/:dataAgreementId/all
This endpoint is used to list all consent records existing for a data agreement for an organisation defined in the consent building block. The response is paginated.
Request
Path Parameters
Unique ID of an object
Query Parameters
Requested index for start of resources to be provided in response requested by client
Default value: 10
Number of items returned per page. Requested number of resources to be provided in response requested by client
Header Parameters
Individual Id
Responses
- 200
- 400
Response Headers
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
consentRecords object[]
Objects may be passed back by some API endpoints without an id (PK), denoting that they are a "draft", i.e. a ConsentRecord that is not yet stored in the database and only exist in transit. Draft ConsentRecords do not have a Revision, but if paired up with a Signature, a valid Revision should be generated.
The DataAgreement to which consent has been given
The Revision of the data agreement which consent has been given to
Copy of the revision hash. The hash is the included in the signature and ensures against tampering with the original agreement.
The Individual who has signed this consent record
True: The individual has positively opted in. False: The individual has explicitly said no (or withdrawn a previous consent).
Possible values: [unsigned
, signed
]
The state field is used to record state changes after-the-fact. It is maintained by the Consent BB itself. Valid states: unsigned/pending more signatures/signed
A signature that hashes all the values of the consent record and has signed it with the key of the Invidiual, making it verifiable and tamper-proof. TBD: Relation to a Signature schema?
sectorPreferences object[]
Name of the sector
Defines sector is opted in or not
Defines consent record for this sector is last updated
pagination object
Current page number
Total number of items available
Total number of pages based on limit
Number of items per page
Indicates if there's a previous page
Indicates if there's a next page
{
"consentRecords": [
{
"id": "",
"dataAgreementId": "string",
"dataAgreementRevisionId": "string",
"dataAgreementRevisionHash": "",
"individualId": "string",
"optIn": "",
"state": "",
"signatureId": "string",
"sectorPreferences": [
{
"sector": "",
"optIn": true,
"isLastUpdated": true
}
]
}
],
"pagination": {
"currentPage": 0,
"totalItems": 0,
"totalPages": 0,
"limit": 0,
"hasPrevious": true,
"hasNext": true
}
}
bad input parameter