Skip to content

consent

Consent contract models.

The API records that a user accepted a versioned legal document, gates authorization until every required document is accepted at its current version, and surfaces what is still outstanding. These are the shared request/response shapes; the audit ledger and its enforcement live server-side.

ConsentAcceptItem pydantic-model

Bases: BaseModel

One document acceptance in a consent submission.

Fields:

document pydantic-field

The document being accepted.

version pydantic-field

The version being accepted. Must equal the document's current version at submission time; a stale version is rejected.

ConsentAcceptRequest pydantic-model

Bases: BaseModel

Body of POST /user/consent — accept one or more documents.

Fields:

accepts pydantic-field

The document acceptances to record.

ConsentRecord pydantic-model

Bases: BaseModel

An audited acceptance row in the append-only consent ledger.

Config:

  • from_attributes: True

Fields:

accepted_at pydantic-field

When the acceptance was recorded.

document pydantic-field

The accepted document.

version pydantic-field

The accepted version.

PendingConsent pydantic-model

Bases: BaseModel

A document the user must still accept, and the version to accept.

Fields:

current_version pydantic-field

The latest version of the document that must be accepted.

document pydantic-field

The document requiring acceptance.