Skip to main content

Documentation 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.

A sede is a physical location belonging to your organization — a campus, building, or office. Educational operators in Colombia typically run several of these simultaneously: a main campus in one municipality, a secondary one in another, and possibly a remote annex. La Oficina Nítida models each of these as a Sede, a first-class entity tied to your tenant that can be assigned to employees, contracts, and bulk processing batches.

Sede Data Model

Each sede stores the following fields:
FieldTypeRequiredDescription
idString (UUID)AutoPrimary key, auto-generated
nombreStringBranch name — must be unique among active sedes within your tenant
municipioIdStringFK to the DANE municipality catalog (see below)
direccionString?OptionalStreet address of the branch
activoBooleanOptionalWhether the branch is currently active; defaults to true
tenantIdStringAutoInjected from the JWT — never supplied by the client

CRUD Operations

All sede endpoints require a valid JWT and an active tenant. Creating and updating sedes is restricted to the ADMIN role. Reading sedes is available to all authenticated roles.

List all branches

GET /sedes
Returns all sedes for your organization. Accepts optional query parameters for filtering (e.g., active status).

Create a branch

POST /sedes
{
  "nombre": "Sede Norte",
  "municipioId": "dab2c9e1-4f3a-4b1e-bc21-2e3d5f6a7890",
  "direccion": "Cra 15 # 82-45",
  "activo": true
}
Returns the newly created sede object. The tenantId is set automatically from the JWT.

Get a single branch

GET /sedes/:id
Returns the full sede record, including its linked MunicipioDane data.

Update a branch

PATCH /sedes/:id
All fields are optional. You may update nombre, municipioId, direccion, or activo independently.
{
  "direccion": "Av. El Dorado # 100-23"
}

Activation and Deactivation

La Oficina Nítida does not hard-delete sedes. Setting activo: false via PATCH /sedes/:id logically deactivates a branch. Deactivated sedes:
  • No longer appear in active-only filters
  • Cannot be assigned to new employees or contracts
  • Remain in the database to preserve historical references (e.g., contracts and employees previously associated with the branch continue to reference it correctly)
To reactivate a sede, send PATCH /sedes/:id with { "activo": true }.

DANE Municipality Integration

Colombia’s official administrative geography is maintained by the DANE (Departamento Administrativo Nacional de Estadística). La Oficina Nítida seeds the complete DANE municipality catalog into the platform’s database, making it available to all tenants.

Fetching the municipality catalog

GET /dane/municipios
GET /dane/municipios?search=bogot%C3%A1
Each municipality entry includes:
FieldDescription
idUUID used as municipioId when creating a sede
codigoOfficial DANE code (e.g., 11001 for Bogotá D.C.)
nombreMunicipality name
departamentoDepartment (Colombian state) the municipality belongs to
The municipioId field is required when creating a sede. Always resolve the correct UUID by searching the catalog before creating or updating a branch.

Uniqueness Rule

Active sede names must be unique within your organization. Attempting to create two active sedes with the same nombre under the same tenant returns a validation error. This rule applies only to active sedes — a deactivated sede’s name can be reused.

Employee → Sede Relationship

Every employee can be assigned to a sede via the sedeId field on the Empleado model. This relationship is a formal foreign key — not a free-text field. Assigning an employee to a sede:
  1. Sets Empleado.sedeId to the UUID of the chosen Sede
  2. Makes the {{SEDE}} template variable available in document generation, resolving to employee.sedeRef.nombre
The {{SEDE}} variable can be used in any DocumentTemplate or generated contract to automatically print the branch name on documents.
When importing employees in bulk via the Excel template, the sede column accepts the branch name (not its UUID). The platform resolves the name to the correct sedeId automatically during import. Make sure the name in your spreadsheet matches exactly — including accents and capitalization — the nombre of an active sede in your organization.

Build docs developers (and LLMs) love