Create Budget
Create a new budget with optional line items. The budget will be created in BORRADOR (draft) status by default.Endpoint
Authentication
Requires valid JWT Bearer token.Request Body
Company ID
Operational area/department ID
Category group ID (top-level category)
Subcategory ID (must belong to grupo_rubro_id)
Fiscal year (e.g., 2024)
Vehicle ID. Optional - leave null for department-wide budgets not tied to a specific vehicle.
Budget status: “BORRADOR” (draft) or “APROBADO” (approved)
Employee ID responsible for this budget. Optional.
Array of budget line items to create with the budget. Optional - can be added later.
Budget type ID (e.g., maintenance, fuel)
Concept ID (must belong to tipo_presupuesto_id)
How many times per month this expense occurs
Array of month numbers (1-12) where this item applies. Example: [1, 3, 6, 9, 12]
Unit price for this expense. valor_total is calculated automatically as: valor_unitario × frecuencia_mes × meses_aplicables.length
Response
Created budget ID
Company ID
Vehicle ID
Operational area ID
Category group ID
Subcategory ID
Fiscal year
Status: “BORRADOR” or “APROBADO”
Employee ID
Creation timestamp
Example Request
Example Response
The items are created separately after the budget header. If item creation fails, the budget header is automatically rolled back.
Update Budget
Update an existing budget’s header information. To update items, use the item-specific endpoints.Endpoint
Authentication
Requires valid JWT Bearer token.Path Parameters
Budget ID to update
Request Body
All fields are optional. Only include fields you want to update.Company ID
Vehicle ID
Operational area ID
Category group ID
Subcategory ID
Fiscal year
Budget status: “BORRADOR” or “APROBADO”
Employee ID
Response
Returns the updated budget object with the same structure as the create response.Example Request
Example Response
Delete Budget
Delete a budget and all its associated items. This action is irreversible.Endpoint
Authentication
Requires valid JWT Bearer token.Path Parameters
Budget ID to delete
Response
Returns HTTP 204 No Content on success.Example Request
Catalog Management
Create budget types and concepts to build your budget structure.Create Budget Type
Create a new budget type (e.g., “Maintenance”, “Fuel”, “Supplies”).Requires ADMIN role.
Endpoint
Authentication
Requires valid JWT Bearer token with ADMIN role.Request Body
Type name (e.g., “Mantenimiento Preventivo”)
Optional description
Parent rubro ID from maestro_rubros
Example Request
Example Response
Create Budget Concept
Create a new budget concept within a type (e.g., “Oil Change”, “Tire Replacement”).Requires ADMIN role.
Endpoint
Authentication
Requires valid JWT Bearer token with ADMIN role.Request Body
Concept name (e.g., “Cambio de Aceite”)
Budget type ID this concept belongs to
Unit of measurement (e.g., “Servicio”, “Galón”, “Unidad”)
Example Request
Example Response
Get Catalog Data
Retrieve catalog data for building budget forms.Get Rubros (Categories)
Get the master list of budget categories and subcategories.Endpoint
Query Parameters
Filter by type: “DEPENDENCIA”, “GRUPO_RUBRO”, or “RUBRO”
Filter by hierarchy level (1, 2, 3)
Filter by parent rubro ID
Example Request
Get Budget Types
Get all budget types.Endpoint
Query Parameters
Filter by parent rubro ID
Example Request
Get Budget Concepts
Get all budget concepts, optionally filtered by type.Endpoint
Query Parameters
Filter by budget type ID