GET /api/v3/costcenter

Retrieves all the cost centers

GetCostCentersV3 Permissions: CostCenters (View)
Paginated endpoint — This API returns paginated results. Use the pageNumber and pageSize query parameters to control which page of results is returned. The response includes pagination metadata in the response headers. See the Pagination guide for details.

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.

Query Parameters

Name Description Type Required
filter string (string) Optional
pageSize The number of elements to return in a page integer (int32) Optional
pageNumber The current page number integer (int32) Optional

Filters

Filter Description Type Operators
costCenterCode Cost Center Code String equals not equals one of like not like not one of
costCenterId Integer equals not equals less than between one of greater than less than equal greater than equal not one of
costCenterInfo Cost Center Name String equals not equals one of like not like not one of
parentId Integer equals not equals less than between one of greater than less than equal greater than equal not one of

Response Headers

This endpoint returns pagination metadata in the response headers.

Header Type Description
PageNumber integer The current page number (1-based).
PageSize integer The maximum number of items per page.
TotalNumberOfRecords integer The total number of records matching the query across all pages.
TotalPages integer The total number of pages. Increment pageNumber until it equals this value to retrieve all results.

See the Pagination guide for iteration examples and best practices.

Responses

200 OK The request succeeded and the response body contains the requested data.

Response Body Parameters

Array of:

CostCenterResponse
Property Description Type
accounts An array of child accounts CostCenterAccountChild[]
CostCenterAccountChild properties
Property Description Type
accountCode The account code string
accountId The account identifier integer (int32)
accountInfo The account info string
accountType AccountTypeChild
AccountTypeChild properties
Property Description Type
accountTypeCode The account type code string
accountTypeId The account type identifier integer (int32)
accountTypeInfo The account type info string
active Whether the account is active or not boolean
hasCalculatedMeter Indicates whether the Account has a child calculated meter boolean
hasSplitChildMeter Indicates whether the Account has a child split meter boolean
hasSplitParentMeter Indicates whether the Account is a recipient of a split boolean
hasSubAccount Indicates whether the Account has a sub-account boolean
isSubAccount Indicates whether the Account is a sub-account boolean
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
Property Description Type
costCenterCode The cost center code string
costCenterId The cost center identifier integer (int32)
costCenterInfo The cost center info string
parent CostCenterChild
CostCenterChild properties
Property Description Type
costCenterCode The cost center code string
costCenterId The cost center identifier integer (int32)
costCenterInfo The cost center info string
Example Response application/json
[
  {    "accounts": [
      {      "accountCode": "string",      "accountId": 1,      "accountInfo": "string",      "accountType": {},      "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"
    }
  }
]