Skip to content

List cost centers

Request

This endpoint lists cost centers of a company.

Security
Bearer
Path
companyIdstring, (uuid)required

Identifier for company.

Example:4974a66b-7493-4f41-908c-58ba81093947
Bodyapplication/jsonrequired
searchTextstring

Search string entered by the user

Example:"Credit"
paginationParamsobject(OffsetBasedPaginationRequestParams)required

Pagination information.

filtersArray of objects(ListCostCentersFilter)

List of filters. Cost centers matching with any filter would be returned.

curl -i -X POST \
  https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/4974a66b-7493-4f41-908c-58ba81093947/cost-centers/list \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "searchText": "Credit",
    "paginationParams": {
      "offset": 0,
      "limit": 100
    },
    "filters": [
      {
        "externalIds": [
          "external-id"
        ],
        "costCenterIds": [
          "731ccbca-0415-6fe1-d235-c324dfbe7423"
        ]
      }
    ]
  }'

Responses

OK

Bodyapplication/json
paginationParamsobject(PaginationResponseParams)required

Pagination information.

costCentersArray of objects(CostCenterInfo)

List of cost centers containing id and name.

Response
{ "paginationParams": { "totalNumResults": 0 }, "costCenters": [ { … } ] }