Benefit Calculation Result Model
API Contract
REST
/api/v1/benefit-calculation-results
5 endpoints
GET
/api/v1/benefit-calculation-results/api/v1/benefit-calculation-results
List all stored benefit calculation results
Public
Response Example
{
"data": [
{
"id": "calc_7f3a2b1c",
"hours_saved": 12.5,
"travel_cost_avoided": 87.5,
"health_system_offset": 375,
"input": {
"mentor_id": "mentor_001",
"organisation_id": "org_42",
"sessions": 25,
"avg_minutes": 30,
"cost_per_session": 3.5,
"cost_per_hour": 30
},
"created_at": "2026-03-20T14:30:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
GET
/api/v1/benefit-calculation-results/api/v1/benefit-calculation-results/:id
Get a specific benefit calculation result by ID
Public
Response Example
{
"id": "calc_7f3a2b1c",
"hours_saved": 12.5,
"travel_cost_avoided": 87.5,
"health_system_offset": 375,
"input": {
"mentor_id": "mentor_001",
"organisation_id": "org_42",
"sessions": 25,
"avg_minutes": 30,
"cost_per_session": 3.5,
"cost_per_hour": 30
},
"created_at": "2026-03-20T14:30:00Z"
}
POST
/api/v1/benefit-calculation-results/api/v1/benefit-calculation-results
Persist a new benefit calculation result
Public
Request Example
{
"hours_saved": 17.5,
"travel_cost_avoided": 122.5,
"health_system_offset": 525,
"input": {
"mentor_id": "mentor_002",
"organisation_id": "org_42",
"sessions": 35,
"avg_minutes": 30,
"cost_per_session": 3.5,
"cost_per_hour": 30
}
}
Response Example
{
"id": "calc_1b2c3d4e",
"hours_saved": 17.5,
"travel_cost_avoided": 122.5,
"health_system_offset": 525,
"input": {
"mentor_id": "mentor_002",
"organisation_id": "org_42",
"sessions": 35,
"avg_minutes": 30,
"cost_per_session": 3.5,
"cost_per_hour": 30
},
"created_at": "2026-03-26T09:20:00Z"
}
PUT
/api/v1/benefit-calculation-results/api/v1/benefit-calculation-results/:id
Update a stored benefit calculation result (e.g. after config correction)
Public
Request Example
{
"hours_saved": 13,
"travel_cost_avoided": 91,
"health_system_offset": 390
}
Response Example
{
"id": "calc_7f3a2b1c",
"hours_saved": 13,
"travel_cost_avoided": 91,
"health_system_offset": 390,
"input": {
"mentor_id": "mentor_001",
"organisation_id": "org_42",
"sessions": 25,
"avg_minutes": 30,
"cost_per_session": 3.5,
"cost_per_hour": 30
},
"created_at": "2026-03-20T14:30:00Z",
"updated_at": "2026-03-26T09:25:00Z"
}
DELETE
/api/v1/benefit-calculation-results/api/v1/benefit-calculation-results/:id
Delete a stored benefit calculation result
Public
Response Example
{
"deleted": true,
"id": "calc_7f3a2b1c"
}