GET
Download a salary record PDF
Scope:
accounting:payrolls.readhttps://api.holded.com/api/v2/salary-records/{salaryRecordId}/pdfReturns the PDF uploaded for a salary record (Spanish *registro salarial*). A salary record is a manually entered accounting record, not a document produced by Holded's payroll engine, so it has no exported PDF of its own: if no file has been uploaded, the response is 422. A salary record is NOT a payslip (*nómina*), which is served by `/api/v2/payslips`. Ids of both look identical, so asking this endpoint for a payslip id also returns 404.
Parameters
Path parameters
salaryRecordId
stringrequiredSalary record ID (24-character hexadecimal ObjectId)
Request
python
import requests
url = "https://api.holded.com/api/v2/salary-records/507f1f77bcf86cd799439011/pdf"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())Responses
Response
json
"string"Success responses
200Salary record PDF binary contentapplication/pdfstring<binary>
Error responses
401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Salary record not foundapplication/json422No file has been uploaded for this salary recordapplication/json429Rate limit exceededapplication/json