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.
Properties
| Property | Type | Mode | Description | Required |
|---|---|---|---|---|
| entityType | string | stored | Type of entity giving consent (Customer, Patient, Employee, User, etc.) Example: | Required |
| entityId | string | stored | Unique identifier of the entity giving consent Example: | Required |
| consentType | string | enum | Category of consent being tracked Values: Example: | Required |
| granted | boolean | stored | Whether consent is currently granted (true) or withdrawn (false) Example: | Required |
| grantedAt | DateTime | stored | Timestamp when consent was granted Example: | Optional |
| grantedIp | string | stored | IP address from which consent was granted (GDPR Article 7 proof requirement) Example: | Optional |
| grantedBy | User | stored | User who granted consent (if obtained by staff on behalf of entity) Example: | Optional |
| consentSource | string | enum | Source or method through which consent was obtained Values: Example: | Optional |
| withdrawnAt | DateTime | stored | Timestamp when consent was withdrawn Example: | Optional |
| withdrawnIp | string | stored | IP address from which consent was withdrawn Example: | Optional |
| withdrawnBy | User | stored | User who withdrew consent (if withdrawn by staff) | Optional |
| withdrawalReason | string | stored | Reason provided for consent withdrawal Example: | Optional |
| consentVersion | string | stored | Version of the consent form, policy, or terms under which consent was given Example: | Optional |
| language | Language | stored | Language in which consent was presented and obtained | Optional |
| expiresAt | DateTime | stored | Optional expiration date for time-limited consents Example: | Optional |
| metadata | object | stored | Additional consent-specific metadata (form ID, document URL, etc.) Example: | 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"
}
}