Creates a new cost center in the organizational hierarchy
Use this endpoint to add a new node to the cost center tree. Requires a cost center code (must be unique, cannot be “ROOT”),
description, and parent cost center ID specifying where in the hierarchy it belongs. After creation, accounts can be
assigned to this cost center. The cost center code is automatically trimmed and capitalized.
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, including the request body. |
Request Body
CostCenterCreate
| Property | Description | Type |
|---|---|---|
| costCenterCode | The cost center code Required Must be between 0 and 32 characters | string |
| costCenterInfo | The cost center info Required Must be between 0 and 32 characters | string |
| parentCostCenterId | The identifier for the parent of the cost center. The parent is the cost center directly above the current cost center on the Accounts tree Required Topmost (CostCenter) | integer (int32) |
Example Request Body
{ "costCenterCode": "string", "costCenterInfo": "string", "parentCostCenterId": 1
}
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"
}
}