Appearance
Work Types
Manage work types that classify employees and vacancies by employment category. Work types affect cost calculations through their overhead percentage and control whether holidays are excluded from FTE calculations.
Work Type Object
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier (CUID format). System-generated. Read-only. |
name | string | Work type name (e.g. "Full-time", "Part-time", "Fixed-term"). |
description | string | null | Description of this work arrangement. |
overheadPercentage | number | Overhead multiplier applied to base salary for total cost calculations (e.g. 0.3 = 30% overhead). Default: 0. |
isActive | boolean | Whether this work type is active. |
sortOrder | integer | Display ordering weight. Lower values appear first. |
excludeHolidays | boolean | Whether to exclude holidays from FTE calculations for this work type. |
appliesToType | string | null | Whether this work type applies to "employee" or "contractor". null = applies to both. |
createdAt | datetime (ISO 8601) | When the record was created. Read-only. |
updatedAt | datetime (ISO 8601) | When the record was last modified. Read-only. |
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /org/:orgId/work-types | List work types |
GET | /org/:orgId/work-types/:id | Get work type |
POST | /org/:orgId/work-types | Create work type |
PATCH | /org/:orgId/work-types/:id | Update work type |
DELETE | /org/:orgId/work-types/:id | Delete work type |
List Work Types
GET /org/:orgId/work-typesQuery Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number (1-based). |
limit | integer | 20 | Records per page. Min 1, max 100. |
search | string | -- | Free-text search by name. |
sortBy | string | name | Field to sort by: name, sortOrder, createdAt. |
sortDir | string | asc | asc or desc. |
Example Request
bash
curl -X GET "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/work-types?sortBy=name" \
-H "Authorization: Bearer private_..."Example Response
json
{
"data": [
{
"id": "clx6t7u8v9w0x1y2z3a4",
"name": "Full-time",
"description": "Standard full-time employment",
"overheadPercentage": 0.3,
"isActive": true,
"sortOrder": 0,
"excludeHolidays": false,
"appliesToType": null,
"createdAt": "2024-01-10T08:00:00Z",
"updatedAt": "2025-11-20T14:00:00Z"
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 3,
"hasNextPage": false
}
}Create Work Type
POST /org/:orgId/work-typesCreate Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Work type name. |
description | string | null | No | Description. |
overheadPercentage | number | No | Overhead multiplier (e.g. 0.3 for 30%). Must be >= 0. |
isActive | boolean | No | Default: true. |
sortOrder | integer | No | Display ordering. Default: 0. |
excludeHolidays | boolean | No | Whether to exclude holidays from FTE calculations. Default: false. |
appliesToType | string | No | "employee" or "contractor". Omit for both. |
Update Request Body
All fields from Create are accepted, all optional.
Example Request
bash
curl -X POST "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/work-types" \
-H "Authorization: Bearer private_..." \
-H "Content-Type: application/json" \
-d '{
"name": "Full-time",
"description": "Standard full-time employment",
"overheadPercentage": 0.3
}'Status: 201 Created
Error Responses
Validation Error (400)
json
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": [{ "field": "name", "message": "name is required" }],
"errorId": "err_clx9a8b7c6d5e4f3"
}
}Not Found (404)
json
{
"error": {
"code": "NOT_FOUND",
"message": "Work type not found.",
"errorId": "err_clx9a8b7c6d5e4f3"
}
}