Skip to content

Cost Centres

Manage cost centres for budget tracking and financial allocation. Cost centres are used to categorise expenditure across the organization.

Cost Centre Object

FieldTypeDescription
idstringUnique identifier (CUID format). System-generated. Read-only.
namestringCost centre display name (e.g. "R&D", "Sales & Marketing").
codestring | nullShort accounting code for reporting (e.g. "CC-100").
descriptionstring | nullDescription of what this cost centre covers.
isActivebooleanWhether this cost centre is active. Inactive cost centres are hidden from selection lists but preserved for historical data.
sortOrderintegerDisplay ordering weight. Lower values appear first.
createdAtdatetime (ISO 8601)When the record was created. Read-only.
updatedAtdatetime (ISO 8601)When the record was last modified. Read-only.

Endpoints

MethodPathDescription
GET/org/:orgId/cost-centresList cost centres
GET/org/:orgId/cost-centres/:idGet cost centre
POST/org/:orgId/cost-centresCreate cost centre
PATCH/org/:orgId/cost-centres/:idUpdate cost centre
DELETE/org/:orgId/cost-centres/:idDelete cost centre

List Cost Centres

GET /org/:orgId/cost-centres

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number (1-based).
limitinteger20Records per page. Min 1, max 100.
searchstring--Free-text search by name or description.
sortBystringnameField to sort by: name, code, sortOrder, createdAt.
sortDirstringascasc or desc.

Example Request

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

Example Response

json
{
  "data": [
    {
      "id": "clx6t7u8v9w0x1y2z3a4",
      "name": "R&D",
      "code": "CC-100",
      "description": "Research and development",
      "isActive": true,
      "sortOrder": 0,
      "createdAt": "2024-01-10T08:00:00Z",
      "updatedAt": "2025-11-20T14:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 50,
    "total": 5,
    "hasNextPage": false
  }
}

Create Cost Centre

POST /org/:orgId/cost-centres

Create Request Body

FieldTypeRequiredDescription
namestringYesCost centre name.
codestring | nullNoShort accounting code.
descriptionstring | nullNoDescription.
costCategorystring | nullNoCategory label (e.g. "engineering", "sales").
colorstringNoHex colour for UI display. Default: "#6B7280".
isActivebooleanNoDefault: true.
sortOrderintegerNoDisplay ordering. Default: 0.

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}/cost-centres" \
  -H "Authorization: Bearer private_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "R&D",
    "code": "CC-100",
    "description": "Research and development"
  }'

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": "Cost centre not found.",
    "errorId": "err_clx9a8b7c6d5e4f3"
  }
}

  • Teams -- Teams can be associated with cost centres.
  • Projects -- Projects can be associated with cost centres via assignments.

Flowstate Documentation