Skip to content

Link a cost centre to a site contact

POST
/v1/clients/{clientId}/sites/{siteId}/contact-persons/{contactPersonId}/cost-centres
curl --request POST \
--url https://api2.recruso.co.uk/v1/clients/1/sites/1/contact-persons/1/cost-centres \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "costCentreId": 19 }'

Links one of your agency’s cost centres to a contact at a site, narrowing which cost centres that person’s work is booked against. This is the contact-level counterpart to AddSiteCostCentre.

The cost centre must belong to the same branch as the site, exactly as for a site link: a cross-branch link returns 400, and a site with no branch assigned cannot be linked at all.

A cost centre already linked to the contact returns 400 rather than creating a duplicate, and a cost centre that does not exist returns 400.

The client, site and contact in the route must line up — the site must belong to the client and the contact to the site — and any mismatch returns 404 rather than 403.

On success the Location header points at ListSiteContactCostCentres, since a single link has no endpoint of its own.

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

contactPersonId
required
integer format: int32

The contactPersonId path parameter

Media typeapplication/json

The cost centre to link to the site contact.

object
costCentreId

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

integer format: int16
Example
19

Created

Media typeapplication/json

A newly created site contact cost centre link.

object
contactPersonCostCentreId

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

integer format: int32
contactPersonId

The site contact 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
{
"contactPersonCostCentreId": 204,
"contactPersonId": 88,
"costCentreId": 19
}

Bad Request

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

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