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 roster endpoints manage payroll records (nóminas) for the sublimation module. A roster entry represents a payroll period for a specific employee, tracking the start and end dates, the calculated state, and references to both the company and employee. Payroll calculations apply Colombian statutory deductions (health 4%, pension 4%) and transport allowance for salaries up to two minimum wages.
All roster endpoints require TokenAny plus TokenAuthorize('Admin', 'Super Admin'). Pass your token using token-access: Bearer $TOKEN.

POST /api/roster/:company_id/:employee_id

Creates a new payroll roster (nómina header) for a specific employee within a payroll period. The roster is saved with stade set to "Draft". Path parameters
company_id
string
required
MongoDB ObjectId of the company.
employee_id
string
required
MongoDB ObjectId of the employee this roster belongs to.
Body parameters
start_period
string
required
Start date of the payroll period (e.g., "1/8/2024").
end_period
string
required
End date of the payroll period (e.g., "31/8/2024").
Response
msj
string
"Nomina creada exitosamente" on success.
status
boolean
true on success.
resp_nomina
object
The created roster document.
curl -X POST https://api.example.com/api/roster/64a1f2e3b5c8d90012345678/64b3c4d5e6f7a80034567890 \
  -H "token-access: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "start_period": "1/8/2024",
    "end_period": "31/8/2024"
  }'
{
  "msj": "Nomina creada exitosamente",
  "status": true,
  "resp_nomina": {
    "_id": "64c4d5e6f7a8b90045678901",
    "start_period": "1/8/2024",
    "end_period": "31/8/2024",
    "stade": "Draft",
    "company": "64a1f2e3b5c8d90012345678",
    "employee": "64b3c4d5e6f7a80034567890"
  }
}

POST /api/roster/:company_id/calculate/:nomina_id/nomina/:employee_id

Calculates payroll for a specific roster entry. The controller iterates over all active employees (stade_employee: "Activo"), computes earnings and deductions using base_saraly_employee, and creates DetailedPayroll and PayrollConcept records. The roster stade is updated to "Calculada" on completion. Path parameters
company_id
string
required
MongoDB ObjectId of the company.
nomina_id
string
required
MongoDB ObjectId of the roster (nómina) to calculate.
employee_id
string
required
MongoDB ObjectId of the employee to calculate for.
Response
msj
string
"Nomina calculada exitosamente" on success.
status
boolean
true on success.
curl -X POST https://api.example.com/api/roster/64a1f2e3b5c8d90012345678/calculate/64c4d5e6f7a8b90045678901/nomina/64b3c4d5e6f7a80034567890 \
  -H "token-access: Bearer $TOKEN" \
  -H "Content-Type: application/json"
{
  "msj": "Nomina calculada exitosamente",
  "status": true
}

POST /api/roster/recalcular/:company_id/nomina/:nomina_id

Recalculates a payroll roster that was previously calculated. The controller deletes all existing PayrollConcept and DetailedPayroll records linked to this roster, resets stade to "draft", then calls the calculation logic again from scratch. Use this endpoint when employee salary data changes after an initial calculation. Path parameters
company_id
string
required
MongoDB ObjectId of the company.
nomina_id
string
required
MongoDB ObjectId of the roster to recalculate.
Response
msj
string
"Nomina calculada exitosamente" on success (the recalculation delegates to the same calculation handler).
status
boolean
true on success.
curl -X POST https://api.example.com/api/roster/recalcular/64a1f2e3b5c8d90012345678/nomina/64c4d5e6f7a8b90045678901 \
  -H "token-access: Bearer $TOKEN" \
  -H "Content-Type: application/json"
{
  "msj": "Nomina calculada exitosamente",
  "status": true
}

Roster States

StateDescription
DraftRoster created but payroll not yet calculated
CalculadaPayroll has been calculated
PagadaPayroll has been paid out

Build docs developers (and LLMs) love