A case represents a vehicle. Use this resource to obtain the `case_id` you'll attach documents to.
| Method | Path | Description |
|---|---|---|
POST | /v1/cases | Create a case, optionally with initial documents |
GET | /v1/cases/{case_id} | Read the case and its documents (with OCR) |
DELETE | /v1/cases/{case_id} | Soft-delete the case |
GET | /v1/cases/{case_id}/names | Names consolidated from all documents |
GET | /v1/cases/{case_id}/vins | Primary VIN and all VINs detected per document |
GET | /v1/cases/{case_id}/plates | License plates detected in the case with vigencia data |
GET | /v1/cases/{case_id}/repuve | REPUVE registration data for the vehicle |
GET | /v1/cases/{case_id}/pedimento | Most recent customs entry (pedimento) result |
POST | /v1/cases/{case_id}/pedimento | Trigger a new customs entry lookup from OCR data |
GET | /v1/cases/{case_id}/rapi | Most recent RAPI (FGJCDMX) criminal activity lookup result |
POST | /v1/cases/{case_id}/rapi | Trigger a new RAPI lookup for the case's primary VIN |
POST | /v1/cases/{case_id}/taxes | Trigger a bulk tenencia lookup for all plates in the case |
GET | /v1/cases/{case_id}/invoices | Invoices with their processing status |
GET | /v1/cases/{case_id}/metadata | Business metadata attached to the case |
POST | /v1/cases/{case_id}/metadata | Append an entry to the metadata history |
POST | /v1/cases/{case_id}/process | Bulk-process the case's documents |
GET | /v1/cases/{case_id}/status | Status of the latest processing job |
/v1/cases — Create a case#Creates a case for a vehicle. You may attach documents in the same call or upload them later.
| Field | Type | Required | Description |
|---|---|---|---|
internal_id | string | Yes | Case identifier on your side. Cannot be empty. |
status | string | Yes | Initial state of the case (e.g. processing, nuevo). |
vehicle_origin | string | No | Nacional (default) or Importado. |
initial_status | string | No | Alternative initial state when a status catalog is configured. |
use_case | UUID | No | Use case for the file when a catalog applies. |
metadata | object | No | Additional business data (see below). |
files | array | No | Documents to upload immediately. |
curl -X POST https://api.nexcar.mx/v1/cases \
-H "x-api-key: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"internal_id": "EXP-2026-0001",
"status": "processing",
"vehicle_origin": "Nacional",
"metadata": {
"numero_siniestro": "128890890",
"tipo_afectado": "TERCERO",
"nombre_afectado": "JUAN PÉREZ GARCÍA"
},
"files": [
{
"url": "https://your-storage.example.com/invoice.pdf",
"mime_type": "application/pdf",
"document_type": "factura"
},
{
"url": "https://your-storage.example.com/owner-id.jpg",
"mime_type": "image/jpeg",
"document_type": "ine"
}
]
}'
{
"internal_id": "EXP-2026-0001",
"status": "processing",
"vehicle_origin": "Nacional",
"metadata": {
"numero_siniestro": "128890890",
"tipo_afectado": "TERCERO",
"nombre_afectado": "JUAN PÉREZ GARCÍA"
},
"files": [
{
"url": "https://your-storage.example.com/invoice.pdf",
"mime_type": "application/pdf",
"document_type": "factura"
},
{
"url": "https://your-storage.example.com/owner-id.jpg",
"mime_type": "image/jpeg",
"document_type": "ine"
}
]
}
201 Created — case created without files:
{ "case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c", "status": "completed" }
202 Accepted — case created with files queued for processing:
{
"case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c",
"job_id": "31b4ecf2-9a0b-4f98-8a91-2ab6e93f4f10",
"total_files": 2,
"status": "processing"
}
| HTTP | Code | Cause |
|---|---|---|
400 | VALIDATION_ERROR | Missing status or empty internal_id |
400 | DUPLICATE_INTERNAL_ID | A case with that internal_id already exists with files |
422 | INVALID_STATUS | status is not part of the configured catalog |
/v1/cases/{case_id}#Returns the case and all of its documents along with their OCR (when available).
curl https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c \
-H "x-api-key: your_api_key"
{
"case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c",
"internal_id": "EXP-2026-0001",
"status": "nuevo",
"vehicle_origin": "Nacional",
"documents": [
{
"document_id": "abc123",
"type": "factura",
"mime_type": "application/pdf",
"url": "https://...nexcar.mx/storage/.../invoice.pdf",
"parsed_data": { "vin": "3VWFE21C04M000001", "monto_total": 285000 }
}
]
}
/v1/cases/{case_id}#Marks the case as inactive. Files are not physically deleted; the case stops appearing in lookups and reports.
curl -X DELETE https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c \
-H "x-api-key: your_api_key"
/v1/cases/{case_id}/process#Queues the bulk processing (OCR + extraction) of the documents in the case. Useful when you uploaded files without type and want to run the flow as a batch.
curl -X POST https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/process \
-H "x-api-key: your_api_key"
{ "job_id": "31b4ecf2-9a0b-4f98-8a91-2ab6e93f4f10", "status": "processing" }
Track progress with GET /v1/cases/{case_id}/status.
/v1/cases/{case_id}/plates#Returns the license plates detected across the case's documents, enriched with VIN, motor number, owner name and — for plates registered in Estado de México — the current vigencia data (status, validity dates and previous plate, when applicable) from the official portal.
The list is built and persisted automatically as part of the case processing pipeline. This endpoint is read-only.
curl https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/plates \
-H "x-api-key: your_api_key"
{
"case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c",
"internal_id": "EXP-2026-0001",
"plates": [
{
"plate": "MJM626C",
"entity": "MEX",
"document_type": "vehicle_certificate",
"document_date": "01/09/2025",
"file_id": "0126537c-8dad-402a-a559-0bbbcafd53a3",
"ocr_id": "f2dd2062-d11d-480b-9c0b-1b6d03b6f1df",
"niv": "JN1BE6DSXS9121418",
"motor_number": "QR258585700Q",
"owner_name": null,
"plate_status": "Vigente",
"plate_valid_from": "01/09/2025",
"plate_valid_until": "01/09/2030",
"previous_plate": null,
"previous_plate_lookup_status": null
}
]
}
| Field | Type | Description |
|---|---|---|
plate | string | Normalized plate number (uppercase, no separators) |
entity | string | Three-letter state code (MEX, NLE, JAL, …) |
document_type | string | Source document: certificate_title, tax_payment, alta_vehicular, vehicle_certificate, vehicle_plate, lumo_checklist or repuve |
document_date | string | Date associated with the source document (DD/MM/YYYY when available) |
niv | string | null | Vehicle VIN (17 chars when available, partial otherwise) |
motor_number | string | null | Engine number from the source document |
owner_name | string | null | Owner as declared in the source document |
plate_status | string | null | Current plate status returned by the portal: Vigente, Vencida or Inactiva |
plate_valid_from | string | null | Start of current plate validity (DD/MM/YYYY) |
plate_valid_until | string | null | End of current plate validity (DD/MM/YYYY) |
previous_plate | string | null | Previous plate number, when one was emitted before the current one |
previous_plate_lookup_status | string | null | Lookup state — see below |
previous_plate_lookup_status values#| Value | Meaning |
|---|---|
null | The lookup does not apply (plate not registered in MEX) or the portal confirmed there is no previous plate |
"pending" | Lookup in progress in background — re-query in a few seconds |
"found" | Portal returned a previous plate (populated in previous_plate) |
"error" | Lookup failed after retries (portal down, parsing error, etc.) |
The same plate may appear in multiple rows when it was detected in more than one document. All rows sharing the same plate value carry the same plate_status, vigencia dates and previous_plate_* fields once the background lookup finishes.
| HTTP | Cause |
|---|---|
404 | Case not found, inactive, or plates have not been computed yet for this case |
/v1/cases/{case_id}/repuve#Returns the most recent REPUVE job for the case. If the job ended in error but a valid response from placas.info is available, the endpoint auto-recovers and returns the correct data.
curl https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/repuve \
-H "x-api-key: your_api_key"
{
"codigo": "ok",
"info": {
"niv": "3N6AD35A9LK875826",
"placa": "Y83BGS",
"marca": "NISSAN",
"modelo": "NP300/NP300 FRONTIER/FRONTIER",
"tipo": "CAB. Y CHASIS ESTACAS",
"clase": "CAMIONETA",
"anio_modelo": 2020,
"entidad_emplacado": "CIUDAD DE MEXICO",
"fecha_inscripcion": "22/09/20",
"fecha_actualizacion": "12/10/24",
"reporte_robo": [
{ "tipo_reporte": "FGJ", "estatus": "SIN REPORTE DE ROBO" },
{ "tipo_reporte": "OCRA", "estatus": "SIN REPORTE DE ROBO" }
],
"robo_usa_can": { "tiene_robo": false },
"aviso_judicial": { "tiene_aviso_judicial": false }
},
"job_id": "4a201139-7945-4ae7-8a17-dc8e048c7437",
"job_status": "completed"
}
| Field | Type | Description |
|---|---|---|
codigo | string | ok — REPUVE data available. error — all sources failed. processing — job still in progress. |
info | object | null | Vehicle registration data from REPUVE. null when the vehicle is not registered or the job has not completed yet. |
info.niv | string | Vehicle identification number (VIN) |
info.placa | string | null | License plate on record in REPUVE |
info.marca | string | Make |
info.modelo | string | Model |
info.anio_modelo | integer | Model year |
info.entidad_emplacado | string | null | State where the plate was registered |
info.fecha_inscripcion | string | null | REPUVE registration date |
info.fecha_actualizacion | string | null | Last update date in REPUVE |
info.reporte_robo | array | Theft reports from FGJ and OCRA sources |
info.robo_usa_can | object | USA/Canada theft report status |
info.aviso_judicial | object | Judicial notice status |
job_id | UUID | Internal job identifier |
job_status | string | completed, error, processing or pending |
| HTTP | Cause |
|---|---|
404 | Case not found, inactive, or no REPUVE query has been run for this case |
/v1/cases/{case_id}/pedimento#Returns the most recent customs entry (pedimento) result for the case. Data is read from pedimento_responses (legacy pipeline) and processing_jobs (v1 API), deduplicated by content, and sorted by recency.
curl https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/pedimento \
-H "x-api-key: your_api_key"
{
"case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c",
"job_id": "4a201139-7945-4ae7-8a17-dc8e048c7437",
"status": "completed",
"source": "processing_jobs",
"result": {
"success": true,
"data": { "pedimento": "39317003384", "aduana": "MANZANILLO", "vin": "LUCGM6669J3104807" }
}
}
| HTTP | Cause |
|---|---|
404 | Case not found, inactive, or no pedimento query has been run for this case. Call POST /v1/cases/{id}/pedimento first. |
/v1/cases/{case_id}/taxes (without ?plate)#Returns all tenencia results for every plate in the case, grouped by plate. Results are read from processing_jobs across all sources (background pipeline and on-demand v1).
When ?plate is supplied the original single-plate behavior is used unchanged — see the existing documentation.
curl https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/taxes \
-H "x-api-key: your_api_key"
{
"case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c",
"plates_count": 2,
"taxes": [
{
"plate": "MES452A",
"job_id": "abc123",
"status": "completed",
"source": "api_v1_cases_taxes_bulk",
"result": { "codigo": "ok", "info": [...] },
"created_at": "2026-06-05T10:00:00+00:00"
}
]
}
/v1/cases/{case_id}/taxes#Triggers a bulk tenencia lookup for all unique plates in the case (main plates + previous plates), using GET /v1/cases/:id/plates data internally (no HTTP). One processing_jobs child row is created per plate, each with its own job_id, external_payload and external_response. The workflow runs in Temporal (invoice-background-queue).
curl -X POST https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/taxes \
-H "x-api-key: your_api_key"
202 Accepted#{
"job_id": "31b4ecf2-9a0b-4f98-8a91-2ab6e93f4f10",
"plates": ["MES452A", "NDJ3622"],
"status": "pending"
}
Poll GET /v1/cases/{case_id}/taxes (without ?plate) to see the results per plate as they complete.
| HTTP | Cause |
|---|---|
400 | No plates found for this case. Call POST /v1/cases/{id}/plates first. |
404 | Case not found or inactive |
/v1/cases/{case_id}/pedimento#Triggers a new customs entry lookup using data extracted from the OCR of the case's primary document (the invoice linked to the main VIN). Runs asynchronously in Temporal. Returns a job_id immediately; poll GET /v1/cases/{id}/pedimento for the result.
The required parameters (aduana, ano_vehiculo) are read from the OCR automatically. If they are not present in the document, the endpoint returns a 400 listing the missing fields.
curl -X POST https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/pedimento \
-H "x-api-key: your_api_key"
202 Accepted#{ "job_id": "4a201139-7945-4ae7-8a17-dc8e048c7437", "status": "pending" }
| HTTP | Cause |
|---|---|
400 | No primary VIN found, or required OCR fields (aduana, ano_vehiculo) are missing |
404 | Case not found or inactive |
/v1/cases/{case_id}/rapi#Returns the most recent RAPI (FGJCDMX criminal activity registry) lookup result for the case. Data is read from rapi_responses (legacy pipeline) and processing_jobs (v1 API), deduplicated by content, and sorted by recency.
curl https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/rapi \
-H "x-api-key: your_api_key"
{
"case_id": "7040fd87-5f49-4187-b2a3-b4a19670825c",
"job_id": "4a201139-7945-4ae7-8a17-dc8e048c7437",
"status": "completed",
"source": "processing_jobs",
"result": { ... }
}
| HTTP | Cause |
|---|---|
404 | Case not found, inactive, or no RAPI query has been run. Call POST /v1/cases/{id}/rapi first. |
/v1/cases/{case_id}/rapi#Triggers a RAPI lookup for the case's primary VIN (from GET /v1/cases/:id/vins). Runs asynchronously in Temporal (invoice-background-queue). Returns a job_id immediately.
curl -X POST https://api.nexcar.mx/v1/cases/7040fd87-5f49-4187-b2a3-b4a19670825c/rapi \
-H "x-api-key: your_api_key"
202 Accepted#{ "job_id": "4a201139-7945-4ae7-8a17-dc8e048c7437", "vin": "3N6AD35A9LK875826", "status": "pending" }
| HTTP | Cause |
|---|---|
400 | No primary VIN found. Process documents first with POST /v1/cases/{id}/process. |
404 | Case not found or inactive |