Llistar nòmines
accounting:payrolls.readhttps://api.holded.com/api/v2/payslipsRetorna les nòmines ordenades per creació, les més recents primer. La resposta es pagina per cursor: inclou un valor `cursor` i un booleà `has_more`. Passa el `cursor` a la petició següent per obtenir la pàgina següent. Una nòmina és el rebut de salari que calcula el motor de nòmines de Holded per a un període de liquidació, amb el seu propi desglossament de cotitzacions i IRPF. NO és el mateix que un registre salarial, que és l'apunt comptable introduït a mà i que se serveix a `/api/v2/salary-records`. Aquest endpoint mai no retorna registres salarials, i `/api/v2/salary-records` mai no retorna nòmines: tria l'endpoint que correspongui al document que l'usuari ha anomenat. Les nòmines només existeixen en comptes que generen nòmina amb la gemma de Recursos Humans; un compte sense aquesta gemma no en pot crear de noves, però aquest endpoint continua retornant les que ja té. Per tant, una llista buida significa o que no hi ha nòmines en el rang o que el compte mai no ha fet servir nòmines. El filtre `start_date` / `end_date` s'aplica a la data de meritació, no a la data de creació ni al període de liquidació.
Paràmetres
Paràmetres de consulta
stringopcionalCursor de paginació retornat a la resposta anterior. Omet-lo per començar per la primera pàgina
integeropcional= 50Nombre màxim de nòmines a retornar per pàgina. Per defecte 50, màxim 200
stringopcionalFiltra per empleat. Accepta el nom de l'empleat, que es resol al seu identificador al servidor
string<date-time>opcionalRetorna les nòmines amb data de meritació igual o posterior a aquesta data (ISO 8601)
string<date-time>opcionalRetorna les nòmines amb data de meritació igual o anterior a aquesta data (ISO 8601)
stringopcionalFiltra per tipus de nòmina
"nomina_ordinaria""gratificacion_no_cuantificable""finiquito""atrasos"booleanopcionalFiltra per estat d'esborrany: `true` retorna només les no aprovades, `false` només les aprovades. Omet-lo per retornar totes dues
Petició
import requests
url = "https://api.holded.com/api/v2/payslips?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())Respostes
Resposta
{
"items": [
{
"id": "507f1f77bcf86cd799439011",
"employee_id": "507f1f77bcf86cd799439012",
"employee_name": "Jane Doe",
"payslip_kind": "nomina_ordinaria",
"date": "2024-03-31",
"period_start": "2024-03-01",
"period_end": "2024-03-31",
"total_days": 30,
"description": "March 2024",
"tags": [
"office-madrid"
],
"accounting_account_id": "507f1f77bcf86cd799439013",
"is_draft": false,
"net_salary": "1663.00",
"total_company_cost": "2640.00",
"payment_total": "1663.00",
"payment_pending": "0.00",
"payment_status": "PENDING"
}
],
"cursor": "string",
"has_more": true
}Respostes exitoses
200Llistat de nòminesapplication/jsonUnique identifier of the payslip
Identifier of the employee this payslip belongs to. Null when the employee has been deleted.
Snapshot of the employee's full name at the time the payslip was created
Kind of payslip: `nomina_ordinaria` (ordinary monthly payslip), `gratificacion_no_cuantificable` (non-quantifiable bonus regularisation), `finiquito` (final settlement) or `atrasos` (back pay for months already settled, typically a retroactive collective-agreement increase).
nomina_ordinariagratificacion_no_cuantificablefiniquitoatrasosAccrual date of the payslip (ISO 8601)
First day of the liquidation period covered by the payslip. Null on payslips created before periods were stored.
Last day of the liquidation period covered by the payslip. Null on payslips created before periods were stored.
Days paid in the liquidation period
Free-form description of the payslip
List of tags attached to the payslip
Accounting account where the payroll expense is posted
Whether the payslip is still a draft. A draft has not been approved and is not posted to the ledger.
Amount the employee receives (salario neto), as a decimal string. Equals the sum of `earnings` minus the sum of `deductions`.
Total cost for the company (gross salary plus employer contributions), as a decimal string.
Total amount already paid, as a decimal string
Amount still pending payment, as a decimal string
Payment status of the payslip
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
Respostes d'error
400Sol·licitud incorrectaapplication/json401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json