Saltar al contingut principal
GET

Llistar nòmines

Scope:accounting:payrolls.read
https://api.holded.com/api/v2/payslips

Retorna 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

cursorstringopcional

Cursor de paginació retornat a la resposta anterior. Omet-lo per començar per la primera pàgina

limitintegeropcional= 50

Nombre màxim de nòmines a retornar per pàgina. Per defecte 50, màxim 200

employee_idstringopcional

Filtra per empleat. Accepta el nom de l'empleat, que es resol al seu identificador al servidor

start_datestring<date-time>opcional

Retorna les nòmines amb data de meritació igual o posterior a aquesta data (ISO 8601)

end_datestring<date-time>opcional

Retorna les nòmines amb data de meritació igual o anterior a aquesta data (ISO 8601)

kindstringopcional

Filtra per tipus de nòmina

"nomina_ordinaria""gratificacion_no_cuantificable""finiquito""atrasos"
is_draftbooleanopcional

Filtra per estat d'esborrany: `true` retorna només les no aprovades, `false` només les aprovades. Omet-lo per retornar totes dues

Petició

python
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

json
{
  "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/json
object
items[]object[]
idstring

Unique identifier of the payslip

employee_idstring | null

Identifier of the employee this payslip belongs to. Null when the employee has been deleted.

employee_namestring

Snapshot of the employee's full name at the time the payslip was created

payslip_kindstring

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).

Enum:nomina_ordinariagratificacion_no_cuantificablefiniquitoatrasos
datestring<date>

Accrual date of the payslip (ISO 8601)

period_startstring<date> | null

First day of the liquidation period covered by the payslip. Null on payslips created before periods were stored.

period_endstring<date> | null

Last day of the liquidation period covered by the payslip. Null on payslips created before periods were stored.

total_daysinteger

Days paid in the liquidation period

descriptionstring

Free-form description of the payslip

tags[]string[]

List of tags attached to the payslip

accounting_account_idstring | null

Accounting account where the payroll expense is posted

is_draftboolean

Whether the payslip is still a draft. A draft has not been approved and is not posted to the ledger.

net_salarystring

Amount the employee receives (salario neto), as a decimal string. Equals the sum of `earnings` minus the sum of `deductions`.

total_company_coststring

Total cost for the company (gross salary plus employer contributions), as a decimal string.

payment_totalstring

Total amount already paid, as a decimal string

payment_pendingstring

Amount still pending payment, as a decimal string

payment_statusstring

Payment status of the payslip

Enum:PENDINGPAIDPARTIALLY_PAID
cursorstring | null

Opaque 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.

has_moreboolean

Whether more pages are available after this one

Respostes d'error

400Sol·licitud incorrectaapplication/json
401API key no vàlida o no proporcionadaapplication/json
403Permisos insuficientsapplication/json
429Límit de sol·licituds exceditapplication/json