Skip to main content
The Upload API provides endpoints for uploading and managing vehicle-related documents in PDF format.

Base URL

/api/upload

Authentication

Upload endpoints may require authentication depending on your configuration. Check with your system administrator for specific requirements.

File Requirements

  • Format: PDF only
  • Size Limit: 10 MB maximum
  • Content-Type: multipart/form-data

Supported Document Types

The following document types (folders) are supported:
  • soat - Vehicle insurance (SOAT) documents
  • rtm - Technical-mechanical inspection (RTM) documents
  • polizas - Policy documents
  • tarjeta_propiedad - Vehicle ownership card

Storage Structure

Files are stored in Supabase Storage using the following structure:
vehiculos_docs/
  ├── soat/
  │   └── ABC123_2026.pdf
  ├── rtm/
  │   └── ABC123_2026.pdf
  ├── polizas/
  │   └── ABC123_2026.pdf
  └── tarjeta_propiedad/
      └── ABC123_2026.pdf

File Naming Convention

Uploaded files are automatically named using the pattern:
{placa}_{year}.pdf
Where:
  • placa - Vehicle license plate (sanitized, alphanumeric and hyphens only)
  • year - Current year (4 digits)

Error Responses

error
string
Error message describing what went wrong

Common Error Codes

  • 400 - Bad Request (missing file, invalid parameters, or invalid file type)
  • 500 - Internal Server Error (upload or deletion failed)

Example Upload

curl -X POST https://api.example.com/api/upload \
  -H "Content-Type: multipart/form-data" \
  -F "[email protected]" \
  -F "folder=soat" \
  -F "placa=ABC123"

Build docs developers (and LLMs) love