Activity Type Cache Provider
API Contract
REST
/api/v1/activity-types
4 endpoints
GET
/api/v1/activity-types/api/v1/activity-types/cache
Return the current in-memory cached list of activity types
Public
Response Example
{
"data": [
{
"id": "at-001",
"org_id": "org-7f3a",
"name": "Business Travel",
"code": "BIZ_TRAVEL",
"is_active": true,
"requires_report_form": false,
"is_travel_expense_eligible": true,
"triggers_reimbursement_workflow": true,
"metadata": {
"category": "travel",
"max_days": 30
},
"created_at": "2025-11-10T08:00:00Z",
"updated_at": "2026-01-15T12:34:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 14
},
"cache_meta": {
"built_at": "2026-03-26T13:00:00Z",
"ttl_seconds": 300,
"is_stale": false
}
}
POST
/api/v1/activity-types/api/v1/activity-types/cache/build
Trigger a full cache rebuild for an organization
Public
Request Example
{
"org_id": "org-7f3a"
}
Response Example
{
"success": true,
"org_id": "org-7f3a",
"built_at": "2026-03-26T14:00:00Z",
"item_count": 14
}
DELETE
/api/v1/activity-types/api/v1/activity-types/cache
Invalidate the cache for an organization
Public
Response Example
{
"success": true,
"org_id": "org-7f3a",
"invalidated_at": "2026-03-26T14:02:00Z"
}
POST
/api/v1/activity-types/api/v1/activity-types/cache/refresh
Invalidate and immediately rebuild the cache
Public
Request Example
{
"org_id": "org-7f3a"
}
Response Example
{
"success": true,
"org_id": "org-7f3a",
"refreshed_at": "2026-03-26T14:03:00Z",
"item_count": 14,
"previous_built_at": "2026-03-26T13:00:00Z"
}