Asignar horario en lote
curl --request POST \
--url https://api.filexpress.app/api/external/hr/schedule-assignments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"work_schedule_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"document_numbers": [
"01234567-8",
"98765432-1"
],
"start_date": "2026-11-01",
"end_date": null,
"close_previous": true,
"notes": "Cambio de turno"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
work_schedule_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
document_numbers: ['01234567-8', '98765432-1'],
start_date: '2026-11-01',
end_date: null,
close_previous: true,
notes: 'Cambio de turno'
})
};
fetch('https://api.filexpress.app/api/external/hr/schedule-assignments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/hr/schedule-assignments"
payload = {
"work_schedule_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"document_numbers": ["01234567-8", "98765432-1"],
"start_date": "2026-11-01",
"end_date": None,
"close_previous": True,
"notes": "Cambio de turno"
}
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/hr/schedule-assignments",
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([
'work_schedule_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'document_numbers' => [
'01234567-8',
'98765432-1'
],
'start_date' => '2026-11-01',
'end_date' => null,
'close_previous' => true,
'notes' => 'Cambio de turno'
]),
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": {
"created": 1,
"updated": 0,
"errors": [
{
"employee_id": null,
"document_number": "98765432-1",
"message": "Employee not found."
}
],
"recalculation_queued": true
}
}{
"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": "Not found."
}{
"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
}Asignar horario en lote
Asigna un horario a hasta 500 empleados (por employee_ids o document_numbers) con la misma vigencia. Idempotente por empleado y start_date. Si ninguno se asigna, responde 422.
Permiso requerido: hr.schedules.write
POST
/
hr
/
schedule-assignments
Asignar horario en lote
curl --request POST \
--url https://api.filexpress.app/api/external/hr/schedule-assignments \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"work_schedule_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"document_numbers": [
"01234567-8",
"98765432-1"
],
"start_date": "2026-11-01",
"end_date": null,
"close_previous": true,
"notes": "Cambio de turno"
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
work_schedule_id: '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
document_numbers: ['01234567-8', '98765432-1'],
start_date: '2026-11-01',
end_date: null,
close_previous: true,
notes: 'Cambio de turno'
})
};
fetch('https://api.filexpress.app/api/external/hr/schedule-assignments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.filexpress.app/api/external/hr/schedule-assignments"
payload = {
"work_schedule_id": "9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11",
"document_numbers": ["01234567-8", "98765432-1"],
"start_date": "2026-11-01",
"end_date": None,
"close_previous": True,
"notes": "Cambio de turno"
}
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/hr/schedule-assignments",
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([
'work_schedule_id' => '9d1c5a3e-4b7f-4e2a-9c1d-2f6b8a0e7c11',
'document_numbers' => [
'01234567-8',
'98765432-1'
],
'start_date' => '2026-11-01',
'end_date' => null,
'close_previous' => true,
'notes' => 'Cambio de turno'
]),
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": {
"created": 1,
"updated": 0,
"errors": [
{
"employee_id": null,
"document_number": "98765432-1",
"message": "Employee not found."
}
],
"recalculation_queued": true
}
}{
"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": "Not found."
}{
"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
API Key de la integración (Integraciones → Nueva Integración).
Body
application/json
Response
Éxito