Payroll API
Endpoints for payroll configuration, processing, and payslip generation.
Payroll Configuration
Get Employees with Payroll Status
GET /payroll_config/employees
Get Payroll Employees
GET /payroll_config/payroll-employees
Create or Update Payroll Employee
POST /payroll_config/payroll-employees
Request Body: A JSON object describing the payroll employee record.
Delete Payroll Employee
DELETE /payroll_config/payroll-employees/{id}
Get Pay Frequencies
Returns available pay frequency options.
GET /payroll_config/pay-frequencies
Get Deduction Groups
GET /payroll_config/payroll-groups
Get Currencies
GET /payroll_config/currencies
Get Departments
GET /payroll_config/departments
Payslip Templates
Get Payslip Templates
GET /payroll_config/payslip-templates
Create or Update Payslip Template
POST /payroll_config/payslip-templates
Get Payslip Template
GET /payroll_config/payslip-templates/{id}
Delete Payslip Template
DELETE /payroll_config/payslip-templates/{id}
Preview Payslip Template
Returns rendered HTML for a saved payslip template.
GET /payroll_config/payslip-templates/{id}/preview
Preview Payslip from JSON
Renders a payslip preview from an ad-hoc JSON template.
POST /payroll_config/payslip-templates/preview
Request Body: Template definition.
Payroll Columns and Components
Get Payroll Columns
GET /payroll_config/payroll-columns
Create or Update Payroll Column
POST /payroll_config/payroll-columns
Delete Payroll Column
DELETE /payroll_config/payroll-columns/{id}
Get Calculation Hooks
Returns the list of available calculation hooks.
GET /payroll_config/calculation-hooks
Get Salary Components
GET /payroll_config/salary-components
Payroll Runs
Get All Payrolls
GET /payroll_config/payrolls
Create or Update Payroll
POST /payroll_config/payrolls
Get Payroll
GET /payroll_config/payrolls/{id}
Delete Payroll
DELETE /payroll_config/payrolls/{id}
Get Payroll Employees
GET /payroll_config/payrolls/{id}/employees
Process Payroll
POST /payroll_config/payrolls/{id}/process
Response: 200 OK once processing has started.
Get Payroll Data Grid
GET /payroll_config/payrolls/{id}/data
Update Payroll Data
POST /payroll_config/payrolls/{id}/data
Request Body: A JSON object with the data updates.
Generate Payslips
Finalizes the payroll and generates payslips.
POST /payroll_config/payrolls/{id}/generate-payslips
Delete Payslips
Deletes payslips and reverts the payroll back to Processed status.
POST /payroll_config/payrolls/{id}/delete-payslips
Validate Calculation Script
Validates a payroll calculation script syntax.
POST /payroll_config/validate-script
Request Body:
{
"script": "return basic * 0.1;"
}
Response: 200 OK with the validation result.