Activity Type Repository
API Contract
REST
/api/v1/activity-types
5 endpoints
GET
/api/v1/activity-types/api/v1/activity-types
Fetch all activity types for an organization (repository layer, supports advanced filtering)
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
}
}
GET
/api/v1/activity-types/api/v1/activity-types/:id
Fetch a single activity type row by ID
Public
Response Example
{
"id": "at-002",
"org_id": "org-7f3a",
"name": "Conference Attendance",
"code": "CONFERENCE",
"is_active": true,
"requires_report_form": true,
"is_travel_expense_eligible": true,
"triggers_reimbursement_workflow": true,
"metadata": {
"category": "professional_development"
},
"created_at": "2025-12-01T09:00:00Z",
"updated_at": "2026-02-20T10:00:00Z"
}
POST
/api/v1/activity-types/api/v1/activity-types
Insert a new activity type record
Public
Request Example
{
"org_id": "org-7f3a",
"name": "Remote Work Day",
"code": "REMOTE",
"is_active": true,
"requires_report_form": false,
"is_travel_expense_eligible": false,
"triggers_reimbursement_workflow": false,
"metadata": {
"category": "flexible_work"
}
}
Response Example
{
"id": "at-010",
"org_id": "org-7f3a",
"name": "Remote Work Day",
"code": "REMOTE",
"is_active": true,
"requires_report_form": false,
"is_travel_expense_eligible": false,
"triggers_reimbursement_workflow": false,
"metadata": {
"category": "flexible_work"
},
"created_at": "2026-03-26T14:00:00Z",
"updated_at": "2026-03-26T14:00:00Z"
}
PUT
/api/v1/activity-types/api/v1/activity-types/:id
Update an existing activity type record
Public
Request Example
{
"is_active": false,
"metadata": {
"category": "flexible_work",
"deprecated": true
}
}
Response Example
{
"id": "at-010",
"org_id": "org-7f3a",
"name": "Remote Work Day",
"code": "REMOTE",
"is_active": false,
"requires_report_form": false,
"is_travel_expense_eligible": false,
"triggers_reimbursement_workflow": false,
"metadata": {
"category": "flexible_work",
"deprecated": true
},
"created_at": "2026-03-26T14:00:00Z",
"updated_at": "2026-03-26T15:00:00Z"
}
DELETE
/api/v1/activity-types/api/v1/activity-types/:id
Delete an activity type record from the repository
Public
Response Example
{
"success": true,
"deleted_id": "at-010"
}