Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sheeplettuce/Monitor/llms.txt

Use this file to discover all available pages before exploring further.

This endpoint sums the costo values of all levantamiento_concepto records attached to a levantamiento and returns the total repair estimate. If the levantamiento has no concepts yet, the total is 0.

Endpoint

GET /api/levantamientos/:id/costo-total
Requires a valid Bearer token. All authenticated roles (Administrador, Operador, Tecnico) may call this endpoint.
The total only reflects concepts that have already been added. To get an updated estimate after adding or removing concepts, simply call this endpoint again — no caching is involved.

Path Parameters

id
integer
required
The numeric primary key of the levantamiento whose concepts should be summed. Must parse as a valid integer.

Request Example

curl http://localhost:3000/api/levantamientos/42/costo-total \
  -H "Authorization: Bearer $TOKEN"

Response

200 — Success

Returns an object with the levantamiento ID and the calculated total.
{
  "id_levantamiento": 42,
  "total": 12500
}

Error Responses

StatusBodyDescription
400{ "error": "id inválido" }The :id path segment is not a valid integer.
401Missing or invalid Authorization header.
404{ "error": "Levantamiento no encontrado" }No levantamiento exists with the given ID.
Use this endpoint as the final step in an estimate workflow: create the levantamientoadd concepts → call /costo-total to get the repair estimate to present to the insurer.

Build docs developers (and LLMs) love