Listado de registros de nómina: nóminas y salarios
accounting:payrolls.readhttps://api.holded.com/api/v2/salary-recordsDevuelve una lista paginada de registros de nómina, los más recientes primero por orden de creación (`id` del registro, descendente). El filtro por fechas aplica a la fecha de devengo de cada registro, mientras que el orden del resultado sigue el orden de creación.
Parámetros
Parámetros de consulta
stringopcionalCursor opaco para paginación. Usa el valor devuelto en la respuesta anterior para obtener la siguiente página
integeropcional= 50Número máximo de registros a devolver por página. Por defecto 50, máximo 200
stringopcionalFiltra los resultados por identificador del empleado
string<date-time>opcionalDevuelve los registros con fecha de devengo igual o posterior a esta fecha (ISO 8601)
string<date-time>opcionalDevuelve los registros con fecha de devengo igual o anterior a esta fecha (ISO 8601)
Petición
import requests
url = "https://api.holded.com/api/v2/salary-records?cursor=value&limit=50&employee_id=507f1f77bcf86cd799439012"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"employee_id": "507f1f77bcf86cd799439012",
"employee_name": "Jane Doe",
"date": "2024-03-15",
"description": "March 2024 payroll",
"tags": [
"bonus",
"q1"
],
"accounting_account_id": "507f1f77bcf86cd799439013",
"is_draft": false,
"total_payable": "1850.50",
"payment_total": "1850.50",
"payment_pending": "0.00",
"payment_status": "PENDING"
}
],
"cursor": "string",
"has_more": true
}Respuestas exitosas
200Listado de registros de nóminaapplication/jsonUnique identifier of the salary record
Identifier of the employee this salary record belongs to. Null when the employee has been deleted.
Snapshot of the employee's full name at the time the record was created
Accrual date of the salary record (ISO 8601)
Free-form description of the record
List of tags attached to the record
Accounting account where the payroll expense is posted
Whether the record is still a draft and has not been posted to the ledger
Amount payable, as a decimal string. Read-only; the algebraic sum of every line amount (`salary` + `companytax` - `tax` - `retention`), so it includes the employer social-security cost.
Total amount already paid, as a decimal string
Amount still pending payment, as a decimal string
Payment status of the record
PENDINGPAIDPARTIALLY_PAIDOpaque cursor pointing to the next page. Pass this value as the `cursor` query parameter in the next request. Null when there is no next page.
Whether more pages are available after this one
Respuestas de error
400Solicitud incorrectaapplication/json401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json429Límite de solicitudes excedidoapplication/json