GET
Download a payslip PDF
Scope:
accounting:payrolls.readhttps://api.holded.com/api/v2/payslips/{payslipId}/pdfGenerates and returns the PDF Holded's payroll engine produces for a payslip. A payslip (Spanish *nómina*) is NOT a salary record (*registro salarial*), which is served by `/api/v2/salary-records`. Ids of both look identical, so asking this endpoint for a salary-record id returns 404 naming the resource that does serve it.
Parameters
Path parameters
payslipId
stringrequiredPayslip ID (24-character hexadecimal ObjectId)
Request
python
import requests
url = "https://api.holded.com/api/v2/payslips/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
200Payslip PDF binary contentapplication/pdfstring<binary>
Error responses
401Invalid or missing API keyapplication/json403Insufficient permissionsapplication/json404Payslip not foundapplication/json429Rate limit exceededapplication/json