Skip to main content

Read latest consent record

GET 

/service/verification/consent-record/:consentRecordId

This endpoint is used to read the latest consent record for an organisation in the consent building block.

Request

Path Parameters

    consentRecordId stringrequired

    Unique ID of an object

Responses

Response Headers
    Schema
      consentRecord object

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

      id stringrequired

      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.

      dataAgreementId string

      The DataAgreement to which consent has been given

      dataAgreementRevisionId string

      The Revision of the data agreement which consent has been given to

      dataAgreementRevisionHash string

      Copy of the revision hash. The hash is the included in the signature and ensures against tampering with the original agreement.

      individualId string

      The Individual who has signed this consent record

      optIn boolean

      True: The individual has positively opted in. False: The individual has explicitly said no (or withdrawn a previous consent).

      state stringrequired

      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

      signatureId string

      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[]
    • Array [
    • sector stringrequired

      Name of the sector

      optIn boolean

      Defines sector is opted in or not

      isLastUpdated boolean

      Defines consent record for this sector is last updated

    • ]
    • revision object

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

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

      id stringrequired

      Revision Id

      schemaName stringrequired

      Possible values: [dataAgreement, policy, dataAgreementRecord]

      This was previously called "schema" but for technical reasons should be called "schemaName"

      objectId stringrequired

      The PK of the object that was serialized.

      objectData stringrequired

      The object that is serialised.

      signedWithoutObjectId boolean

      Indicates that objectId was left blank in serizalizedSnapshot when calculating serializedHash. objectId may be subsequently filled in.

      serizalizedSnapshot stringrequired

      Revisioned data (serialized 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.

      serializedHash stringrequired

      Hash of serizalizedSnapshot (SHA-1)

      timestamp stringrequired

      Timestamp of when revisioning happened. It should be ISO 8601 UTC date time

      authorizedByIndividualId string

      Individual Id

      authorizedByOtherId string

      Reference to an admin user that has created this revision

      successorId string

      If this revision is no longer the latest revision, refer to its successor.

      predecessorHash string

      Tamper-resistent artifact from previous record, copied from serializedHash

      predecessorSignature string

      Tamper-resistent artifact from previous record (we don't know if the previous record was signed or not)

    Loading...