API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · marketing_consents

Marketing Consent Schema

ID du schéma
marketing_consent
Collection
marketing_consents
Autorisations
  • Liremarketing_consent_view
  • Créermarketing_consent_create
  • Modifiermarketing_consent_edit
  • Supprimermarketing_consent_delete

Champs

Marketing Consent Schema

marketing_consents4 autorisations

Per-(person × org × category × channel) marketing consent with double-opt-in lifecycle (ADR 0290).

personPartyIduuidobligatoire

ID of the PERSON party the consent belongs to.

organizationPartyIduuidfacultatif

ID of the ORGANIZATION party the person relates to (the consent is scoped to the work context). Null for a person without an org relationship.

nullable
contactRelationshipIduuidfacultatif

ID of the party_relationship whose marketingConsent cache is recomputed from this record.

nullable
categorystringobligatoire
NEWSLETTERPRODUCT_UPDATESSALES_OUTREACHEVENTSSURVEYS
channelstringobligatoire
EMAIL
Par défaut : "EMAIL"
statusstringobligatoire
PENDINGGRANTEDREVOKEDEXPIRED
Par défaut : "PENDING"
legalBasisstringfacultatif
CONSENTLEGITIMATE_INTERESTEXISTING_CUSTOMER
Par défaut : "CONSENT"nullable
sourcestringfacultatif
WEB_FORMSALES_MANUALPHONECONTRACTIMPORTSYSTEM
nullable
initiatedByUserIduuidfacultatif

User who initiated the sign-up (e.g. the salesperson).

nullable
emailstringfacultatif

Email the consent was captured for (denormalized for the DOI mail + audit).

max. 320 caractèresnullable
consentTextstringfacultatif

Exact wording the person agreed to (accountability).

max. 4000 caractèresnullable
consentTextVersionstringfacultatif
max. 64 caractèresnullable
doiTokenstringfacultatif

Opaque single-use confirmation token; cleared on confirm/expiry.

max. 128 caractèreslecture seulenullable
doiSentAtdatetimefacultatif
lecture seulenullable
doiExpiresAtdatetimefacultatif
lecture seulenullable
confirmedAtdatetimefacultatif
lecture seulenullable
proofIpstringfacultatif

Client IP recorded at the PENDING → GRANTED transition.

max. 64 caractèreslecture seulenullable
proofUserAgentstringfacultatif
max. 512 caractèreslecture seulenullable
revokedAtdatetimefacultatif
lecture seulenullable
revokedReasonstringfacultatif
max. 500 caractèresnullable
notesstringfacultatif
max. 1000 caractèresnullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/marketing_consents — Liste, paginée et filtrable
  • GET /api/v1/marketing_consents/<id> — Une entité
  • POST /api/v1/marketing_consents — Créer
  • PATCH /api/v1/marketing_consents/<id> — Mise à jour partielle
  • DELETE /api/v1/marketing_consents/<id> — Suppression logique
  • GET /api/v1/marketing_consents/<id>/timeline — Audit et activités

Recherche