Skip to main content
Labor rules define the day/night bands, maximum workdays, surcharges and tolerances FileXpress uses to classify attendance. See Labor rules in the manual.
Country templates are a starting point. The company must validate them with its labor advisor before using them to pay.

List company rules

Required permission: hr.labor_rules Returns all of the company’s effective periods (most recent first), which one applies today and the effective rules.

List country templates

Required permission: hr.labor_rules Returns a list of objects with the same format as rule_sets (with business_id: null and is_template: true). Colombia has several templates with successive effective periods.

Query the rules in effect on a date

Required permission: hr.labor_rules
source indicates where the parameters come from: business (the company’s own rules), template (the country template) or default (system defaults; rule_set is null).

Copy from template

Required permission: hr.labor_rules.write
Behavior
  • Creates a company effective period with the template’s parameters and an indefinite duration.
  • If the company has an open active period (no end date) that starts earlier, it is closed the day before effective_from.
  • Queues the recalculation of the affected attendance.
Response 201: the created rule set, with recalculation_queued.

Create rules

Required permission: hr.labor_rules.write

Parameters

All minutes are integers; surcharges are an additional fraction over the ordinary daytime hour (0.25 = +25%). Response 201: the created rule set (same format as rule_sets) plus recalculation_queued (true if the recalculation of the affected attendance was queued).

Edit rules

Required permission: hr.labor_rules.write Send only the fields that change. If you send params, it must be complete (it replaces the previous ones). Only company periods can be edited, not templates.
Behavior
  • If attendance has already been calculated in the period, it is recalculated (the last 90 days at most). Days included in processed or paid payrolls do not change.
Response 200: the updated rule set, with recalculation_queued.