VromSync
Integra una vez. Publica en todos lados.
API versionada para DMS y dealers: inventario, sync a marketplaces y webhooks — con auth multi-tenant.
Quickstart
- Configura
.env.local(ver.env.example). - Crea un API key abajo (bootstrap o Bearer con keys:manage).
- Llama
GET /api/v1/vehiclesconAuthorization: Bearer vs_….
curl -H "Authorization: Bearer vs_YOUR_KEY" \ -H "X-Correlation-Id: $(uuidgen)" \ http://localhost:3000/api/v1/vehicles
Referencia API
Catálogo vivo también en /api/v1/openapi.
- POST/api/v1/auth/token
OAuth2 client_credentials → access token
- GET/api/v1/auth/api-keys
List API keys (masked) for the dealer
scopes: keys:manage
- POST/api/v1/auth/api-keys
Issue a new API key (shown once)
scopes: keys:manage
- GET/api/v1/me
Current session identity (dealer, email, scopes)
- GET/api/v1/vehicles
List inventory for the authenticated dealer
scopes: inventory:read
- POST/api/v1/vehicles
Create a vehicle
scopes: inventory:write
- POST/api/v1/vehicles/{id}/sync
Enqueue sync for a single vehicle across active connections
scopes: integrations:manage
- GET/api/v1/connectors
List available connectors (adapter catalog)
- GET/api/v1/dealers
List dealers in the authenticated organization
- GET/api/v1/users
List portal users in the authenticated organization
- PATCH/api/v1/users/{id}
Reassign a portal user to another dealer in the same organization
- GET/api/v1/connections
List dealer connections to connectors
scopes: integrations:manage
- POST/api/v1/connections
Create a connection (dealer ↔ connector)
scopes: integrations:manage
- GET/api/v1/connections/{id}
Get a connection by id
scopes: integrations:manage
- POST/api/v1/connections/{id}/leads/inbound
Receive a marketplace lead via the connection adapter (HMAC or API key)
- POST/api/v1/sync
Enqueue sync to active Connections (optional drain)
scopes: integrations:manage
- GET/api/v1/sync/jobs
List sync jobs for the authenticated dealer
scopes: integrations:manage
- GET/api/v1/sync/jobs/{id}
Get sync job status by id
scopes: integrations:manage
- GET/api/v1/audit-logs
Audit trail for the authenticated dealer
scopes: integrations:manage
- GET/api/v1/publications
List publications (vehicle × connection state) for the dealer
scopes: integrations:manage
- POST/api/v1/publications
Create a draft publication (vehicle × connection); optionally enqueue sync
scopes: inventory:write
- PATCH/api/v1/publications/{id}
Update publication status (paused | sold | published)
scopes: inventory:write
- POST/api/v1/publications/{id}/sync
Enqueue sync for a draft/paused publication to its connection
scopes: integrations:manage
- GET/api/v1/webhooks
List webhook subscriptions
scopes: webhooks:manage
- POST/api/v1/webhooks
Register outbound webhook
scopes: webhooks:manage
- DELETE/api/v1/webhooks/{id}
Delete a webhook subscription
scopes: webhooks:manage
- GET/api/v1/webhooks/deliveries
List recent webhook delivery attempts for the dealer
scopes: webhooks:manage
- POST/api/v1/webhooks/deliveries/{id}/retry
Retry a failed webhook delivery
scopes: webhooks:manage
- GET/api/v1/vehicles/{id}
Get a vehicle by id
scopes: inventory:read
- PATCH/api/v1/vehicles/{id}
Partial update of a vehicle (price, mileage, saleStatus, images…)
scopes: inventory:write
- DELETE/api/v1/vehicles/{id}
Soft-delete a vehicle (marks as deleted, pauses publications)
scopes: inventory:write
- PUT/api/v1/inventory/vehicles/{vehicleId}
Create or replace a vehicle; vehicleId is the integrator sourceVehicleId
scopes: inventory:write
- GET/api/v1/leads
List leads for the authenticated dealer
scopes: inventory:read
- POST/api/v1/leads
Create a lead manually (for testing or CRM bridge)
scopes: integrations:manage
- GET/api/v1/leads/{id}
Get a lead by id
scopes: inventory:read
- PATCH/api/v1/leads/{id}
Assign lead to user or record a response
scopes: integrations:manage
- GET/api/v1/notifications
Recent notification-worthy events (sync.succeeded, sync.failed, lead.received) for the dealer
- POST/api/v1/media
Upload a vehicle image (multipart/form-data, max 8 MB); returns a URL
scopes: inventory:write
- POST/api/v1/connections/{id}/sync
Run inbound remote sync (pull DMS/API → canonical). With Cloud Tasks: 202 + syncRunId (poll GET /sync/runs). Otherwise 200 with counts/errors
scopes: integrations:manage
- GET/api/v1/connections/{id}/health
Check connection health (marketplace adapter or remote connector registry)
scopes: integrations:manage
- POST/api/v1/connections/{id}/reconcile
Fetch remote inventory and reconcile against local publications
scopes: integrations:manage
- GET/api/v1/stats
Aggregated dashboard statistics for the dealer
- GET/api/v1/sync/runs
List recent sync runs (batch summaries) for the dealer
scopes: integrations:manage
- GET/api/v1/sync/runs/{id}
Get one sync run by id (poll async inbound remote sync)
scopes: integrations:manage
- GET/api/v1/sync/jobs/{id}/attempts
List all sync attempts for a specific sync job
scopes: integrations:manage
- GET/api/v1/connect/acquisition/template.csv
Download official bulk-import CSV template
scopes: inventory:read
- POST/api/v1/connect/acquisition/preview
Upload file → preview session (multipart file). Rejects unsafe files: FILE_REJECTED / MALWARE_DETECTED (422), SCAN_TIMEOUT (503)
scopes: inventory:read
- POST/api/v1/connect/acquisition/import
Confirm import session (sync ≤50 actionable rows → 201; else async job → 202)
scopes: inventory:write
- GET/api/v1/connect/acquisition/jobs/{id}
Poll import job (progress includes batchSize / batchesCompleted / batchesTotal)
scopes: inventory:read
- GET/api/v1/openapi
VromSync OpenAPI 3.0 spec (this document)
- GET/api/v1/openapi/vrom-partner
OpenAPI 3.1 spec del contrato que VROM.cl debe implementar (para el equipo técnico del partner)
API keys
Genera una clave sandbox. El valor en claro solo se muestra una vez.
Sandbox
Prueba endpoints contra esta instancia. Usa una API key de desarrollo.
Guías: docs/auth-setup.md, docs/webhooks-setup.md, docs/observability-setup.md.