Retrieves a single cost center by its unique identifier
Use this endpoint to get full details for a specific cost center when you already know the costCenterId.
Returns the cost center’s code, description, parent, and hierarchy context.
If you only know the code or name, use the filtering support on GET /costcenter instead.
Request Headers
| Header | Value | Required | Description |
|---|---|---|---|
| ECI-ApiKey | string | Yes | Your API key. See Authentication. |
| Content-Type | application/json | Yes | All requests must specify JSON content type. |
Path Parameters
| Name | Description | Type | Required |
|---|---|---|---|
| costCenterId | The unique numeric identifier of the cost center to retrieve | integer (int32) | Required |
Responses
200
OK
The request succeeded and the response body contains the requested data.
Response Body Parameters
CostCenterResponse
| Property | Description | Type | ||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| accounts | An array of child accounts | CostCenterAccountChild[] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
CostCenterAccountChild properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| costCenterCode | The cost center code | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| costCenterId | The cost center identifier | integer (int32) | ||||||||||||||||||||||||||||||||||||||||||||||||
| costCenterInfo | The cost center info | string | ||||||||||||||||||||||||||||||||||||||||||||||||
| costCenters | An array of child cost centers | CostCenterChild[] | ||||||||||||||||||||||||||||||||||||||||||||||||
|
CostCenterChild properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
| parent | CostCenterChild | |||||||||||||||||||||||||||||||||||||||||||||||||
|
CostCenterChild properties
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Example Response
{ "accounts": [
{ "accountCode": "string", "accountId": 1, "accountInfo": "string", "accountType": { "accountTypeCode": "string", "accountTypeId": 1, "accountTypeInfo": "string"
}, "active": false, "hasCalculatedMeter": false, "hasSplitChildMeter": false, "hasSplitParentMeter": false, "hasSubAccount": false, "isSubAccount": false
}
], "costCenterCode": "string", "costCenterId": 1, "costCenterInfo": "string", "costCenters": [
{ "costCenterCode": "string", "costCenterId": 1, "costCenterInfo": "string"
}
], "parent": { "costCenterCode": "string", "costCenterId": 1, "costCenterInfo": "string"
}
}
404
Not Found
The requested resource was not found. Verify the ID or path is correct.