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.

Create a new damage survey for a vehicle claim. The survey records the vehicle’s condition at intake — its make, model, identification details, which systems are damaged, and any additional notes. Once created, itemized repair cost concepts can be attached via the Conceptos endpoints.

Endpoint

POST /api/levantamientos
Requires a valid Bearer token. All authenticated roles (Administrador, Operador, Tecnico) may create levantamientos.

Request Body

no_siniestro
string
required
The claim number this survey belongs to. Must match the no_siniestro of an existing expediente. If no matching expediente is found, the request returns a 400 error.
fecha
string
Date the survey was conducted. Accepts two formats:
  • ISO format: "2024-01-15" or "2024-01-15T12:00:00Z"
  • Mexican locale format: "15/01/2024"
Stored as a PostgreSQL Date. If omitted, the field is left null.
orden
string
Internal work order number associated with this survey.
marca
string
Vehicle make, e.g. "Toyota", "Nissan".
tipo
string
Vehicle body type, e.g. "Sedán", "SUV", "Pick-up".
modelo
string
Vehicle model name, e.g. "Corolla", "Sentra".
placas
string
License plate number.
kilometraje
string
Odometer reading at the time of the survey, e.g. "84500".
no_puertas
string
Number of doors, e.g. "4" or "2".
color
string
Vehicle color.
serie
string
Vehicle identification number (VIN / número de serie).
eco
string
Internal economic number assigned to the vehicle in the shop.
asegurado_tercero
string
Whether the claim covers the policy holder or a third party. Common values: "Asegurado", "Tercero".
nombre_propietario
string
Full name of the vehicle owner.
telefono
string
Contact phone number of the vehicle owner.
direccion
string
Address of the vehicle owner.
pega
string
Auxiliary sticker or label reference field.
cristales
boolean
Set to true if the glass or windshield is damaged.
aire
boolean
Set to true if the air conditioning system is damaged.
vestiduras
boolean
Set to true if the upholstery is damaged.
rin
boolean
Set to true if one or more wheel rims are damaged.
direccion_veh
boolean
Set to true if the steering system is damaged.
tipo_pintura
boolean
Paint type or paint damage flag.
trasmision
boolean
Set to true if the transmission is damaged.
conceptos
array
An optional array of cost concept objects to create together with the levantamiento in a single request. Each object may contain:
  • concepto (string) — description of the repair item.
  • costo (number) — unit cost as a decimal, e.g. 3500.00.
  • claves (string) — optional item code or SKU.
If omitted or empty, the levantamiento is created with no concepts. Concepts can also be added later via POST /api/levantamientos/:id/conceptos.

Request Example

curl -X POST http://localhost:3000/api/levantamientos \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "no_siniestro": "SIN-2024-001",
    "marca": "Toyota",
    "tipo": "Sedán",
    "modelo": "Corolla",
    "placas": "ABC-1234",
    "kilometraje": "84500",
    "no_puertas": "4",
    "color": "Blanco",
    "serie": "1HGBH41JXMN109186",
    "fecha": "2024-01-15",
    "nombre_propietario": "Juan Pérez",
    "telefono": "5551234567",
    "cristales": true,
    "vestiduras": false,
    "trasmision": true
  }'

Response

201 — Created

Returns the newly created levantamiento object, including the (initially empty) levantamiento_concepto array.
{
  "id": 43,
  "no_siniestro": "SIN-2024-001",
  "fecha": "2024-01-15T12:00:00.000Z",
  "orden": null,
  "marca": "Toyota",
  "tipo": "Sedán",
  "modelo": "Corolla",
  "placas": "ABC-1234",
  "kilometraje": "84500",
  "no_puertas": "4",
  "color": "Blanco",
  "serie": "1HGBH41JXMN109186",
  "eco": null,
  "asegurado_tercero": null,
  "nombre_propietario": "Juan Pérez",
  "telefono": "5551234567",
  "direccion": null,
  "pega": null,
  "cristales": true,
  "aire": null,
  "vestiduras": false,
  "rin": null,
  "direccion_veh": null,
  "tipo_pintura": null,
  "trasmision": true,
  "levantamiento_concepto": []
}

Error Responses

StatusBodyDescription
400{ "error": "no_siniestro es requerido" }The no_siniestro field was missing from the request body.
400{ "error": "No existe un expediente con ese no_siniestro" }The provided no_siniestro does not match any existing expediente.
401Missing or invalid Authorization header.
After creating a levantamiento, use POST /api/levantamientos/:id/conceptos to add itemized repair cost line items, then call GET /api/levantamientos/:id/costo-total to compute the total estimate.

Build docs developers (and LLMs) love