Skip to content

List a branch's cost centres

GET
/v1/branches/{branchId}/cost-centres
curl --request GET \
--url https://api2.recruso.co.uk/v1/branches/1/cost-centres \
--header 'Authorization: <Authorization>'

Returns the active cost centres belonging to one branch. Deleted cost centres are excluded — use RestoreCostCentre to bring one back.

Cost centres are always scoped to a branch; there is no agency-wide list. A branch outside your agency or outside your accessible-branch list returns 404, and an accessible branch with no cost centres returns an empty array.

The response is not paged.

Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.

branchId
required
integer format: int32

The branchId path parameter

OK

Media typeapplication/json

The active cost centres belonging to one branch.

object
costCentres
required

The cost centres. Empty if the branch has none.

Array<object>

One cost centre in a ListCostCentres result. Carries the same fields as GetCostCentreById.

object
costCentreId

The cost centre’s identifier. Unique within the agency, not within the branch.

integer format: int16
branchId

The branch the cost centre belongs to. The same for every item in the list.

integer format: int16
costCentreName

The cost centre name. Unique among the branch’s cost centres, deleted ones included.

string
sageDepartmentId

The cost centre’s Sage department. The parent branch carries a sageDepartmentId of its own; which one a posting uses is decided by the Sage integration, not by this endpoint.

integer format: int32
nullable
nominalCode

The nominal (general-ledger) code this cost centre posts against.

integer format: int64
nullable
Example
{
"costCentres": [
{
"costCentreId": 31,
"branchId": 4,
"costCentreName": "Warehouse Operatives",
"sageDepartmentId": 21,
"nominalCode": 4001
}
]
}

Unauthorized

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Forbidden

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}