Skip to content

List a site's cost centres

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

Returns every cost centre linked to one of your own agency’s sites.

This list is not paged and takes no filters — a site’s cost centre links come back in full. Each entry carries the link’s own id, which is what RemoveSiteCostCentre takes, not the cost centre id.

The list carries ids only. Read the cost centres themselves through the branch’s cost centre endpoints for their names and details.

The site must belong to the client named in the route, otherwise 404.

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

clientId
required
integer format: int32

The clientId path parameter

siteId
required
integer format: int32

The siteId path parameter

OK

Media typeapplication/json

Every cost centre linked to the site. Not paged.

object
costCenters

The cost centres linked to this site, as link records.

Array<object>

One cost centre linked to the site.

object
siteCostCentreId

The link’s own identifier. This is what RemoveSiteCostCentre takes, not the cost centre id.

integer format: int32
siteId

The site the cost centre is linked to.

integer format: int32
costCentreId

The cost centre being linked. Must belong to the same branch as the site.

integer format: int16
Example
{
"costCenters": [
{
"siteCostCentreId": 631,
"siteId": 512,
"costCentreId": 19
}
]
}

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"
}