Core Concepts
Key Terms
| Term | Description | Example |
|---|---|---|
template_code | Consent template identifier | demo_mobile_kyc |
customer_id | User identifier | 550e8400-e29b-41d4-a716-446655440000 |
consent_version_id | Unique ID for each template version | 123e4567-e89b-12d3-a456-426614174010 |
Published vs Pending
| Type | Endpoint | When to use |
|---|---|---|
| Published | /v1/consent-templates/{code}/latest | Get current template available to all users |
| Pending | /v1/customers/{id}/consents/templates/{code}/pending | Check if user has unaccepted template update |
Pending example: Template v2.0 was released. User hasn't seen it yet → accepted: false. After user makes a decision → accepted: true.
Decision Values
| Value | Meaning |
|---|---|
given | User agreed to consent |
reject | User declined |
withdraw | User withdrew previous consent |
How It Works
1. GET /latest → Show current consent template to user
2. GET /pending → Check if user has pending updates
3. POST /decisions → Save user's choice (given/reject/withdraw)