Cost centers

Create cost center

Creates a cost center with the specified name. You can optionally set an approver, delegate, delegate expiry date, additional approvers (owner_ids), and cost object type (type) when that feature is enabled for your organization.

post/cost_centers

Request

  • Base URL
    https://api.perk.com
  • URL
    https://api.perk.com/cost_centers
  • Auth
    none declared. Required headers: Authorization

Headers

Authorizationstring required

Your Perk API key

Request body

namestring required

The name of the cost center

typestring nullable

Available only when cost object types are enabled for your organization on request, is ignored when the feature is not enabled. Cost object type name to assign on create. Non-empty string (max 256 characters). Omit or null leaves the type unset. If a type with that name already exists (case-insensitive), it is assigned; otherwise it is created. Cannot be set on Yokoy-sourced cost centers.

approver_idinteger

The ID of the user to set as approver. The user must belong to one of the account's companies

delegate_idinteger

The ID of the user to set as delegate. The delegate must belong to one of the account's companies

delegate_expirystring

The expiry date for the delegate in YYYY-MM-DD format

erp_codestring

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

company_idsinteger[]

IDs of companies this cost center is scoped to. Must be provided together with 'all_companies'. When 'all_companies' is true, company scope is set to all companies in the account.

all_companiesboolean

Whether the cost center applies to all companies in the account. Must be provided together with 'company_ids'. When true, 'company_ids' is ignored and the cost center is scoped to all companies in the account. Defaults to true when neither field is provided.

owner_idsinteger[]

IDs of additional travel approvers to set on create. Users must belong to an allowed company for the cost center and must not duplicate approver_id

Example request

{
  "name": "Marketing",
  "type": "Department",
  "approver_id": 123,
  "delegate_id": 456,
  "delegate_expiry": "2025-12-31",
  "erp_code": "CC-4210",
  "company_ids": [
    11454,
    22187
  ],
  "owner_ids": [
    789,
    790
  ]
}

Response

Returns '200 OK' and the newly created cost center resource.

idstring

The unique ID of the cost center

namestring

The name of the cost center

typestring nullable

Cost object type name, or null if unset. Available only when cost object types are enabled for your organization on request. Omitted from the response when the feature is not enabled.

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

usersobject[]

The users assigned to this cost center

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

all_companiesboolean

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

companiesinteger[]

The IDs of companies assigned to this cost center

owner_idsinteger[]

IDs of additional travel approvers

Example response

{
  "id": "4",
  "name": "Marketing",
  "type": "Department",
  "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",
  "erp_code": "CC-4210",
  "companies": [
    1,
    2
  ],
  "owner_ids": [
    789,
    790
  ],
  "owners": [
    {
      "id": 789,
      "first_name": "Sam",
      "last_name": "Patel",
      "email": "sam.patel@company.com"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.