Claim Events Repository
API Contract
REST
/api/v1/claim-events
6 endpoints
GET
/api/v1/claim-events/api/v1/claim-events
List claim events, filterable by claim (getEventsForClaim)
Public
Response Example
{
"data": [
{
"event_id": "evt_1a2b3c4d",
"claim_id": "clm_9f2a3b4c",
"actor_id": "usr_84cd12ef",
"from_status": "draft",
"to_status": "pending_coordinator",
"comment": null,
"created_at": "2026-03-20T09:15:00Z"
},
{
"event_id": "evt_2b3c4d5e",
"claim_id": "clm_9f2a3b4c",
"actor_id": "usr_coord99",
"from_status": "pending_coordinator",
"to_status": "approved",
"comment": "All receipts verified.",
"created_at": "2026-03-21T11:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2
}
}
GET
/api/v1/claim-events/api/v1/claim-events/:event_id
Get a single claim event (getLatestEvent via ?claim_id=&latest=true)
Public
Response Example
{
"event_id": "evt_2b3c4d5e",
"claim_id": "clm_9f2a3b4c",
"actor_id": "usr_coord99",
"from_status": "pending_coordinator",
"to_status": "approved",
"comment": "All receipts verified.",
"created_at": "2026-03-21T11:30:00Z"
}
POST
/api/v1/claim-events/api/v1/claim-events
Insert a single claim event (insertEvent)
Public
Request Example
{
"claim_id": "clm_9f2a3b4c",
"actor_id": "usr_coord99",
"from_status": "pending_coordinator",
"to_status": "approved",
"comment": "All receipts verified."
}
Response Example
{
"event_id": "evt_2b3c4d5e",
"claim_id": "clm_9f2a3b4c",
"actor_id": "usr_coord99",
"from_status": "pending_coordinator",
"to_status": "approved",
"comment": "All receipts verified.",
"created_at": "2026-03-26T08:10:00Z"
}
POST
/api/v1/claim-events/api/v1/claim-events/bulk
Bulk insert claim events (bulkInsertEvents)
Public
Request Example
{
"events": [
{
"claim_id": "clm_9f2a3b4c",
"actor_id": "usr_coord99",
"from_status": "pending_coordinator",
"to_status": "approved",
"comment": "Verified."
},
{
"claim_id": "clm_ab5c6d7e",
"actor_id": "usr_coord99",
"from_status": "pending_coordinator",
"to_status": "rejected",
"comment": "Missing receipts."
}
]
}
Response Example
{
"inserted_count": 2,
"event_ids": [
"evt_2b3c4d5e",
"evt_3c4d5e6f"
]
}
PUT
/api/v1/claim-events/api/v1/claim-events/:event_id
Update a claim event comment (audit correction)
Public
Request Example
{
"comment": "Verified — amended note after review."
}
Response Example
{
"event_id": "evt_2b3c4d5e",
"comment": "Verified — amended note after review.",
"updated_at": "2026-03-26T09:00:00Z"
}
DELETE
/api/v1/claim-events/api/v1/claim-events/:event_id
Delete a claim event (admin only)
Public
Response Example
{
"deleted": true,
"event_id": "evt_2b3c4d5e"
}