Download a payslip PDF
Scope: accounting:payrolls.read https://api.alladdin.com/api/v2/payslips/{payslipId}/pdf
Generates and returns the PDF Alladdin'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 string required
Payslip ID (24-character hexadecimal ObjectId)
Request
import requests
url = "https://api.alladdin.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
"string"Success responses
200 Payslip PDF binary content application/pdf string<binary>
Error responses
401 Invalid or missing API key application/json 403 Insufficient permissions application/json 404 Payslip not found application/json 429 Rate limit exceeded application/json
