Update a Cost Center
Endpoint
PUT https://api.verifik.co/v2/cost-centers/{id}
Updates one cost center. Send only the fields you want to change. Requests already stamped keep the cost center they had.
headers
| Name | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer <token> |
path parameters
id
Type: string
Required: Yes
The cost center id.
body parameters
name
Type: string
Required: No
Display name, up to 120 characters.
code
Type: string
Required: No
New header value. Letters, numbers, ., -, and _, up to 60 characters. Unique per account.
country
Type: string
Required: No
ISO-2 country code.
active
Type: boolean
Required: No
Set true to reactivate a cost center, or false to stop assigning it to new requests.
Request Example
- cURL
- Node.js
- Python
curl -X PUT "https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe" \
-H "Authorization: Bearer $VERIFIK_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Spain operations","active":true}'
const axios = require("axios");
const config = {
method: "put",
url: "https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
data: {
name: "Spain operations",
active: true
}
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import os
import requests
response = requests.put(
"https://api.verifik.co/v2/cost-centers/6acfbdda92451bac5d0a7ebe",
headers={
"Authorization": f"Bearer {os.environ['VERIFIK_TOKEN']}",
"Content-Type": "application/json",
},
json={"name": "Spain operations", "active": True},
)
print(response.json())
Response Example
- 200 OK
{
"data": {
"_id": "6acfbdda92451bac5d0a7ebe",
"client": "69c2b824295cd7d276e478ad",
"name": "Spain operations",
"code": "SPAIN-OPS",
"country": "ES",
"active": true,
"createdAt": "2026-10-14T17:37:30.469Z",
"updatedAt": "2026-10-14T18:02:11.120Z"
}
}
data is the updated cost center object.
Error Responses
Unknown id:
{
"message": "cost_center_not_found",
"code": "NotFound"
}
A code that another cost center on the account already uses:
{
"message": "cost_center_code_taken",
"code": "Conflict"
}