Abrir o ver un registro de nómina
accounting:payrolls.readhttps://api.holded.com/api/v2/salary-records/{salaryRecordId}Recupera todos los detalles de un registro de nómina específico, incluyendo todas las líneas de devengo y deducción y el estado de pago actual.
Parámetros
Parámetros de ruta
stringobligatorioID del registro de nómina (ObjectId hexadecimal de 24 caracteres)
Petición
import requests
url = "https://api.holded.com/api/v2/salary-records/507f1f77bcf86cd799439011"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respuestas
Respuesta
{
"id": "507f1f77bcf86cd799439011",
"employee_id": "507f1f77bcf86cd799439012",
"employee_name": "Jane Doe",
"is_ex_employee": false,
"date": "2024-03-15",
"description": "March 2024 payroll",
"tags": [
"bonus",
"q1"
],
"accounting_account_id": "507f1f77bcf86cd799439013",
"is_draft": false,
"payroll_type": "salary_record",
"lines": [
{
"type": "salary",
"amount": "1500.00",
"accounting_account_id": "507f1f77bcf86cd799439014",
"tax_key": "s_iva_21",
"description": "Base salary"
}
],
"total_payable": "1850.50",
"payment_total": "1850.50",
"payment_pending": "0.00",
"payment_status": "PENDING"
}Respuestas exitosas
200Registro de nómina encontradoapplication/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
Whether the employee has since left the company
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
Type of payroll document. Salary records always return "salary_record".
payslipsalary_recordBreakdown of the salary record into earning and deduction lines
Classification of the line (earning or deduction)
salarytaxcompanytaxretentionextraresultadvancewage_garnishmentpago_delegado_itsalary_in_kindsalary_in_kind_retentionsalary_in_kind_incomeLine amount as a decimal string. Deductions (`tax`, `retention`) are negative (e.g. "-150.00"); `salary` and `companytax` are positive. Writes use the same signed convention.
Accounting account for this line
Optional tax key applied to this line
Optional free-form line description
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_PAIDRespuestas de error
401API key inválida o no proporcionadaapplication/json403Permisos insuficientesapplication/json404Registro de nómina no encontradoapplication/json429Límite de solicitudes excedidoapplication/json