43.14.1Privacy Notice Endpoint

 

The Privacy Notice endpoint provides REST API access to Privacy & Security Notice functionality for Angular frontend applications. This endpoint allows applications to retrieve current privacy notices, check user acceptance status, and record user acceptance.

43.14.1.1Security

Privacy Notice endpoints have special security considerations:

  • GET endpoints (/admin-json/privacy-notice and /admin-json/privacy-notice/status) are exempt from the Privacy & Security Notice filter to prevent infinite redirect loops
  • User authentication is still required for all endpoints
  • The ACCESS_ADMIN_JSON permission is required to access these endpoints

43.14.1.2Endpoints

43.14.1.2.1Get Current Privacy Notice

Retrieves the current privacy notice content and metadata.

URL: GET /admin-json/privacy-notice

Required Permissions: ACCESS_ADMIN_JSON

Response:

{
  "content": "This is the privacy notice content...",
  "version": "2025.01.15",
  "isActive": true,
  "expiryDays": 90
}

Response Fields:

  • content (string): The privacy notice text content
  • version (string): The current version identifier of the privacy notice
  • isActive (boolean): Whether the privacy notice is active (has both content and version)
  • expiryDays (integer): Number of days after which acceptance expires

43.14.1.2.2Get User Acceptance Status

Checks the current user's privacy notice acceptance status.

URL: GET /admin-json/privacy-notice/status

Required Permissions: ACCESS_ADMIN_JSON

Response:

{
  "isRequired": true,
  "currentVersion": "2025.01.15"
}

Response Fields:

  • isRequired (boolean): Whether the user needs to accept the current privacy notice
  • currentVersion (string): The current version of the privacy notice

43.14.1.2.3Accept Privacy Notice

Records the user's acceptance of the current privacy notice version.

URL: POST /admin-json/privacy-notice/accept

Required Permissions: ACCESS_ADMIN_JSON

Request Body:

{
  "version": "2025.01.15"
}

Request Fields:

  • version (string): The version of the privacy notice being accepted (must match current version)

Response:

{
  "success": true,
  "acceptedDate": "2025-01-15T10:30:00Z"
}

Response Fields:

  • success (boolean): Whether the acceptance was successfully recorded
  • acceptedDate (string): ISO-8601 timestamp when the acceptance was recorded

43.14.1.3Error Handling

43.14.1.3.1Version Mismatch (400 Bad Request)

When attempting to accept a privacy notice version that doesn't match the current version:

{
  "error": "Version mismatch: attempted to accept version '2025.01.10' but current version is '2025.01.15'"
}

43.14.1.3.2Authentication Required (400 Bad Request)

When authentication is missing or invalid:

{
  "error": "Authentication is required"
}

43.14.1.3.3Internal Server Error (500 Internal Server Error)

When the service encounters an unexpected error:

{
  "error": "Failed to retrieve privacy notice: [error details]"
}

43.14.1.4Integration Notes

These endpoints are designed to support front-end web applications that need to:

  1. Check if a privacy notice is active on the server 2. Determine if the current user needs to accept the privacy notice 3. Display the privacy notice content to users 4. Record user acceptance when they agree to the terms

The endpoints integrate with the existing Privacy & Security Notice infrastructure in Smile CDR, including:

  • Configuration through the privacy_security_notice configuration category
  • Audit logging of acceptance events
  • Expiry-based re-acceptance requirements
  • Integration with the security filter system