Saltar al contenido principal
GET

Listado de registros de nómina: nóminas y salarios

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

Devuelve 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

cursorstringopcional

Cursor opaco para paginación. Usa el valor devuelto en la respuesta anterior para obtener la siguiente página

limitintegeropcional= 50

Número máximo de registros a devolver por página. Por defecto 50, máximo 200

employee_idstringopcional

Filtra los resultados por identificador del empleado

start_datestring<date-time>opcional

Devuelve los registros con fecha de devengo igual o posterior a esta fecha (ISO 8601)

end_datestring<date-time>opcional

Devuelve los registros con fecha de devengo igual o anterior a esta fecha (ISO 8601)

Petición

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

Respuestas

Respuesta

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
}

Respuestas exitosas

200Listado de registros 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

Respuestas de error

400Solicitud incorrectaapplication/json
401API key inválida o no proporcionadaapplication/json
403Permisos insuficientesapplication/json
429Límite de solicitudes excedidoapplication/json