VocalDocscontracts 1.65.0

Read a consent record

GET /v1/consent-records/{consent_record_id}

PropertyValue
Operationget_consent_record
GroupConsent
Scopecontacts:read
Scopes of include valuesevidence needs contacts:content
Route classread
IdempotencyNo Idempotency-Key
AuditAn audited content read contacts.consent.read, when the request names an include value
Released in1.62.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Answers one record of the consent ledger with its source and evidence (1.62.0), never its address; the evidence's reference, the customer's own text, only when the read names include=evidence, which needs contacts:content and is an audited content read. A record of the other environment is not_found.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the contacts:read scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl "$VOCAL_API/v1/consent-records/csr_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
consent_record_idpathConsentRecordIdyesThe id of a consent record: csr_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
includequeryarray of ConsentRecordIncludenoevidence adds the reference of the evidence (contacts:content).

Responses

StatusContent typeShapeError codes
200application/jsonConsentRecord
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is ConsentRecord.

FieldTypeRequiredDescription
applied_channelsarray of ConsentChannelyesThe channels whose state the record set: the channel itself, and under revocation_scope: all_channels every address channel of an Organization-scope opt-out.
basisConsentBasis or nullyes
channelConsentChannelyes
contact_idContactId or nullyesThe Contact the record names or whose identity holds the address; or null.
environmentEnvironmentyes
evidenceConsentEvidence or nullyes
idConsentRecordIdyes
identity_idContactIdentityId or nullyesThe identity of that Contact that holds the address; null for memory.
object"consent_record"yes
occurred_atTimestampyes
purposeConsentPurposeyes
recorded_atTimestampyes
recorded_byActorRefyes
scopeConsentScopeyes
senderConsentSender or nullyes
sourceConsentSourceyes
stateConsentStateValueyes