Saltar al contingut principal
GET

Llistat de registres de nòmina

Scope:accounting:payrolls.read
https://api.holded.com/api/v2/salary-records

Retorna una llista paginada de registres de nòmina, els més recents primer per ordre de creació (`id` del registre, descendent). El filtre per dates s'aplica a la data de meritació de cada registre, mentre que l'ordre del resultat segueix l'ordre de creació.

Paràmetres

Paràmetres de consulta

cursorstringopcional

Cursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior per obtenir la pàgina següent

limitintegeropcional= 50

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

employee_idstringopcional

Filtra els resultats per identificador de l'empleat

start_datestring<date-time>opcional

Retorna els registres amb data de meritació igual o posterior a aquesta data (ISO 8601)

end_datestring<date-time>opcional

Retorna els registres amb data de meritació igual o anterior a aquesta data (ISO 8601)

Petició

python
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())

Respostes

Resposta

json
{
  "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
}

Respostes exitoses

200Llistat de registres de nòminaapplication/json
object
items[]object[]
idstring

Unique identifier of the salary record

employee_idstring | null

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

employee_namestring

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

datestring<date>

Accrual date of the salary record (ISO 8601)

descriptionstring

Free-form description of the record

tags[]string[]

List of tags attached to the record

accounting_account_idstring | null

Accounting account where the payroll expense is posted

is_draftboolean

Whether the record is still a draft and has not been posted to the ledger

total_payablestring

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.

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 record

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