curl --request GET \
--url https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": true,
"data": {
"title": "Estado de resultados por centro de costo",
"date_from": "01/10/2026",
"date_to": "31/10/2026",
"detail_level": 3,
"columns": [
{
"key": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"code": "01",
"name": "Ventas"
},
{
"key": "none",
"id": null,
"code": null,
"name": "Sin centro"
},
{
"key": "total",
"id": null,
"code": null,
"name": "Total"
}
],
"income": [
{
"code": "5",
"name": "Ingresos",
"level": 1,
"amounts": {
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11": 100,
"none": 20,
"total": 120
}
}
],
"costs": [],
"expenses": [
{
"code": "6",
"name": "Gastos",
"level": 1,
"amounts": {
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11": 40,
"none": 0,
"total": 40
}
}
],
"totals": {
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11": {
"income": 100,
"costs": 0,
"expenses": 40,
"gross_profit": 100,
"net_income": 60
},
"none": {
"income": 20,
"costs": 0,
"expenses": 0,
"gross_profit": 20,
"net_income": 20
},
"total": {
"income": 120,
"costs": 0,
"expenses": 40,
"gross_profit": 120,
"net_income": 80
}
}
}
}{
"status": false,
"message": "Invalid API Key."
}{
"status": false,
"message": "This integration does not have the 'hr.employees' permission.",
"required_scope": "hr.employees"
}{
"status": false,
"message": "Cost center not found for this integration."
}{
"status": false,
"message": "Validation errors",
"errors": {
"start_date": [
"The start date field is required."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Income statement by cost center
One column per center (each sums its subtree) plus none (No center), other (Other centers, if there are movements from centers not included), and total, which matches the Income statement. Without cost_center_ids or parent_cost_center_id, the columns are the root centers.
Required permission: accounting.reports With format=pdf or format=excel it downloads the file (the by-center statement in PDF is landscape, in pages of 8 centers + Total).
curl --request GET \
--url https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/v1/accounting/reports/income-statement-by-cost-center",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"status": true,
"data": {
"title": "Estado de resultados por centro de costo",
"date_from": "01/10/2026",
"date_to": "31/10/2026",
"detail_level": 3,
"columns": [
{
"key": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"code": "01",
"name": "Ventas"
},
{
"key": "none",
"id": null,
"code": null,
"name": "Sin centro"
},
{
"key": "total",
"id": null,
"code": null,
"name": "Total"
}
],
"income": [
{
"code": "5",
"name": "Ingresos",
"level": 1,
"amounts": {
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11": 100,
"none": 20,
"total": 120
}
}
],
"costs": [],
"expenses": [
{
"code": "6",
"name": "Gastos",
"level": 1,
"amounts": {
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11": 40,
"none": 0,
"total": 40
}
}
],
"totals": {
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11": {
"income": 100,
"costs": 0,
"expenses": 40,
"gross_profit": 100,
"net_income": 60
},
"none": {
"income": 20,
"costs": 0,
"expenses": 0,
"gross_profit": 20,
"net_income": 20
},
"total": {
"income": 120,
"costs": 0,
"expenses": 40,
"gross_profit": 120,
"net_income": 80
}
}
}
}{
"status": false,
"message": "Invalid API Key."
}{
"status": false,
"message": "This integration does not have the 'hr.employees' permission.",
"required_scope": "hr.employees"
}{
"status": false,
"message": "Cost center not found for this integration."
}{
"status": false,
"message": "Validation errors",
"errors": {
"start_date": [
"The start date field is required."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Authorizations
Integration API Key (Integrations → New Integration).
Query Parameters
Start date (YYYY-MM-DD).
End date (YYYY-MM-DD), greater than or equal to start_date.
Centers to use as columns (repeatable).
Without cost_center_ids: the columns are the direct sub-centers of this center.
Optional: limits to one branch.
Level of detail (1–10).
json (default), pdf (application/pdf), or excel (.xlsx). With pdf/excel the response is the file.
json, pdf, excel