REST /api/v1/activity-types 5 endpoints
GET /api/v1/activity-types/api/v1/activity-types

List all activity types for an organization

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"
    },
    {
      "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"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 14
  }
}
GET /api/v1/activity-types/api/v1/activity-types/:id

Get a single activity type by ID

Public

Response Example

{
  "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"
}
POST /api/v1/activity-types/api/v1/activity-types

Create a new activity type for an organization

Public

Request Example

{
  "org_id": "org-7f3a",
  "name": "Volunteer Day",
  "code": "VOLUNTEER",
  "is_active": true,
  "requires_report_form": true,
  "is_travel_expense_eligible": false,
  "triggers_reimbursement_workflow": false,
  "metadata": {
    "category": "community",
    "max_days": 2
  }
}

Response Example

{
  "id": "at-009",
  "org_id": "org-7f3a",
  "name": "Volunteer Day",
  "code": "VOLUNTEER",
  "is_active": true,
  "requires_report_form": true,
  "is_travel_expense_eligible": false,
  "triggers_reimbursement_workflow": false,
  "metadata": {
    "category": "community",
    "max_days": 2
  },
  "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

Public

Request Example

{
  "name": "Business Travel (Domestic)",
  "is_active": true,
  "requires_report_form": true,
  "metadata": {
    "category": "travel",
    "max_days": 14,
    "domestic_only": true
  }
}

Response Example

{
  "id": "at-001",
  "org_id": "org-7f3a",
  "name": "Business Travel (Domestic)",
  "code": "BIZ_TRAVEL",
  "is_active": true,
  "requires_report_form": true,
  "is_travel_expense_eligible": true,
  "triggers_reimbursement_workflow": true,
  "metadata": {
    "category": "travel",
    "max_days": 14,
    "domestic_only": true
  },
  "created_at": "2025-11-10T08:00:00Z",
  "updated_at": "2026-03-26T14:05:00Z"
}
DELETE /api/v1/activity-types/api/v1/activity-types/:id

Soft-delete (deactivate) an activity type

Public

Response Example

{
  "success": true,
  "id": "at-001",
  "deactivated_at": "2026-03-26T14:10:00Z"
}

Additional Metadata

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