# Get all cost centres

`GET /api/configuration/cost-centres/`

- **Success:** `200 OK`
- **Products:** Operator (`FOH`)
- **Features:** Front of House Generic Access (`FOHGENERIC`)

HTML version: [Get all cost centres](https://support.gladstonesoftware.cloud/reference/configuration/get-all-cost-centres)

## Overview

Lists the cost centres the operator has configured. A cost centre is the top level of the operator's financial coding structure: departments sit beneath it, each department belonging to exactly one cost centre, and financial postings are attributed through that hierarchy. Fetch it alongside [the departments list](get-all-departments.md) if you are building a coding picker or reconciling exported transactions.

This is operator data, not a platform-defined chart of accounts. Cost centres exist only because someone at the operator created them; there is no starter set, no cross-tenant meaning, and the ids you see in a test tenant will not appear in a live one. Note the trailing slash in the path.

Results come back in no guaranteed order, and there is no filter and no paging — every cost centre is returned. Cost centres have no active/inactive flag, so a cost centre the operator has stopped using stays in the list until it is deleted, and it can only be deleted once no department references it.

When none are configured you get `200` with an empty array `[]`.

## Endpoint

`GET {base_url}/api/configuration/cost-centres/`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Sample request

```bash title="cURL"
curl -X GET '{base_url}/api/configuration/cost-centres/' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Response fields

| Field | Type | Description |
|-------|------|-------------|
| `[].id` | string | The cost centre's identifier, and the value departments reference. Maximum 15 characters, unique within your tenant. Either chosen by the operator when the cost centre was created, or auto-generated in the form `CCTR` followed by digits zero-padded to 15 characters (`CCTR00000000001`) when they left it blank — so expect a mix of house codes and generated ones in the same list, and do not infer meaning from the shape. **Tenant-specific:** hard-coding a cost centre id is a latent bug, because the same string will be absent or mean something else in another operator's tenant. |
| `[].description` | string | The cost centre's name, and what you should show in a picker. Maximum 255 characters, and required whenever a cost centre is created or updated through the API — but cost centres created by other means can come back `null`. Fall back to `id` rather than rendering an empty row. |
| `[].reference` | string | A free-text code the operator uses to tie this cost centre to their own finance system — a nominal or general-ledger code, for example. Maximum 255 characters. Optional: `null` or empty when the operator has not set one, which is common. The platform never interprets it, enforces no format and does not require it to be unique, so treat it as an opaque label to pass through to downstream accounting rather than something to parse or match on. |

## Sample response

```json title="200 OK"
[
  {
    "id": "string",
    "description": "string",
    "reference": "string"
  }
]
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `500` | Internal server error | Any unexpected server-side failure while reading the cost centres. The response is a bare status code with **no body**, so there is nothing to distinguish one cause from another. Retry with backoff. |
