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.

Update any field on an existing damage survey. Only send the fields you want to change — all omitted fields retain their current values. The response returns the complete updated record so you can confirm the new state without a follow-up GET.

Endpoint

PUT /api/levantamientos/:id
Requires a valid Bearer token. All authenticated roles (Administrador, Operador, Tecnico) may update levantamientos.
This endpoint does not modify attached cost concepts. To add or remove concepts, use the Conceptos endpoints.

Path Parameters

id
integer
required
The numeric primary key of the levantamiento to update. Must parse as a valid integer.

Request Body

Send any subset of the fields below. All are optional in an update request.
no_siniestro
string
Reassign the levantamiento to a different siniestro / expediente.
fecha
string
Updated survey date. Accepts "YYYY-MM-DD" or "DD/MM/YYYY" format.
orden
string
Work order reference.
marca
string
Vehicle make.
tipo
string
Vehicle body type.
modelo
string
Vehicle model name.
placas
string
License plate number.
kilometraje
string
Odometer reading.
no_puertas
string
Number of doors.
color
string
Vehicle color.
serie
string
Vehicle identification number (VIN).
eco
string
Internal economic number.
asegurado_tercero
string
Policy holder or third party indicator.
nombre_propietario
string
Vehicle owner’s full name.
telefono
string
Owner’s contact phone.
direccion
string
Owner’s address.
pega
string
Sticker or label reference.
cristales
boolean
Glass / windshield damage flag.
aire
boolean
A/C system damage flag.
vestiduras
boolean
Upholstery damage flag.
rin
boolean
Rim damage flag.
direccion_veh
boolean
Steering system damage flag.
tipo_pintura
boolean
Paint type / paint damage flag.
trasmision
boolean
Transmission damage flag.

Request Example

curl -X PUT http://localhost:3000/api/levantamientos/42 \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"kilometraje": "85000", "trasmision": true}'

Response

200 — Success

Returns the full updated levantamiento object, including the unchanged levantamiento_concepto array.
{
  "id": 42,
  "no_siniestro": "SIN-2024-001",
  "fecha": "2024-01-15T12:00:00.000Z",
  "orden": "ORD-0042",
  "marca": "Toyota",
  "tipo": "Sedán",
  "modelo": "Corolla",
  "placas": "ABC-1234",
  "kilometraje": "85000",
  "no_puertas": "4",
  "color": "Blanco",
  "serie": "1HGBH41JXMN109186",
  "eco": "ECO-042",
  "asegurado_tercero": "Asegurado",
  "nombre_propietario": "Juan Pérez",
  "telefono": "5551234567",
  "direccion": "Calle Reforma 123, CDMX",
  "pega": null,
  "cristales": true,
  "aire": false,
  "vestiduras": false,
  "rin": false,
  "direccion_veh": false,
  "tipo_pintura": true,
  "trasmision": true,
  "levantamiento_concepto": [
    {
      "id": 7,
      "id_levantamiento": 42,
      "claves": "CR-001",
      "concepto": "Cambio de parabrisas",
      "costo": "3500.00"
    }
  ]
}

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.

Build docs developers (and LLMs) love