v1

latestOpenAPI 3.1.02026-07-2420077.8 KB
Cost centers

Get cost center

Retrieves a cost center by its ID, including assigned users, approver, delegate, and company scope

get/cost_centers/{id}

Path parameters

idstring required

The unique ID of the cost center

Headers

Authorizationstring required

Your Perk API key

Response

Returns '200 OK' and the cost center resource.

idstring

The unique ID of the cost center

namestring

The name of the cost center

archivedboolean

Indicates whether the cost center is archived

approver_idinteger

The ID of the approver user, or 'null' if not set

delegate_idinteger

The ID of the delegate user, or 'null' if not set

delegate_expirystring

The expiry date for the delegate in YYYY-MM-DD format, or 'null' if not set

all_companiesboolean

If 'true', the cost center applies to all companies in the account

count_usersinteger

The number of users assigned to this cost center

erp_codestring

Identifier used to associate this cost center with a corresponding record in an external ERP system

Example response

{
  "id": "1",
  "name": "Marketing",
  "approver_id": 123,
  "approver": {
    "id": 123,
    "first_name": "Alex",
    "last_name": "Chen",
    "email": "alex.chen@company.com"
  },
  "delegate_id": 456,
  "delegate": {
    "id": 456,
    "first_name": "Jordan",
    "last_name": "Smith",
    "email": "jordan.smith@company.com"
  },
  "delegate_expiry": "2025-12-31",
  "all_companies": true,
  "companies": [
    {
      "id": 1,
      "name": "Company A"
    }
  ],
  "users": [
    {
      "id": 42,
      "first_name": "Alex",
      "last_name": "Chen",
      "email": "alex.chen@company.com"
    }
  ],
  "count_users": 1,
  "erp_code": "CC-4210"
}