Delete a branch
DELETE
/v1/branches/{id}
const url = 'https://api2.recruso.co.uk/v1/branches/1';const options = { method: 'DELETE', headers: {Authorization: '<Authorization>', 'Content-Type': '*/*'}, body: '{ "id": 1 }'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api2.recruso.co.uk/v1/branches/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: */*' \ --data '{ "id": 1 }'Soft-deletes a branch. The record is retained so historical data that references it stays intact; the branch simply stops appearing in ListBranches and GetBranchById.
There is no restore endpoint for branches, and the name stays taken — creating a branch with the same name afterwards is rejected. Cost centres under the branch are not deleted with it.
A branch outside your agency, already deleted, or outside your accessible-branch list returns 404. Deleting is idempotent only in the sense that the second call returns 404, not 204.
Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer format: int32
The id path parameter
Request Bodyrequired
Section titled “Request Bodyrequired”object
id
integer format: int16
object
id
integer format: int16
Examplegenerated
{ "id": 1}Responses
Section titled “Responses”No Content
Unauthorized
Media typeapplication/problem+json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
Media typeapplication/problem+json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
Media typeapplication/problem+json
object
type
string
title
string
status
integer format: int32
detail
string
instance
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
