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.

Monitor API provides two ways to look up a single damage survey — by its auto-incremented integer ID, or by the related siniestro number. Both routes are protected by Bearer token authentication and available to all authenticated roles.
The /siniestro/:no_siniestro route is registered in Express before /:id in the route file, so it is matched first and the two routes never conflict. Always use the explicit /siniestro/ prefix when looking up by claim number.

Get by ID

GET /api/levantamientos/:id
Returns the full levantamiento record including its nested levantamiento_concepto array and the related expediente.

Path Parameters

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

Request Example

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

Response

200 — Success

Returns the matching levantamiento object with nested concepts and expediente.
{
  "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": "84500",
  "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": false,
  "levantamiento_concepto": [
    {
      "id": 7,
      "id_levantamiento": 42,
      "claves": "CR-001",
      "concepto": "Cambio de parabrisas",
      "costo": "3500.00"
    }
  ],
  "expediente": {
    "no_siniestro": "SIN-2024-001",
    "factura": null,
    "orden": "ORD-0042",
    "asesor": "Carlos López",
    "fecha_ingreso": "2024-01-10T12:00:00.000Z",
    "fecha_valuacion": null,
    "fecha_autorizacion": null,
    "fecha_pzas_completas": null,
    "unidad_terminada": null,
    "tecnico": null,
    "mecanico": null,
    "vehiculo": null,
    "observaciones": null,
    "marca": "Toyota",
    "placas": "ABC-1234",
    "tipo": "Sedán",
    "color": "Blanco",
    "modelo": "Corolla",
    "nombre_cliente": "Juan Pérez",
    "telefono_cliente": "5551234567",
    "correo_cliente": null,
    "dato1": null,
    "dato1_fecha_hora": null,
    "dato2": null,
    "dato2_fecha_hora": null,
    "dato3": null,
    "dato3_fecha_hora": null,
    "dato4": null,
    "dato4_fecha_hora": null,
    "comentarios_aseguradora": null,
    "comentarios_aseguradora_fh": null,
    "doc_orden_admision": null,
    "doc_identificacion": null,
    "doc_tarjeta_circulacion": null,
    "doc_caratula_poliza": null,
    "doc_carta_reparacion": null,
    "doc_comprobante_deducible": null,
    "doc_finiquito": null,
    "doc_encuesta_servicio": null,
    "estado": "Restauracion",
    "ubicacion_almacenamiento": "Local",
    "id_aseguradora": null,
    "creado_por": 1
  }
}

Error Responses

StatusBodyDescription
400{ "error": "id inválido" }The :id path segment is not a valid integer.
401Missing or invalid Bearer token.
404{ "error": "Levantamiento no encontrado" }No levantamiento exists with that ID.

Get by Siniestro Number

GET /api/levantamientos/siniestro/:no_siniestro
Returns the most recent levantamiento associated with the given siniestro number. When multiple surveys exist for the same claim, only the one with the highest id is returned.

Path Parameters

no_siniestro
string
required
The siniestro (claim) number to look up. Must match the no_siniestro field on a levantamiento record.Example: SIN-2024-001

Request Example

curl http://localhost:3000/api/levantamientos/siniestro/SIN-2024-001 \
  -H "Authorization: Bearer $TOKEN"

Response

200 — Success

Returns the most recent levantamiento for the given siniestro number, with nested levantamiento_concepto.
{
  "id": 42,
  "no_siniestro": "SIN-2024-001",
  "fecha": "2024-01-15T12:00:00.000Z",
  "marca": "Toyota",
  "modelo": "Corolla",
  "levantamiento_concepto": [
    {
      "id": 7,
      "id_levantamiento": 42,
      "claves": "CR-001",
      "concepto": "Cambio de parabrisas",
      "costo": "3500.00"
    }
  ]
}

Error Responses

StatusBodyDescription
401Missing or invalid Bearer token.
404{ "error": "No existe levantamiento para este siniestro" }No levantamiento is linked to the provided siniestro number.

Build docs developers (and LLMs) love