Update cost center

Updates a cost center. You can update the name, archive status, approver, delegate, delegate expiry, additional approvers (owner_ids), usage, approval limits, parent cost center, technical custom field values (custom_information), and cost object type (type) when that feature is enabled for your organization. Passing null for 'approver_id', 'delegate_id', 'delegate_expiry', 'owner_ids', 'usage' or 'type' does not clear those fields; they remain unchanged. For owner_ids, pass an empty array to clear. For approval_limit, auto_approval_limit and parent_id, omitting the field leaves it unchanged, while passing null or "" clears it. Writes take a flat object plus company_id; responses return custom_information as a list grouped per company, [{company_id, fields}], where boolean values are returned as the strings "true"/"false".

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The unique ID of the cost center

Body Params
string

The new name for the cost center

string | null

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

boolean

Set to 'true' to archive the cost center, or 'false' to unarchive it

integer

The ID of the user to set as approver. The user must belong to one of the cost center's companies. Passing 'null' does not clear the field

integer

The ID of the user to set as delegate. The delegate must belong to one of the cost center's companies. Passing 'null' does not clear the field

string

The expiry date for the delegate in YYYY-MM-DD format. Passing 'null' does not clear the field

string

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

company_ids
array of integers

IDs of companies this cost center is scoped to. Must be provided together with 'all_companies'. At least one company required when 'all_companies' is false. Ignored when 'all_companies' is true (company scope is set to all companies in the account). Omit both fields to leave unchanged.

company_ids
boolean

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. Omit both fields to leave unchanged.

owner_ids
array of integers

IDs of additional travel approvers. Omit or pass null to leave unchanged; pass an empty array to clear; pass a non-empty list to replace. Users must belong to an allowed company for the cost center and must not duplicate approver_id

owner_ids
usage
array of strings | null

Where the cost center can be used: any of 'travel', 'expenses', 'invoices'. Omit or null to leave unchanged.

usage
Allowed:
number | null
≥ 0

Approval limit for expenses and invoices. Only valid when usage includes 'expenses' or 'invoices'. Omit to leave unchanged; pass null or "" to clear.

number | null
≥ 0

Amount up to which expenses and invoices are approved automatically. Only valid when usage includes 'expenses' or 'invoices'. Omit to leave unchanged; pass null or "" to clear.

integer | null

The ID of the parent cost center. Omit to leave unchanged; pass null or "" to clear. Returns 400 for travel-only accounts unless the cost center hierarchies feature is enabled, including when null.

custom_information
object | null

Technical custom field values keyed by field name. Only valid when usage includes 'expenses' or 'invoices'. Only fields that already exist for the company are accepted. Booleans are written as true/false. A null or "" value clears that field's value; omitted keys are kept. Writes take a flat object plus company_id; responses return custom_information as a list grouped per company, [{company_id, fields}], where boolean values are returned as the strings "true"/"false".

integer | null

The company the custom_information values apply to. Required with custom_information when the cost center is scoped to several companies; must be one of the cost center's companies.

Headers
string
required

Your Perk API key

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json