Skip to content

Delete a cost centre

DELETE
/v1/branches/{branchId}/cost-centres/{id}
curl --request DELETE \
--url https://api2.recruso.co.uk/v1/branches/1/cost-centres/1 \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: */*' \
--data '{ "branchId": 4, "id": 31 }'

Soft-deletes a cost centre. The record is retained so historical data that references it stays intact; it stops appearing in ListCostCentres and GetCostCentreById.

The name stays reserved within the branch, so creating a cost centre with the same name afterwards returns 409 rather than succeeding. RestoreCostCentre reverses this.

A cost centre outside your agency, already deleted, under a different branch, or under a branch you cannot access returns 404.

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

id
required
integer format: int32

The id path parameter

Identifies the cost centre to delete. Both values are bound from the route; the endpoint takes no request body.

object
branchId

The branch the cost centre belongs to.

integer format: int16
Example
4
id

The cost centre to soft-delete.

integer format: int16
Example
31

No Content

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