Documentation Index
Fetch the complete documentation index at: https://docs.tesouro.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Cost centers allow you to categorize expenses and receipts for better tracking and reporting.
Create a cost center
To manually create a new cost center, call POST /cost-centers:
curl -X POST 'https://api.sandbox.tesouro.com/v1/cost-centers' \
-H 'accept: application/json' \
-H 'X-Finops-Version: 2025-06-23' \
-H 'X-Organization-Id: ORGANIZATION_ID' \
-d '{
"name": "IT Department",
"description": "Expenses for software, hardware, and infrastructure"
}'
The successful 201 response contains the information of the created cost center:
{
"id": "5c7f8b12-4d6e-4f2a-9d8a-3f7a6a1c9e42",
"created_at": "2025-09-10T14:25:36Z",
"updated_at": "2025-09-10T14:25:36Z",
"name": "IT Department",
"description": "Expenses for software, hardware, and infrastructure",
"is_external": false
}
The field is_external = false indicates that the cost center was manually created in Tesouro and can be updated or deleted.
List all cost centers
To get information about all cost centers associated with an organization, call GET /cost-centers:
curl -X GET 'https://api.sandbox.tesouro.com/v1/cost-centers' \
-H 'accept: application/json' \
-H 'X-Finops-Version: 2025-06-23' \
-H 'X-Organization-Id: ORGANIZATION_ID'
{
"data": [
{
"id": "9f6e9c20-8a5f-4b5d-9e11-3d42b9a14f3c",
"created_at": "2025-09-10T12:34:56Z",
"updated_at": "2025-09-10T12:34:56Z",
"name": "Marketing",
"description": "Expenses related to marketing campaigns",
"is_external": false
},
{
"id": "2e1a4b50-91d6-4a3d-bc3c-91e1b2c3a5d7",
"created_at": "2025-08-01T09:15:00Z",
"updated_at": "2025-08-15T10:00:00Z",
"name": "R&D",
"description": "Research and development costs",
"is_external": true
}
],
"next_pagination_token": null,
"prev_pagination_token": null
}
Retrieve a cost center
To get information about a specific cost center, call GET /cost-centers/{cost_center_id}.
Edit a cost center
To edit an existing cost center, call PATCH /cost-centers/{cost_center_id}:
curl -X PATCH 'https://api.sandbox.tesouro.com/v1/cost-centers/{cost_center_id}' \
-H 'accept: application/json' \
-H 'X-Finops-Version: 2025-06-23' \
-H 'X-Organization-Id: ORGANIZATION_ID' \
-d '{
"description": "Updated description: operational costs for the sales team"
}'
Delete a cost center
To delete a specific cost center, call DELETE /cost-centers/{cost_center_id}.