Skip to content

Locations

Manage geographic locations used for employee, contractor, and vacancy assignments.

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

Returns a paginated list of locations in the organization.

Query Parameters

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

Example Request

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

Example Response

json
{
  "data": [
    {
      "id": "clx6t7u8v9w0x1y2",
      "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": "clx1e2n3g4r5o0t6",
      "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": 50,
    "total": 12,
    "hasNextPage": false
  }
}

Get Location

GET /org/:orgId/locations/:id

Returns a single location by ID.

Example Request

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

Example Response

json
{
  "data": {
    "id": "clx6t7u8v9w0x1y2",
    "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"
  }
}

Create Location

POST /org/:orgId/locations

Creates a new location.

Request Body

json
{
  "name": "London, UK",
  "countryCode": "GB",
  "region": "Europe",
  "timezone": "Europe/London",
  "defaultCurrencyCode": "GBP",
  "costMultiplier": 1.2
}

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": "London, UK",
    "countryCode": "GB",
    "region": "Europe",
    "timezone": "Europe/London",
    "defaultCurrencyCode": "GBP",
    "costMultiplier": 1.2
  }'

Example Response

json
{
  "data": {
    "id": "clx3d4e5f6g7h8i9",
    "name": "London, UK",
    "countryCode": "GB",
    "region": "Europe",
    "timezone": "Europe/London",
    "defaultCurrencyCode": "GBP",
    "costMultiplier": 1.2,
    "isActive": true,
    "sortOrder": 0,
    "createdAt": "2026-03-11T09:40:00Z",
    "updatedAt": "2026-03-11T09:40:00Z"
  }
}

Status: 201 Created


Update Location

PATCH /org/:orgId/locations/:id

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

Example Request

bash
curl -X PATCH "https://{tenant}.flowstate.inc/api/v1/org/{orgId}/locations/clx6t7u8v9w0x1y2" \
  -H "Authorization: Bearer private_..." \
  -H "Content-Type: application/json" \
  -d '{
    "costMultiplier": 1.25,
    "name": "London (City), UK"
  }'

Example Response

json
{
  "data": {
    "id": "clx6t7u8v9w0x1y2",
    "name": "London (City), UK",
    "countryCode": "GB",
    "region": "Europe",
    "timezone": "Europe/London",
    "defaultCurrencyCode": "GBP",
    "costMultiplier": 1.25,
    "isActive": true,
    "sortOrder": 0,
    "createdAt": "2024-01-10T08:00:00Z",
    "updatedAt": "2026-03-11T09:45:00Z"
  }
}

Delete Location

DELETE /org/:orgId/locations/:id

Deletes a location. Locations that are actively assigned to employees, contractors, or vacancies cannot be deleted until those references are removed.

Example Request

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

Example Response

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

Status: 200 OK


Field Reference

FieldTypeRequiredDescription
idstringUnique identifier (read-only)
namestringYesLocation name (e.g., "London, UK")
countryCodestringNo2-character ISO 3166-1 country code (e.g., "GB")
regionstringNoGeographic region (e.g., "Europe", "North America")
timezonestringNoIANA timezone identifier (e.g., "Europe/London")
defaultCurrencyCodestringNo3-character ISO 4217 currency code (e.g., "GBP")
costMultipliernumberNoLocation-based cost adjustment factor (default: 1.0)
isActivebooleanNoWhether the location is active (default: true)
sortOrderintegerNoDisplay sort order (default: 0)
createdAtdatetimeRecord creation timestamp (read-only)
updatedAtdatetimeLast modification timestamp (read-only)

Flowstate Documentation