---
title: "Update cost center"
method: PATCH
path: "/cost_centers/{id}"
tags: ["Cost centers"]
---

# Update cost center

`PATCH /cost_centers/{id}`

Updates a cost center. You can update the name, archive status, approver, delegate, and delegate expiry. Passing 'null' for 'approver_id', 'delegate_id', or 'delegate_expiry' does not clear those fields; they remain unchanged

## Path parameters

- `id` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `name` string — The new name for the cost center
  - `archive` boolean — Set to 'true' to archive the cost center, or 'false' to unarchive it
  - `approver_id` 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
  - `delegate_id` 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
  - `delegate_expiry` string — The expiry date for the delegate in YYYY-MM-DD format. Passing 'null' does not clear the field
  - `erp_code` string — Identifier used to associate this cost center with a corresponding record in an external ERP system

## Response `200`

Returns '200 OK' and the updated cost center resource.

- object
  - `id` string — The unique ID of the cost center
  - `name` string — The name of the cost center
  - `archived` boolean — Indicates whether the cost center is archived
  - `approver_id` integer — The ID of the approver user, or 'null' if not set
  - `approver` object — Approver user details, or 'null' if not set
    - `id` integer — The unique ID of the approver
    - `first_name` string — The approver's first name
    - `last_name` string — The approver's last name
    - `email` string — The approver's email address
  - `delegate_id` integer — The ID of the delegate user, or 'null' if not set
  - `delegate` object — Delegate user details, or 'null' if not set
    - `id` integer — The unique ID of the delegate
    - `first_name` string — The delegate's first name
    - `last_name` string — The delegate's last name
    - `email` string — The delegate's email address
  - `delegate_expiry` string — The expiry date for the delegate in YYYY-MM-DD format, or 'null' if not set
  - `users` object[] — The users assigned to this cost center
  - `count_users` integer — The number of users assigned to this cost center
  - `erp_code` string — Identifier used to associate this cost center with a corresponding record in an external ERP system

## Other responses

- `400` — Returns '400 Bad Request' when the request body is invalid.

---

[API](https://skmtc.net/perk/apis/travelperk-api-v1.md) · [All operations](https://skmtc.net/perk/apis/travelperk-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/perk/travelperk-api-v1/versions/6aa8bfa82514/schema)
