Skip to content

Locations

Manage geographic locations used for employee, contractor, and vacancy assignments. Locations define where people work and carry defaults for currency and cost calculations.

Location Object

FieldTypeDescription
idstringUnique identifier (CUID format). System-generated. Read-only.
namestringLocation name (e.g. "London, UK", "San Francisco, US").
countryCodestring | null2-character ISO 3166-1 country code (e.g. "GB", "US").
regionstring | nullGeographic region (e.g. "Europe", "North America").
timezonestring | nullIANA timezone identifier (e.g. "Europe/London", "America/Los_Angeles").
defaultCurrencyCodestring | nullISO 4217 currency code (e.g. "GBP"). Employees assigned to this location inherit this currency unless overridden.
costMultipliernumber | nullLocation-based cost adjustment factor (e.g. 1.2 = 20% above baseline). Used in cost forecasting.
isActivebooleanWhether this location is active.
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/locationsList locations
GET/org/:orgId/locations/:idGet location
POST/org/:orgId/locationsCreate location
PATCH/org/:orgId/locations/:idUpdate location
DELETE/org/:orgId/locations/:idDelete location

List Locations

GET /org/:orgId/locations

Query Parameters

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

Example Request

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

Example Response

json
{
  "data": [
    {
      "id": "clx6t7u8v9w0x1y2z3a4",
      "name": "London, UK",
      "countryCode": "GB",
      "region": "Europe",
      "timezone": "Europe/London",
      "defaultCurrencyCode": "GBP",
      "costMultiplier": 1.2,
      "isActive": true,
      "sortOrder": 0,
      "createdAt": "2024-01-10T08:00:00Z",
      "updatedAt": "2025-11-20T14:00:00Z"
    },
    {
      "id": "clx1e2n3g4r5o0t6u7v8",
      "name": "San Francisco, US",
      "countryCode": "US",
      "region": "North America",
      "timezone": "America/Los_Angeles",
      "defaultCurrencyCode": "USD",
      "costMultiplier": 1.5,
      "isActive": true,
      "sortOrder": 1,
      "createdAt": "2024-01-05T08:00:00Z",
      "updatedAt": "2025-09-01T10:00:00Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 20,
    "total": 12,
    "hasNextPage": false
  }
}

Create Location

POST /org/:orgId/locations

Create Request Body

FieldTypeRequiredDescription
namestringYesLocation name.
countryCodestring | nullNo2-character ISO 3166-1 country code.
regionstring | nullNoGeographic region.
timezonestring | nullNoIANA timezone identifier.
defaultCurrencyCodestring | nullNoISO 4217 currency code (3 characters).
costMultipliernumberNoCost adjustment factor. Must be positive.
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}/locations" \
  -H "Authorization: Bearer private_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Berlin, DE",
    "countryCode": "DE",
    "region": "Europe",
    "timezone": "Europe/Berlin",
    "defaultCurrencyCode": "EUR",
    "costMultiplier": 1.1
  }'

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

  • Employees -- Employees reference locations via geographyId.
  • Contractors -- Contractors reference locations via geographyId.
  • Vacancies -- Vacancies reference locations via geographyId.
  • Exchange Rates -- Convert between location currencies.

Flowstate Documentation