The budget endpoints let you build detailed cost estimates before committing to a live project. Each budget (presupuesto) holds a list of cost items grouped into three categories — materials, labour, and additional expenses — and the API automatically computes a resumen (summary) with totals, a configurable markup percentage, the final selling price, and the resulting profit margin. Once a budget is approved, a singleDocumentation 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.
POST call converts it directly into an active project, seeding that project’s contracted total from the calculated selling price.
GET /presupuestos
Returns all budgets, each enriched with its full item list and a computed resumen.Response
Returns an array of presupuesto objects.Unique budget identifier.
Budget name (up to 200 characters).
Client name associated with this budget (up to 200 characters).
Project type category (e.g.
Construcción, Remodelación, Muebles, Mantenimiento, Otro).Markup percentage applied on top of total costs to arrive at the selling price.
Budget lifecycle state. Either
borrador (draft) or convertido (converted to a project).ID of the project created from this budget, if it has been converted; otherwise
null.ISO 8601 date on which the budget was created (e.g.
"2024-03-15").Alias for
fecha_creacion returned alongside it for display convenience.List of cost line items attached to this budget. See POST /presupuestos/{presupuesto_id}/items for the item schema.
Computed financial summary. See the Resumen Object section for full field definitions.
GET /presupuestos/{presupuesto_id}
Returns a single budget with its items and resumen.Path parameter — the ID of the budget to fetch.
404 if the budget does not exist.
POST /presupuestos
Creates a new budget inborrador state with an empty item list.
Request Body
Budget name. Maximum 200 characters. Cannot be blank.
Client name. Maximum 200 characters. Cannot be blank.
Project type. Maximum 60 characters. Defaults to
"Otro" if omitted. Cannot be blank if provided.Markup percentage to apply over total costs. Must be
>= 0. Defaults to 0.Response
Returns the full presupuesto object with an emptyitems array and zeroed resumen fields.
PUT /presupuestos/{presupuesto_id}
Updates the metadata of an existing budget (name, client, type, and markup). Item contents are not affected.POST /presupuestos. Returns the updated presupuesto object, or 404 if not found.
DELETE /presupuestos/{presupuesto_id}
Deletes a draft budget permanently.{ "ok": true } on success.
POST /presupuestos/{presupuesto_id}/items
Adds a cost line item to a budget and returns the fully updated presupuesto.Request Body
Cost category. Must be one of:
| Value | Display name |
|---|---|
materiales | Materiales |
mano_obra | Mano de obra |
gastos | Gastos adicionales |
Short label for the line item (e.g.
"Herrajes para puertas"). Maximum 200 characters. Cannot be blank.Optional longer description or notes. Maximum 500 characters.
Cost amount for this item. Must be strictly greater than
0.Response
Returns the full parent presupuesto object with the new item included and the resumen recomputed.DELETE /items/{item_id}
Removes a cost item from its parent budget.If the item exists, the response is the full parent presupuesto object with the updated resumen. If the item ID is not found, the response is
{ "ok": true } — the operation is idempotent.GET /presupuestos/{presupuesto_id}/pdf
Generates and downloads a PDF quotation (cotización) for the budget.- Content-Type:
application/pdf - Content-Disposition:
attachment; filename="cotizacion_{nombre}.pdf"
A-Za-z0-9._- are replaced with underscores.
Returns 404 if the budget does not exist.
POST /presupuestos/{presupuesto_id}/convertir
Converts a budget into a live project. The new project’stotal (contracted amount) is set to resumen.precio_venta, rounded to two decimal places.
estado is updated to "convertido" and its proyecto_id is set to the newly created project’s ID.
Response
Returns the full project object for the newly created project, including its emptyentradas and salidas arrays and all computed financial fields.
Resumen Object
Theresumen object is computed server-side and returned on every budget response. All monetary fields are decimal numbers.
Sum of
monto across all items with categoria == "materiales".Sum of
monto across all items with categoria == "mano_obra".Sum of
monto across all items with categoria == "gastos".total_materiales + total_mano_obra + total_gastosThe markup percentage stored on the budget (
utilidad_pct). Echoed here for convenience.costo_total × (1 + utilidad_pct / 100) — the recommended selling price to quote to the client.precio_venta − costo_total — absolute monetary profit at the quoted price.(utilidad_monto / precio_venta) × 100 — profit as a percentage of the selling price. Returns 0 when precio_venta is 0.