The project endpoints are the backbone of Gestor Financiero. They let you create and edit financial projects, advance them through their lifecycle (from iniciando to finalizado), pause and resume work, cancel when needed, and generate a closure PDF summary once a project is complete. Every mutating response returns the full project object — including all computed financial fields — so your UI always has a consistent, up-to-date snapshot after each action.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JDzuu/AplicativoWEB_GestorFinanciero/llms.txt
Use this file to discover all available pages before exploring further.
GET /proyectos
Returns a list of all projects, each enriched with computed financial totals and state display metadata. This lightweight variant omits the individualentradas and salidas arrays for performance; use GET /proyectos/{proyecto_id} to retrieve the full detail.
Response
Unique identifier of the project.
Project name (up to 200 characters).
Client name associated with the project (up to 200 characters).
Project type. One of:
Construcción, Remodelación, Muebles, Mantenimiento, Otro.Contracted total amount for the project.
Project start date in
YYYY-MM-DD format.Current lifecycle state. One of:
iniciando, proceso, acabando, pausa, finalizado, cancelado.The active state the project was in before being paused.
null when not paused.Closing date (
YYYY-MM-DD) set when the project is finalized or cancelled. null while still active.ISO timestamp of when the project record was created.
Sum of all client payments received so far.
Sum of all expenses registered so far.
Current balance:
total_entradas − total_salidas.Net profit computed as
total_entradas − total_salidas.Percentage of the contracted total that has been collected (0–100).
Total elapsed days between
fecha_inicio and fecha_fin (or today if still active). null if dates are invalid.Human-readable label for the current state (e.g.,
"En proceso", "Finalizado").UI color hint for the current state (e.g.,
"azul", "verde", "rojo").GET /proyectos/{proyecto_id}
Returns the full detail of a single project, including all associated payment records, expense records, and computed financial fields.Path Parameters
The numeric ID of the project to retrieve.
Response
Returns the same fields asGET /proyectos, plus:
List of all client payment records for this project.
List of all expense records for this project.
Total number of days the project has spent in the
pausa state.Effective working days:
duracion − dias_pausa. null if duracion is unavailable.POST /proyectos
Creates a new project. The project is created ininiciando state with no financial records.
Request Body
Project name. Maximum 200 characters. Cannot be blank.
Client name. Maximum 200 characters. Cannot be blank.
Project type. Maximum 60 characters. Must be one of:
Construcción, Remodelación, Muebles, Mantenimiento, Otro.Contracted total amount. Must be greater than
0.Project start date in
YYYY-MM-DD ISO format. Maximum 20 characters.Response
Returns the full project object (same shape asGET /proyectos/{proyecto_id}).
PUT /proyectos/{proyecto_id}
Updates the metadata of an existing project. Accepts the same body asPOST /proyectos. Financial records and lifecycle state are unaffected by this call.
Path Parameters
The numeric ID of the project to update.
Request Body
Same fields asPOST /proyectos: nombre, cliente, tipo, total, fecha_inicio.
Response
Returns the full updated project object.POST /proyectos/{proyecto_id}/estado
Manually advances or changes the active state of a project within the set of working states. Use this to move a project betweeniniciando, proceso, and acabando as work progresses.
Path Parameters
The numeric ID of the project.
Request Body
The target active state. Must be one of:
iniciando, proceso, acabando.Response
Returns the full project object with the updatedestado.
POST /proyectos/{proyecto_id}/finalizar
Marks a project asfinalizado and records today as fecha_fin. This transition is only allowed when 100 % of the contracted total has been collected via payment records.
Path Parameters
The numeric ID of the project to finalize.
Response
Returns the full project object withestado set to finalizado and fecha_fin populated.
POST /proyectos/{proyecto_id}/cancelar
Cancels a project from any non-closed state (iniciando, proceso, acabando, or pausa). If the project is currently paused, the open pause period is automatically closed before the cancellation is applied. Records today as fecha_fin.
Path Parameters
The numeric ID of the project to cancel.
Response
Returns the full project object withestado set to cancelado and fecha_fin populated.
POST /proyectos/{proyecto_id}/pausar
Pauses a project that is currently in one of the three active states. Records a pause entry with today as the start date, and stores the current state inestado_previo so it can be restored on resume.
Path Parameters
The numeric ID of the project to pause.
Response
Returns the full project object withestado set to pausa and estado_previo holding the previous active state.
POST /proyectos/{proyecto_id}/reanudar
Resumes a paused project. Closes the open pause period (recording today as the end date) and restores the state stored inestado_previo. If estado_previo is missing for any reason, the project falls back to proceso.
Path Parameters
The numeric ID of the project to resume.
Response
Returns the full project object withestado restored to the previous active state and the pause period closed.
GET /proyectos/{proyecto_id}/pdf
Generates and streams the project closure PDF, produced by ReportLab. The file includes project details, all payment records, all expense records, and a financial summary.Path Parameters
The numeric ID of the project for which to generate the PDF.
Response
Returns a binaryapplication/pdf response with the header:
The PDF is generated on demand on every request — there is no cached file. For projects with many records, allow a short generation delay.
GET /proyectos/{proyecto_id}/comparacion
Returns a budget-versus-actual cost comparison for a project. This endpoint is only meaningful for projects that originated from a presupuesto (budget) via the/presupuestos/{id}/convertir workflow. When no budget is linked, the response simply signals that with tiene_presupuesto: false.
Path Parameters
The numeric ID of the project.
Response
true if this project has an associated presupuesto; false otherwise. When false, no other fields are returned.ID of the linked presupuesto record.
The individual line items (partidas) from the original presupuesto. Useful for populating the
partida_id field when registering salidas.Budget summary with fields:
total_materiales, total_mano_obra, total_gastos, costo_total, utilidad_pct, precio_venta, utilidad_monto, margen_pct.Per-category deviation analysis. Each key (
materiales, mano_obra, gastos, costo_total, utilidad) contains estimado, real, desviacion, and desviacion_pct. Also includes sin_categoria for expenses with no category.GET /catalogos
Returns the static application catalogs used to populate dropdowns and validate inputs throughout the UI. Call this once on application load and cache the result client-side.Response
Valid project types:
["Construcción", "Remodelación", "Muebles", "Mantenimiento", "Otro"].The three active (non-terminal) states:
["iniciando", "proceso", "acabando"].Map of category key → array of subcategory labels. Keys are
materiales, mano_obra, gastos.Human-readable display name for each category key:
{"materiales": "Materiales", "mano_obra": "Mano de obra", "gastos": "Gastos adicionales"}.