Consent

Universal consent tracking entity for all types of consent (marketing, GDPR, cookies, medical, data processing, etc.) with full audit trail. Base entity that can be extended for specific consent types.

16 properties
Schema

Properties

PropertyTypeModeDescriptionRequired
entityTypestring
stored

Type of entity giving consent (Customer, Patient, Employee, User, etc.)

Example: "Customer"

Required
entityIdstring
stored

Unique identifier of the entity giving consent

Example: "CUST-2024-00123"

Required
consentTypestring
enum

Category of consent being tracked

Values: marketing, privacy_policy, terms_of_service, data_processing, cookies, analytics, medical_treatment, data_sharing, research, third_party_sharing

Example: "marketing"

Required
grantedboolean
stored

Whether consent is currently granted (true) or withdrawn (false)

Example: true

Required
grantedAtDateTime
stored

Timestamp when consent was granted

Example: "2024-01-15T10:30:00Z"

Optional
grantedIpstring
stored

IP address from which consent was granted (GDPR Article 7 proof requirement)

Example: "192.168.1.100"

Optional
grantedByUser
stored

User who granted consent (if obtained by staff on behalf of entity)

Example: {"@type":"User","userId":"support_042"}

Optional
consentSourcestring
enum

Source or method through which consent was obtained

Values: web_form, mobile_app, api, customer_service, in_person, email, phone, import, manual

Example: "web_form"

Optional
withdrawnAtDateTime
stored

Timestamp when consent was withdrawn

Example: "2024-06-15T14:20:00Z"

Optional
withdrawnIpstring
stored

IP address from which consent was withdrawn

Example: "192.168.1.105"

Optional
withdrawnByUser
stored

User who withdrew consent (if withdrawn by staff)

Optional
withdrawalReasonstring
stored

Reason provided for consent withdrawal

Example: "No longer interested"

Optional
consentVersionstring
stored

Version of the consent form, policy, or terms under which consent was given

Example: "2.1"

Optional
languageLanguage
stored

Language in which consent was presented and obtained

Optional
expiresAtDateTime
stored

Optional expiration date for time-limited consents

Example: "2025-01-15T00:00:00Z"

Optional
metadataobject
stored

Additional consent-specific metadata (form ID, document URL, etc.)

Example: {"formId":"consent_form_v2.1","documentUrl":"https://example.com/privacy-policy-v2.1.pdf"}

Optional

Examples

Example 1

{
  "@type": "Consent",
  "entityType": "Customer",
  "entityId": "CUST-2024-00123",
  "consentType": "privacy_policy",
  "granted": true,
  "grantedAt": "2024-01-15T10:30:00Z",
  "grantedIp": "192.168.1.100",
  "consentSource": "web_form",
  "consentVersion": "2.1",
  "language": {
    "@type": "Language",
    "code": "en",
    "name": "English"
  },
  "metadata": {
    "formId": "privacy_policy_v2.1",
    "documentUrl": "https://example.com/privacy-policy-v2.1.pdf"
  }
}

Example 2

{
  "@type": "Consent",
  "entityType": "Customer",
  "entityId": "CUST-2024-00123",
  "consentType": "cookies",
  "granted": false,
  "withdrawnAt": "2024-06-15T14:20:00Z",
  "withdrawnIp": "192.168.1.105",
  "withdrawalReason": "Privacy concerns",
  "consentVersion": "1.5"
}

Example 3

{
  "@type": "Consent",
  "entityType": "Patient",
  "entityId": "PAT-2024-1234",
  "consentType": "medical_treatment",
  "granted": true,
  "grantedAt": "2024-05-10T09:00:00Z",
  "grantedIp": "10.0.0.25",
  "grantedBy": {
    "@type": "User",
    "userId": "nurse_012",
    "name": "Nurse Smith"
  },
  "consentSource": "in_person",
  "consentVersion": "3.0",
  "language": {
    "@type": "Language",
    "code": "en",
    "name": "English"
  },
  "metadata": {
    "procedureType": "Surgery",
    "consentFormSigned": true,
    "witnessName": "Dr. Johnson"
  }
}

Example 4

{
  "@type": "Consent",
  "entityType": "Employee",
  "entityId": "EMP-2024-0042",
  "consentType": "data_sharing",
  "granted": true,
  "grantedAt": "2024-02-01T08:00:00Z",
  "grantedIp": "10.10.10.50",
  "consentSource": "email",
  "consentVersion": "1.0",
  "language": {
    "@type": "Language",
    "code": "en",
    "name": "English"
  },
  "expiresAt": "2025-02-01T00:00:00Z",
  "metadata": {
    "dataSharingPartner": "Background Check Provider",
    "purpose": "Employment verification"
  }
}