Declaration Management Service
API Contract
REST
/api/v1/declarations
8 endpoints
GET
/api/v1/declarations/api/v1/declarations
List declarations with optional filtering by assignment, status, or driver
Public
Response Example
{
"data": [
{
"declaration_id": "decl_88A1",
"driver_id": "drv_0042",
"assignment_id": "asgn_01HX7Z2NQK",
"template_id": "tpl_v3_org_812",
"status": "sent",
"sent_at": "2026-03-21T10:00:00Z",
"acknowledged_at": null,
"created_at": "2026-03-21T09:55:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 12
}
}
GET
/api/v1/declarations/api/v1/declarations/:declaration_id
Get a single declaration by ID
Public
Response Example
{
"declaration_id": "decl_88A1",
"driver_id": "drv_0042",
"assignment_id": "asgn_01HX7Z2NQK",
"template_id": "tpl_v3_org_812",
"org_id": "org_812",
"status": "sent",
"recipient_id": "drv_0042",
"sent_at": "2026-03-21T10:00:00Z",
"acknowledged_at": null,
"created_at": "2026-03-21T09:55:00Z",
"updated_at": "2026-03-21T10:00:00Z"
}
POST
/api/v1/declarations/api/v1/declarations
Create a new confidentiality declaration for a driver
Public
Request Example
{
"driver_id": "drv_0042",
"assignment_id": "asgn_01HX7Z2NQK",
"template_id": "tpl_v3_org_812"
}
Response Example
{
"declaration_id": "decl_88A1",
"driver_id": "drv_0042",
"assignment_id": "asgn_01HX7Z2NQK",
"template_id": "tpl_v3_org_812",
"status": "pending",
"created_at": "2026-03-26T09:00:00Z",
"updated_at": "2026-03-26T09:00:00Z"
}
PUT
/api/v1/declarations/api/v1/declarations/:declaration_id
Update declaration metadata (template, status)
Public
Request Example
{
"template_id": "tpl_v4_org_812",
"status": "pending"
}
Response Example
{
"declaration_id": "decl_88A1",
"driver_id": "drv_0042",
"assignment_id": "asgn_01HX7Z2NQK",
"template_id": "tpl_v4_org_812",
"status": "pending",
"updated_at": "2026-03-26T10:00:00Z"
}
DELETE
/api/v1/declarations/api/v1/declarations/:declaration_id
Delete a declaration
Public
Response Example
{
"declaration_id": "decl_88A1",
"deleted": true,
"deleted_at": "2026-03-26T11:30:00Z"
}
POST
/api/v1/declarations/api/v1/declarations/:declaration_id/send
Send a declaration to the specified recipient
Public
Request Example
{
"recipient_id": "drv_0042"
}
Response Example
{
"declaration_id": "decl_88A1",
"status": "sent",
"recipient_id": "drv_0042",
"sent_at": "2026-03-26T09:15:00Z"
}
POST
/api/v1/declarations/api/v1/declarations/:declaration_id/resend
Resend a previously sent declaration
Public
Response Example
{
"declaration_id": "decl_88A1",
"status": "sent",
"resent_at": "2026-03-26T12:00:00Z",
"resend_count": 2
}
GET
/api/v1/declarations/api/v1/declarations/:declaration_id/status
Get the current status of a declaration
Public
Response Example
{
"declaration_id": "decl_88A1",
"status": "sent",
"sent_at": "2026-03-21T10:00:00Z",
"acknowledged_at": null,
"expires_at": "2026-04-21T10:00:00Z"
}