Llistat de registres de nòmina
accounting:payrolls.readhttps://api.holded.com/api/v2/salary-recordsRetorna 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
stringopcionalCursor opac per a la paginació. Utilitza el valor retornat a la resposta anterior per obtenir la pàgina següent
integeropcional= 50Nombre màxim de registres a retornar per pàgina. Per defecte 50, màxim 200
stringopcionalFiltra els resultats per identificador de l'empleat
string<date-time>opcionalRetorna els registres amb data de meritació igual o posterior a aquesta data (ISO 8601)
string<date-time>opcionalRetorna els registres amb data de meritació igual o anterior a aquesta data (ISO 8601)
Petició
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
{
"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/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
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
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_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