Update consent record
Changes the choice of the individual in a consent record. Send one of these bodies:
{"optIn": true}to allow, or{"optIn": false}to withdraw. The sector preferences follow the new value.{"sectorPreference": {"sector": "Travel", "optIn": false}}to allow or refuse one industry sector of the data using services. The sector must be in the data agreement. When the individual refuses the last allowed sector,optInbecomesfalse. For a record withoptIn: falsethe server changes nothing and returns the record.
The {"consentRecord": {"optIn": true}} form also works. A JSON object without optIn and without sectorPreference withdraws the consent.
The record moves to the latest revision of the data agreement and becomes unsigned, so an earlier signature no longer covers it. Each change starts a consent webhook event and a history entry.
Authorizations
AuthorizationstringheaderrequiredYour API key with the prefix
ApiKey:ApiKey <your-api-key>. Get an API key.Scope:
consent-records:update
Path parameters
consentRecord Id stringrequiredConsent record ID.
Example:
"6af081ea2d6fb7b6ac6efc71"
Headers
X-Consent BB- Individual Id stringID of the individual, or its
externalId. Mandatory with an API key: without it the answer is400("IndividualId is not present in request header"), and an unknown individual gets400too. With an individual token, leave it out: the server takes the individual from the token. Send it only on the routes that list it: with an API key that has resource scopes (for exampleconsent-records:read), another route answers400to a request with this header.Example:
"6af081b138e8f33dcf799628"
Body
bodyobject
Response
The updated consent record and its new revision.
consentRecord objectThe consent of one individual to one data agreement. An individual has at most one consent record for each data agreement. Each change makes a new revision of the record.
revisionobjectOne saved version of a record (a data agreement, a policy, a consent record or a data disclosure agreement). Each change makes a new revision. The revision holds the record as JSON and a SHA-1 hash of the snapshot, and it links to the hash of the revision before it, so that you can detect a changed history. Only
successorIdchanges after the server saves a revision.