Service Types API
All endpoints require authentication and service-types tool permissions.
Overview — what Service Types are used for
Section titled “Overview — what Service Types are used for”Service Types are an admin-managed taxonomy of standardised service categories (name, default_rate, unit, category), maintained in Settings ▸ Service Types (with drag-to-reorder). They are managed in Nucleus — not synced from Productive — and underpin pricing, invoicing and resourcing consistency. Consumers:
- Budget line items — selecting a service type auto-fills
unit_pricefromdefault_rate. - Invoice line items — auto-fills description + unit price, and maps to Xero account codes via
invoice_mapping_rulesfor accounting export. - Proposal pricing items — pricing sections reference a service type.
- Resourcing allocations — an allocation can carry a
service_type_id. - Client service heatmap —
client_service_cellsmap company × service and are auto-populated by fuzzy-matching project type labels (worker/lib/heatmap-auto.ts), validatingis_active.
It is a core configuration feature, not an orphaned table.
List Service Types
Section titled “List Service Types”GET /api/service-typesPermission: service-types:view
Query parameters:
| Param | Type | Description |
|---|---|---|
include_inactive | string | Set to true to include inactive service types (default: active only) |
category | string | Filter by category |
Results are ordered by position, then name.
Response: { service_types }
Create Service Type
Section titled “Create Service Type”POST /api/service-typesPermission: service-types:manage
Body:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Service type name |
description | string | No | Description |
default_rate | number | No | Default hourly/unit rate |
unit | string | No | Unit of measure (default: hour) |
category | string | No | Category grouping |
Response: { service_type } (201)
Reorder Service Types
Section titled “Reorder Service Types”PUT /api/service-types/reorderPermission: service-types:manage
Body:
| Field | Type | Required | Description |
|---|---|---|---|
ids | string[] | Yes | Ordered array of service type IDs |
Response: { ok: true }
Update Service Type
Section titled “Update Service Type”PUT /api/service-types/:idPermission: service-types:manage
Body: Any of: name, description, default_rate, unit, category, is_active.
Response: { service_type }
Delete Service Type
Section titled “Delete Service Type”DELETE /api/service-types/:idPermission: service-types:manage
Response: { ok: true }