Vincular documentos
curl --request POST \
--url https://api.filexpress.app/api/external/projects/{id}/items \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "sale",
"ids": [
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'sale',
ids: ['9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11', '3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01']
})
};
fetch('https://api.filexpress.app/api/external/projects/{id}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/projects/{id}/items"
payload = {
"type": "sale",
"ids": ["9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11", "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/projects/{id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'sale',
'ids' => [
'9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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": {
"linked": 2,
"rejected_ids": [
"3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01"
],
"summary": {
"total_sales": 12000,
"total_expenses": 6500,
"total_payroll": 2100,
"total_work_orders": 400,
"total_costs": 9000,
"profit": 3000,
"margin_percent": 25,
"budget": 25000,
"budget_used_percent": 36,
"counts": {
"sales": 3,
"expenses": 8,
"payrolls": 2,
"work_orders": 1
}
}
}
}{
"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": "Project not found"
}{
"status": false,
"message": "Validation errors",
"errors": {
"type": [
"The selected type is invalid."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Vincular documentos
Vincula ventas, compras o planillas; los IDs de otro negocio vuelven en rejected_ids.
Permiso requerido: projects.write
POST
/
projects
/
{id}
/
items
Vincular documentos
curl --request POST \
--url https://api.filexpress.app/api/external/projects/{id}/items \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"type": "sale",
"ids": [
"9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: 'sale',
ids: ['9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11', '3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01']
})
};
fetch('https://api.filexpress.app/api/external/projects/{id}/items', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/projects/{id}/items"
payload = {
"type": "sale",
"ids": ["9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11", "3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01"]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.filexpress.app/api/external/projects/{id}/items",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'type' => 'sale',
'ids' => [
'9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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": {
"linked": 2,
"rejected_ids": [
"3b8e2f10-7c4d-4a9e-b1f2-5d6c7e8f9a01"
],
"summary": {
"total_sales": 12000,
"total_expenses": 6500,
"total_payroll": 2100,
"total_work_orders": 400,
"total_costs": 9000,
"profit": 3000,
"margin_percent": 25,
"budget": 25000,
"budget_used_percent": 36,
"counts": {
"sales": 3,
"expenses": 8,
"payrolls": 2,
"work_orders": 1
}
}
}
}{
"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": "Project not found"
}{
"status": false,
"message": "Validation errors",
"errors": {
"type": [
"The selected type is invalid."
]
}
}{
"status": false,
"message": "Rate limit exceeded. Please try again later.",
"rate_limit": 100
}Authorizations
API Key de la integración (Integraciones → Nueva Integración).
Path Parameters
ID del proyecto
Body
application/json