Get cost centre details
const url = 'https://api2.recruso.co.uk/v1/branches/1/cost-centres/1';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api2.recruso.co.uk/v1/branches/1/cost-centres/1 \ --header 'Authorization: <Authorization>'Returns a single cost centre with its Sage department and nominal code.
Both ids must line up: a cost centre that exists but belongs to a different branch returns 404. A deleted cost centre, one outside your agency, or one under a branch you cannot access also returns 404 rather than 403.
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”The branchId path parameter
The id path parameter
Responses
Section titled “Responses”OK
A single cost centre belonging to one branch.
object
The cost centre’s identifier. Unique within the agency, not within the branch.
The branch the cost centre belongs to. A cost centre cannot be moved between branches.
The cost centre name. Unique among the branch’s cost centres, deleted ones included.
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.
The nominal (general-ledger) code this cost centre posts against.
Example
{ "costCentreId": 31, "branchId": 4, "costCentreName": "Warehouse Operatives", "sageDepartmentId": 21, "nominalCode": 4001}Unauthorized
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
