The Contracts API manages the full lifecycle of employment agreements within a tenant. A contract record stores a snapshot of the employee’sDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Glemynart/SaaS/llms.txt
Use this file to discover all available pages before exploring further.
cargo and salario at the moment of creation so that later edits to the employee profile do not alter historical contract data. Contracts move through four states — VIGENTE, VENCIDO, TERMINADO, and RENOVADO — and state transitions are restricted to the ADMIN role. Document generation from a contract produces a GeneratedDocument that is automatically linked to the employee’s expediente.
All endpoints require a valid JWT.
List contracts
Page number, minimum
1. Defaults to 1.Records per page, minimum
1, maximum 100. Defaults to 10.Free-text search across contract
cargo, employee first name, first family name, and document number (cédula).Restrict results to contracts belonging to a specific employee.
Filter by contract state. One of
VIGENTE, VENCIDO, TERMINADO, RENOVADO.Page of contract objects matching the query.
Total matching contracts across all pages.
Current page.
Page size.
Total number of pages.
Create contract
UUID of the employee for whom this contract is being created.
Job title as it should appear on the contract. Stored as an immutable snapshot.
Monthly salary as it should appear on the contract (≥
0). Stored as an immutable snapshot.Contract type. One of
TERMINO_FIJO, TERMINO_INDEFINIDO, OBRA_LABOR, APRENDIZAJE, PRESTACION_SERVICIOS.Contract start date (e.g.
"2024-04-01").Contract end date. Required for
TERMINO_FIJO and OBRA_LABOR contracts. Omit for indefinite agreements.Branch office associated with this contract.
Newly created contract identifier.
Initial state; always
VIGENTE.Timestamp of record creation.
cargo and salario are snapshot fields captured at contract creation time. If the employee’s profile is later updated, already-created contracts retain the original values.Get contract
Contract identifier.
Contract identifier.
Associated employee identifier.
Contract type enum value.
Current lifecycle state.
Snapshot job title.
Snapshot monthly salary.
Contract start date.
Contract end date, or
null for indefinite contracts.R2 storage key for the generated PDF, if available.
R2 storage key for the generated DOCX, if available.
JSON object with the template variable values used at document generation time.
Update contract status
400 Bad Request.
Contract identifier.
Target state. One of
VIGENTE, VENCIDO, TERMINADO, RENOVADO.Contract identifier.
Updated lifecycle state.
Timestamp of the transition.
State transition table
| Current state | Allowed target states |
|---|---|
VIGENTE | VENCIDO, TERMINADO, RENOVADO |
VENCIDO | RENOVADO |
TERMINADO | (no further transitions) |
RENOVADO | (no further transitions) |
Generate contract document
GeneratedDocument from a DocumentTemplate using the contract’s snapshot data as replacement context. If templateId is omitted, the service selects the tenant’s default CONTRACT-type template.
Contract identifier.
UUID of the
DocumentTemplate to use. When omitted, the platform resolves the default active CONTRACT template for the tenant.Identifier of the created
GeneratedDocument record.Name assigned to the generated document.
Template type used (
CONTRACT, CERTIFICATION, LETTER, or MEMO).Immutable HTML snapshot with all
{{VARIABLE}} placeholders replaced.URL of the rendered PDF after calling
POST /generated-documents/:id/generate-pdf. null until PDF rendering is triggered.List contracts for an employee
Employee identifier.
Flat array of all contract records for the employee, ordered by
createdAt descending.