Dades per defecte per crear un registre de nòmina
accounting:payrolls.readhttps://api.holded.com/api/v2/salary-records/form-dataRetorna el compte comptable de contrapartida per defecte i les línies de nòmina per defecte (compte, clau d'impost i descripció per tipus) necessàries per crear un registre de nòmina.
Petició
import requests
url = "https://api.holded.com/api/v2/salary-records/form-data"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Respostes
Resposta
{
"default_accounting_account_id": "507f1f77bcf86cd799439013",
"default_lines": [
{
"type": "salary",
"amount": "0",
"accounting_account_id": "507f1f77bcf86cd799439014",
"tax_key": "e_salario",
"description": "Salario"
}
]
}Respostes exitoses
200Dades per defecte del registre de nòminaapplication/jsonDefault top-level accounting account for the salary record: the result/counterpart account where the net payable is posted (e.g. "465 Remuneraciones pendientes de pago"). Use it as `accounting_account_id` when creating, unless the employee has its own `payroll_accounts.result` configured.
Default payroll lines from the account payroll scheme. One entry per line type with the accounting account, tax key and description already resolved — copy them verbatim into the create request. The "0" amounts are NOT usable values: you MUST ask the user for the real amount of every line and replace each "0" before creating. Never submit a line with amount "0".
Line type (e.g. salary, retention, tax, companytax)
Placeholder amount, always "0"
Default accounting account for this line type
Default tax key for this line type (e.g. e_salario, e_retencion). Copy it verbatim into the create request.
Default line description (concept label, e.g. "Salario", "Total S.S."). Copy it verbatim into the create request.
Respostes d'error
401API key no vàlida o no proporcionadaapplication/json403Permisos insuficientsapplication/json429Límit de sol·licituds exceditapplication/json