Skip to content

Consent

A Consent is a person’s grant for one Purpose, with its basis, region, notice, evidence, and expiry.

Properties

PropertyTypeRequiredDescription
basisstringrequiredThe lawful basis, such as consent or contract. Never randomized.
regionstringThe jurisdiction whose rules apply. Never randomized.
withdrawnAtdatetimeWhen the person withdrew it. Never randomized.

Object

JSON
{
  "$id": "https://api.sb/petpantry.shop/consents/consent_1",
  "$type": "Consent",
  "basis": "Example basis",
  "region": "Example region",
  "withdrawnAt": "2026-10-22T12:00:00Z"
}

Relationships

  • A Consent covers one Purpose: the Purpose the Consent permits processing for, and nothing beyond it. covers, inverse consents.
  • A Consent is given by one Contact: a Contact grants Consents, each for one Purpose, with its basis and expiry. givenBy, inverse gives.

Verbs

  1. createCreates a Consent.
    POST /{namespace}/consentsdoConsent.created
  2. getReturns one Consent by id.
    GET /{namespace}/consents/{id}readNo Event
  3. listReturns Consents, newest first, one page at a time.
    GET /{namespace}/consentsreadNo Event
  4. updateChanges the given properties of a Consent.
    PATCH /{namespace}/consents/{id}doConsent.updated
  5. withdrawWithdraw ends a Consent at once: processing for its Purpose stops, and the record is kept.
    POST /{namespace}/consents/{consent}/withdrawdoConsent.withdrawn

Permissions

Which Access level may call each Verb. One-way Verbs wait their delay window.

Operationowneradminmemberviewer
Consent.createYesYesYesNo
Consent.getYesYesYesYes
Consent.listYesYesYesYes
Consent.updateYesYesYesNo
Consent.withdrawYesYesYesNo

Call it

Text
Withdraw the latest consent.

Example

A visitor ticks a box for product updates on a pricing Page. The Consent records the marketing Purpose, the notice shown, the time, and a two-year expiry.