Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/fredy-rizo/MultiSas/llms.txt

Use this file to discover all available pages before exploring further.

The HR module provides sublimation businesses with structured employee management and a payroll processing pipeline. Employee records capture personal details, document type, base salary, contract type, and current status. A roster (Roster) represents a payroll period header that ties one or more employees to a specific pay cycle, while DetailedPayroll and PayrollConcept records hold the granular calculations — devengados (earnings) and deducciones (deductions) — that produce each employee’s net pay.

Employee Management

Stored in collection employee_sublimacion. Each record represents a single staff member belonging to a company.
FieldTypeNotes
name_employeeStringEmployee full name
type_document_employeeStringDocument type (e.g., CC, PP, CE)
number_document_employeeNumberDocument number
base_saraly_employeeNumberBase monthly salary (note: field name contains a typo in the source schema — saraly instead of salary; use this exact key in all requests)
type_contract_employeeString (enum)"Fijo", "Indefinido", "Prestaciones", or ""
stade_employeeStringEmployment state — typically "Activo" or "Inactivo"
type_employeeStringFunctional role (e.g., designer, operator, administrator)
companyStringID of the owning company

Contract Types

The type_contract_employee field uses one of three enum values, each reflecting a different labour relationship under Colombian law:
ValueNameDescription
"Fijo"Fixed-term contractEmployment for a defined period with an agreed end date. Renewed explicitly by both parties.
"Indefinido"Indefinite contractOpen-ended employment with no predetermined end date. Provides full social security benefits.
"Prestaciones"Services contractIndependent contractor arrangement. The employee invoices for services; the company does not pay social security contributions directly.

Payroll Roster

Stored in collection roster_sublimacion. A roster is the payroll period header — it defines the pay window and links to the employee being paid during that period.
FieldTypeNotes
start_periodStringStart date of the payroll period
end_periodStringEnd date of the payroll period
stadeString (enum)Roster state: "Draft", "Calculada", "Pagada", or ""
companyStringID of the owning company
employeeStringID of the employee for this payroll entry
Roster lifecycle:
  1. Draft — The period has been opened but payroll has not been calculated yet.
  2. Calculada — Payroll calculations have been run and figures are ready for review.
  3. Pagada — Payment has been confirmed and the payroll period is closed.

Payroll Concepts

The payroll calculation pipeline uses three additional models that work together to produce a detailed payroll record:

DetailedPayroll

Stored in collection detailt_payroll_sublimacion. One record per employee per payroll period. Holds the summarised financial result of a payroll run.
FieldTypeNotes
nominaStringReference ID of the parent roster period
base_saraly_employeeNumberBase salary used for this calculation (captured at run time; uses the same source typo as the Employee model)
days_workedStringNumber of days worked in the period (used for proration)
accruedStringTotal devengado (earnings) for the period
deductionStringTotal deducciones (deductions) for the period
netStringNet pay (accrueddeduction)
employeeStringID of the employee
companyStringID of the owning company

PayrollConcept

Stored in collection payroll_concept_sublimacion. Defines a reusable payroll concept (a named earning or deduction rule) that belongs to a company.
FieldTypeNotes
nomina_detalle_idStringReference to the detailed payroll record this concept applies to
name_conceptStringConcept label (e.g., "salario", "auxilio_transporte", "salud", "pension")
type_conceptString (enum)"devengado" (adds to earnings) or "deduccion" (subtracts from earnings)
valorNumberFixed monetary value for the concept
formulaStringOptional formula string for dynamic calculation (e.g., "salario * 0.04")
companyStringID of the owning company

ConceptPayroll

Stored in collection concept_payroll_sublimacion. Associates a PayrollConcept with a specific DetailedPayroll record and records the computed value for that run.
The ConceptPayroll model file contains a //! no usarlo comment indicating this model is not currently in active use. It is documented here for completeness; prefer PayrollConcept for concept management.
FieldTypeNotes
detail_payrollStringID of the parent DetailedPayroll record
payroll_conceptStringID of the PayrollConcept applied
valorNumberComputed value of the concept for this payroll run
To build a complete payroll run: create PayrollConcept records for each earning/deduction type your business uses, then for each employee and period create a DetailedPayroll and link ConceptPayroll entries to it for every applicable concept.

API Endpoints Summary

Employees — /api/employee

MethodEndpointDescription
POST/api/employee/create/:company_idCreate a new employee record
PUT/api/employee/update/:company_id/:employee_idUpdate an existing employee record
GET/api/employee/list/:company_idList all employees for a company (paginated)
GET/api/employee/list-active/:company_idList only active employees (paginated)
GET/api/employee/list-inactive/:company_idList only inactive employees (paginated)
DELETE/api/employee/remove/:employee_idDelete an employee record

Roster / Payroll — /api/roster

MethodEndpointDescription
POST/api/roster/:company_id/:employee_idCreate a new payroll roster period for an employee
POST/api/roster/:company_id/calculate/:nomina_id/nomina/:employee_idCalculate payroll for a roster period
POST/api/roster/recalcular/:company_id/nomina/:nomina_idRecalculate a previously calculated payroll period

Full Employee API Reference

Browse the complete endpoint reference for employee management and payroll roster in the sublimation HR module.

Build docs developers (and LLMs) love