Declaration Audit Logger
API Contract
REST
/api/v1/declaration-audit-logs
8 endpoints
GET
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs
List audit log entries with optional filtering by declaration, actor, or event type
Public
Response Example
{
"data": [
{
"log_id": "log_A1B2C3",
"declaration_id": "decl_88A1",
"event_type": "acknowledged",
"actor_id": "drv_0042",
"timestamp": "2026-03-22T14:35:00Z",
"metadata": {
"ip": "185.90.12.44"
}
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 22
}
}
GET
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs/:log_id
Get a single audit log entry
Public
Response Example
{
"log_id": "log_A1B2C3",
"declaration_id": "decl_88A1",
"event_type": "acknowledged",
"actor_id": "drv_0042",
"timestamp": "2026-03-22T14:35:00Z",
"metadata": {
"ip": "185.90.12.44",
"user_agent": "Mozilla/5.0 (iPhone)"
}
}
POST
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs
Create a generic audit log entry
Public
Request Example
{
"declaration_id": "decl_88A1",
"event_type": "created",
"actor_id": "usr_coord_004",
"timestamp": "2026-03-21T09:55:00Z",
"metadata": {}
}
Response Example
{
"log_id": "log_D4E5F6",
"declaration_id": "decl_88A1",
"event_type": "created",
"actor_id": "usr_coord_004",
"timestamp": "2026-03-21T09:55:00Z",
"created_at": "2026-03-21T09:55:01Z"
}
PUT
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs/:log_id
Amend audit log metadata (admin correction, append-only policy enforced)
Public
Request Example
{
"metadata": {
"ip": "185.90.12.44",
"corrected_by": "admin_01"
}
}
Response Example
{
"log_id": "log_A1B2C3",
"metadata": {
"ip": "185.90.12.44",
"corrected_by": "admin_01"
},
"updated_at": "2026-03-26T09:00:00Z"
}
DELETE
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs/:log_id
Delete an audit log entry (restricted to compliance admin roles)
Public
Response Example
{
"log_id": "log_A1B2C3",
"deleted": true,
"deleted_at": "2026-03-26T09:30:00Z"
}
POST
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs/sent
Log a declaration sent event
Public
Request Example
{
"declaration_id": "decl_88A1",
"recipient_id": "drv_0042",
"timestamp": "2026-03-21T10:00:00Z"
}
Response Example
{
"log_id": "log_G7H8I9",
"declaration_id": "decl_88A1",
"event_type": "sent",
"actor_id": "drv_0042",
"timestamp": "2026-03-21T10:00:00Z",
"created_at": "2026-03-21T10:00:01Z"
}
POST
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs/read
Log a declaration read event
Public
Request Example
{
"declaration_id": "decl_88A1",
"reader_id": "drv_0042",
"timestamp": "2026-03-22T14:30:00Z"
}
Response Example
{
"log_id": "log_J0K1L2",
"declaration_id": "decl_88A1",
"event_type": "read",
"actor_id": "drv_0042",
"timestamp": "2026-03-22T14:30:00Z",
"created_at": "2026-03-22T14:30:01Z"
}
POST
/api/v1/declaration-audit-logs/api/v1/declaration-audit-logs/acknowledged
Log a declaration acknowledged event
Public
Request Example
{
"declaration_id": "decl_88A1",
"signer_id": "drv_0042",
"timestamp": "2026-03-22T14:35:00Z"
}
Response Example
{
"log_id": "log_M3N4O5",
"declaration_id": "decl_88A1",
"event_type": "acknowledged",
"actor_id": "drv_0042",
"timestamp": "2026-03-22T14:35:00Z",
"created_at": "2026-03-22T14:35:01Z"
}