Skip to content

Work Types

Manage work types that classify employees and vacancies by employment category.

Endpoints

MethodPathDescription
GET/org/:orgId/work-typesList work types
GET/org/:orgId/work-types/:idGet work type
POST/org/:orgId/work-typesCreate work type
PATCH/org/:orgId/work-types/:idUpdate work type
DELETE/org/:orgId/work-types/:idDelete work type

List Work Types

GET /org/:orgId/work-types

Returns a paginated list of work types in the organization.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
limitinteger20Records per page (max 200)
searchstringSearch by name
sortBystringnameSort field: name, sortOrder, createdAt
sortDirstringascasc or desc

Example Request

bash
curl -X GET "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/work-types?sortBy=name&limit=50" \
  -H "Authorization: Bearer private_..."

Example Response

json
{
  "data": [
    {
      "id": "clx6t7u8v9w0x1y2",
      "name": "Full-time",
      "description": "Standard full-time employment",
      "overheadPercentage": 0.3,
      "isActive": true,
      "sortOrder": 0,
      "excludeHolidays": false,
      "createdAt": "2024-01-10T08:00:00Z",
      "updatedAt": "2025-11-20T14:00:00Z"
    },
    {
      "id": "clx1e2n3g4r5o0t6",
      "name": "Part-time",
      "description": "Part-time employment, typically 50% FTE",
      "overheadPercentage": 0.15,
      "isActive": true,
      "sortOrder": 1,
      "excludeHolidays": false,
      "createdAt": "2024-01-05T08:00:00Z",
      "updatedAt": "2025-09-01T10:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 50,
    "total": 3,
    "hasNextPage": false
  }
}

Get Work Type

GET /org/:orgId/work-types/:id

Returns a single work type by ID.

Example Request

bash
curl -X GET "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/work-types/clx6t7u8v9w0x1y2" \
  -H "Authorization: Bearer private_..."

Example Response

json
{
  "data": {
    "id": "clx6t7u8v9w0x1y2",
    "name": "Full-time",
    "description": "Standard full-time employment",
    "overheadPercentage": 0.3,
    "isActive": true,
    "sortOrder": 0,
    "excludeHolidays": false,
    "createdAt": "2024-01-10T08:00:00Z",
    "updatedAt": "2025-11-20T14:00:00Z"
  }
}

Create Work Type

POST /org/:orgId/work-types

Creates a new work type.

Request Body

json
{
  "name": "Full-time",
  "description": "Standard full-time employment",
  "overheadPercentage": 0.3
}

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
  }'

Example Response

json
{
  "data": {
    "id": "clx3d4e5f6g7h8i9",
    "name": "Full-time",
    "description": "Standard full-time employment",
    "overheadPercentage": 0.3,
    "isActive": true,
    "sortOrder": 0,
    "excludeHolidays": false,
    "createdAt": "2026-03-11T09:40:00Z",
    "updatedAt": "2026-03-11T09:40:00Z"
  }
}

Status: 201 Created


Update Work Type

PATCH /org/:orgId/work-types/:id

Updates one or more fields on an existing work type. Only include the fields you want to change.

Example Request

bash
curl -X PATCH "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/work-types/clx6t7u8v9w0x1y2" \
  -H "Authorization: Bearer private_..." \
  -H "Content-Type: application/json" \
  -d '{
    "overheadPercentage": 0.35,
    "description": "Standard full-time employment with updated overhead rate."
  }'

Example Response

json
{
  "data": {
    "id": "clx6t7u8v9w0x1y2",
    "name": "Full-time",
    "description": "Standard full-time employment with updated overhead rate.",
    "overheadPercentage": 0.35,
    "isActive": true,
    "sortOrder": 0,
    "excludeHolidays": false,
    "createdAt": "2024-01-10T08:00:00Z",
    "updatedAt": "2026-03-11T09:45:00Z"
  }
}

Delete Work Type

DELETE /org/:orgId/work-types/:id

Deletes a work type. Work types that are actively assigned to employees or vacancies cannot be deleted until those references are removed.

Example Request

bash
curl -X DELETE "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/work-types/clx6t7u8v9w0x1y2" \
  -H "Authorization: Bearer private_..."

Example Response

json
{
  "data": {
    "id": "clx6t7u8v9w0x1y2",
    "deleted": true
  }
}

Status: 200 OK


Field Reference

FieldTypeRequiredDescription
idstringUnique identifier (read-only)
namestringYesWork type name
descriptionstringNoWork type description
overheadPercentagenumberNoOverhead multiplier for cost calculations (default: 0)
isActivebooleanNoWhether the work type is active (default: true)
sortOrderintegerNoDisplay sort order (default: 0)
excludeHolidaysbooleanNoWhether to exclude holidays from FTE calculations (default: false)
createdAtdatetimeRecord creation timestamp (read-only)
updatedAtdatetimeLast modification timestamp (read-only)

Flowstate Documentation