A levantamiento de daños is a damage survey linked to an expediente. It captures the vehicle’s physical condition at the time of inspection — which systems are damaged, identifying details like mileage and VIN, and the owner’s contact information — and contains an ordered list of cost conceptos (line items) representing each discrete repair task. The sum of all concept costs gives you the total repair estimate for that survey.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.
A single expediente can have multiple levantamientos. A common scenario is an initial survey at intake followed by a supplementary survey after disassembly reveals hidden damage. Each survey has its own independent list of cost concepts.
Creating a levantamiento
POST /api/levantamientos
The only required field is no_siniestro, which must match an existing expediente. All other fields are optional and can be updated later with PUT /api/levantamientos/:id.
Any authenticated user may create a levantamiento — this endpoint requires a valid token (verificarToken) but has no role restriction beyond that.
Vehicle detail fields:
| Field | Type | Description |
|---|---|---|
fecha | string | Inspection date. Accepts DD/MM/YYYY or YYYY-MM-DD. |
orden | string | Work order number. |
marca | string | Vehicle make (e.g. Toyota). |
tipo | string | Body type (e.g. Sedan). |
modelo | string | Model name (e.g. Corolla). |
placas | string | License plate. |
kilometraje | string | Odometer reading at inspection. |
no_puertas | string | Number of doors. |
color | string | Vehicle color. |
serie | string | VIN / chassis serial number. |
eco | string | Fleet / eco number (if applicable). |
nombre_propietario | string | Owner’s name. |
telefono | string | Owner’s phone number. |
direccion | string | Owner’s address. |
true for each system that is damaged:
| Field | System |
|---|---|
cristales | Glass / windows |
aire | Air conditioning |
vestiduras | Upholstery / interior trim |
rin | Wheels / rims |
direccion_veh | Steering system |
tipo_pintura | Paint type affected |
trasmision | Transmission |
201 Created:
400 if no_siniestro is missing or does not match any existing expediente.
Adding cost concepts
POST /api/levantamientos/:id/conceptos
Add a line-item repair cost to an existing levantamiento. Each concept represents one discrete repair task or part replacement.
| Field | Required | Description |
|---|---|---|
concepto | ✅ | Human-readable description of the repair item. |
claves | ❌ | Internal item code or parts catalogue key. |
costo | ❌ | Cost in decimal currency (stored as Decimal in the database). |
201 Created:
404 if the levantamiento with the given id does not exist, and 400 if concepto is omitted.
Calculating the total cost
GET /api/levantamientos/:id/costo-total
Returns the sum of all costo values across every concept belonging to the levantamiento. Useful for displaying a quick repair estimate without fetching the full concept list.
total is a plain JavaScript number (the result of summing each concept’s costo cast to Number). Returns 404 if the levantamiento does not exist.
Fetching levantamientos
List all (with optional filter)
GET /api/levantamientosReturns all levantamientos, each with its levantamiento_concepto array included, ordered by id descending.Filter by claim using the optional query parameter:GET /api/levantamientos?no_siniestro=SIN-2024-001Get by ID
GET /api/levantamientos/:idReturns a single levantamiento by its numeric id, including its concepts and the linked expediente object. Returns 404 if not found.Get by siniestro
GET /api/levantamientos/siniestro/:no_siniestroReturns the most recent levantamiento for the given no_siniestro (ordered by id descending), including its concepts. Returns 404 if none exists.Updating a levantamiento
PUT /api/levantamientos/:id
Performs a partial update on the levantamiento’s own fields. Only include the fields you want to change; all others remain unchanged. The fecha field accepts the same DD/MM/YYYY or YYYY-MM-DD formats as on creation. Any authenticated user may call this endpoint.
404 if not found.
Deleting levantamientos and concepts
Both deletion endpoints require the Administrador role.Delete a levantamiento
DELETE /api/levantamientos/:idDeletes the levantamiento and all its concepts in a single transaction.Delete a single concept
DELETE /api/levantamientos/conceptos/:id_conceptoRemoves one line-item concept without affecting the parent levantamiento or its other concepts.