REST /api/v1/declarations 6 endpoints
GET /api/v1/declarations/api/v1/declarations

Query declarations with status and assignment filtering

Public

Response Example

{
  "data": [
    {
      "declaration_id": "decl_88A1",
      "driver_id": "drv_0042",
      "assignment_id": "asgn_01HX7Z2NQK",
      "template_id": "tpl_v3_org_812",
      "status": "acknowledged",
      "sent_at": "2026-03-21T10:00:00Z",
      "acknowledged_at": "2026-03-22T14:35:00Z",
      "created_at": "2026-03-21T09:55:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 12
  }
}
GET /api/v1/declarations/api/v1/declarations/:declaration_id

Find a declaration by ID

Public

Response Example

{
  "declaration_id": "decl_88A1",
  "driver_id": "drv_0042",
  "assignment_id": "asgn_01HX7Z2NQK",
  "template_id": "tpl_v3_org_812",
  "status": "acknowledged",
  "sent_at": "2026-03-21T10:00:00Z",
  "acknowledged_at": "2026-03-22T14:35:00Z",
  "created_at": "2026-03-21T09:55:00Z"
}
POST /api/v1/declarations/api/v1/declarations

Insert a new declaration record

Public

Request Example

{
  "declaration_id": "decl_88A1",
  "driver_id": "drv_0042",
  "assignment_id": "asgn_01HX7Z2NQK",
  "template_id": "tpl_v3_org_812",
  "status": "pending"
}

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"
}
PUT /api/v1/declarations/api/v1/declarations/:declaration_id

Update declaration status and timestamp

Public

Request Example

{
  "status": "sent",
  "sent_at": "2026-03-26T10:00:00Z"
}

Response Example

{
  "declaration_id": "decl_88A1",
  "status": "sent",
  "sent_at": "2026-03-26T10:00:00Z",
  "updated_at": "2026-03-26T10:00:01Z"
}
DELETE /api/v1/declarations/api/v1/declarations/:declaration_id

Delete a declaration record

Public

Response Example

{
  "declaration_id": "decl_88A1",
  "deleted": true,
  "deleted_at": "2026-03-26T11:00:00Z"
}
PATCH /api/v1/declarations/api/v1/declarations/:declaration_id/acknowledgement

Record acknowledgement directly on the declaration row

Public

Request Example

{
  "driver_id": "drv_0042",
  "acknowledged_at": "2026-03-22T14:35:00Z"
}

Response Example

{
  "declaration_id": "decl_88A1",
  "status": "acknowledged",
  "acknowledged_at": "2026-03-22T14:35:00Z",
  "updated_at": "2026-03-22T14:35:01Z"
}

Additional Metadata

{
  "contract_summary": {
    "total_contracts": 410,
    "total_endpoints": 2416,
    "api_styles_used": [
      "rest"
    ]
  },
  "generated_at": "2026-03-26T06:55:53.316Z"
}