Vintraxx API

OBD-II Vehicle Diagnostic & Appraisal System

Base URL: https://api.vintraxx.com/api/v1

Authentication

Protected endpoints require a Bearer token in the Authorization header: Authorization: Bearer <token>

Authentication

/api/v1/auth

POST /check-email Check if email is registered. Body: { email }
POST /send-otp Send OTP to email for verification. Body: { email }
POST /verify-otp Verify OTP code. Body: { email, otp }
POST /register Register new user. Body: { email, password, isDealer?, pricePerLaborHour?, logoUrl?, qrCodeUrl? }
POST /login Login user. Body: { email, password, isDealer?, pricePerLaborHour? }
POST /forgot-password Request password reset. Body: { email }
POST /reset-password Reset password with token. Body: { token, password }
POST /google Google OAuth authentication. Body: { idToken }
POST /microsoft Microsoft OAuth authentication. Body: { accessToken }

Scan Management

/api/v1/scan

POST /submit Submit OBD-II scan data. Body: { vin, mileage, milStatus, storedDtcCodes[], pendingDtcCodes[], permanentDtcCodes[], scanDate, scannerDeviceId?, stockNumber?, additionalRepairs[]? } Requires Auth
GET /report/:scanId Get scan report. Poll until status is 'completed' or 'failed'. Returns full report data with DTC analysis, repair costs, and PDF URL. Requires Auth
GET /scanner-owner/:deviceId Get owner information for a scanner device by device ID. Requires Auth
GET /history Get user's scan history. Returns list of scans with vehicle info and status. Requires Auth

Dealer Portal

/api/v1/dealer

POST /login Dealer-only login. Body: { email, password }. Returns error if account is not a dealer.
GET /profile Get dealer profile (email, pricePerLaborHour, logoUrl, qrCodeUrl). Dealer Only
PUT /profile Update dealer settings. Body: { pricePerLaborHour?, logoImage?, qrCodeImage?, password? }. Password required when updating qrCodeImage. Dealer Only
GET /reports Get all dealer scan reports with repair costs, PDF URLs, and stock numbers. Dealer Only
GET /scan-history Get scan history with statistics for dashboard. Returns health scores, monthly activity, and distribution charts. Dealer Only
GET /report/:scanId Get detailed report for single scan. Returns full DTC analysis, emissions check, repair recommendations, and costs. Dealer Only
POST /schedule-appointment Schedule service appointment. Body: { vehicleInfo, date, time, notes }. Sends email to john@vintraxx.com. Dealer Only
POST /send-email Send custom email from dealer portal. Body: { to, subject, html }. Dealer Only
GET /appointments Get service appointment activity history for dealer. Dealer Only
PATCH /appointments/:id/complete Mark appointment as completed. Dealer Only

Vehicle Appraisal

/api/v1/appraisal

POST /valuate Get AI-based vehicle valuation. Body: { vin, year, make, model, trim?, mileage, condition, zipCode, notes? }. Returns wholesale/trade-in/retail ranges with confidence. Requires Auth
POST /email Send appraisal summary via email. Body: { toEmail, appraisalData } Requires Auth
POST /pdf Generate PDF and send via email. Body: { toEmail, appraisalData } Requires Auth
GET /dashboard Get all user's appraisals for dashboard display. Requires Auth
GET /dashboard/:appraisalId Get single appraisal by ID. Requires Auth

Vehicle Inspection

/api/v1/inspection

GET /list Get all user's vehicle inspections. Requires Auth
POST /create Create new inspection. Body: { vehicleInfo?, vin?, mileage?, color?, inspector?, date?, ratings?, damageMarks[]? } Requires Auth
GET /:id Get single inspection by ID. Requires Auth
DELETE /:id Delete inspection by ID. Requires Auth

GPS Telemetry

/api/v1/gps

GET /terminals Get all GPS terminals owned by the authenticated user. Requires Auth
GET /terminals/:id Get detailed information for a specific GPS terminal. Requires Auth
GET /terminals/:id/latest Get the latest location/status for a terminal. Requires Auth
GET /terminals/:id/locations Get location history for a terminal with pagination. Requires Auth
PATCH /terminals/:id/label Rename a terminal. Body: { label }. Requires Auth
POST /terminals/:id/locate Request immediate location update from terminal. Requires Auth
GET /terminals/:id/trips Get trip history for a terminal. Requires Auth
GET /terminals/:id/trips/:tripId Get detailed trip information. Requires Auth
GET /terminals/:id/stats Get daily statistics for a terminal. Requires Auth
GET /alarms Get alarms for user's terminals with filtering. Requires Auth
GET /alarms/:id Get detailed alarm information. Requires Auth
POST /alarms/:id/ack Acknowledge an alarm. Body: { notes? }. Requires Auth
GET /dtc-events Get DTC events from GPS terminals with filtering. Requires Auth
GET /dtc-events/:id Get detailed DTC event information. Requires Auth
POST /dtc-events/:id/analyze Generate AI report from GPS DTC event. Promotes to Scan. Requires Auth
POST /devices/push-token Register FCM push token for mobile notifications. Body: { token }. Requires Auth
DELETE /devices/push-token Delete FCM push token. Requires Auth

Admin Portal

/api/v1/admin

POST /login Admin login. Body: { email, password }.
GET /profile Get admin profile information. Admin Only
PUT /password Change admin password. Body: { currentPassword, newPassword }. Admin Only
POST /email-change/send-otp Send OTP for email change. Body: { newEmail }. Admin Only
POST /email-change/verify Verify email change with OTP. Body: { newEmail, otp }. Admin Only
GET /dashboard Get admin dashboard statistics. Admin Only
GET /users List all users with pagination and filtering. Admin Only
GET /users/:id Get detailed user information. Admin Only
POST /users Create new user. Body: { email, password, role, ... }. Admin Only
PUT /users/:id Update user information. Admin Only
DELETE /users/:id Delete user account. Admin Only
GET /scans List all scans with pagination. Admin Only
GET /scans/:id Get detailed scan information. Admin Only
DELETE /scans/:id Delete scan record. Admin Only
GET /inspections List all inspections. Admin Only
DELETE /inspections/:id Delete inspection. Admin Only
GET /appraisals List all appraisals. Admin Only
GET /appraisals/:id Get detailed appraisal information. Admin Only
DELETE /appraisals/:id Delete appraisal. Admin Only
GET /service-appointments List all service appointments. Admin Only
PATCH /service-appointments/:id/complete Mark service appointment as completed. Admin Only
DELETE /service-appointments/:id Delete service appointment. Admin Only
POST /send-email Send email from admin. Body: { to, subject, html }. Admin Only
POST /verify-password Verify admin password. Body: { password }. Admin Only
GET /backup Generate database backup. Admin Only
GET /gps/stats/overview Get GPS telemetry overview statistics. Admin Only
GET /gps/terminals List all GPS terminals. Admin Only
POST /gps/terminals Provision new GPS terminal. Body: { terminalId, ownerId, label }. Admin Only
GET /gps/terminals/:id Get detailed terminal information. Admin Only
PATCH /gps/terminals/:id/owner Reassign terminal to different owner. Body: { newOwnerId }. Admin Only
POST /gps/terminals/:id/unpair Unpair terminal from owner. Admin Only
DELETE /gps/terminals/:id Delete terminal (super-admin only). Super Admin Only
GET /gps/terminals/:id/latest Get latest location/status for terminal. Admin Only
GET /gps/terminals/:id/locations Get location history for terminal. Admin Only
GET /gps/terminals/:id/obd Get OBD data history for terminal. Admin Only
GET /gps/alarms List all alarms with filtering. Admin Only
GET /gps/alarms/:id Get detailed alarm information. Admin Only
POST /gps/alarms/:id/ack Acknowledge alarm. Body: { notes? }. Admin Only
POST /gps/alarms/ack-bulk Bulk acknowledge multiple alarms. Body: { alarmIds[], notes? }. Admin Only
GET /gps/dtc-events List all DTC events with filtering. Admin Only
GET /gps/dtc-events/:id Get detailed DTC event information. Admin Only
POST /gps/dtc-events/:id/analyze Generate AI report from DTC event. Promotes to Scan. Admin Only
GET /gps/trips List all trips with filtering. Admin Only
GET /gps/trips/:id Get detailed trip information. Admin Only
GET /gps/stats/daily Get daily GPS statistics. Admin Only
POST /gps/terminals/:id/commands Enqueue command to terminal. Body: { commandType, params }. Admin Only
GET /gps/commands List all commands with filtering. Admin Only
GET /gps/commands/:id Get detailed command information. Admin Only
GET /audit-logs List admin audit logs with filtering. Admin Only

Schedule

/api/v1/schedule

POST /submit Submit service appointment request. Body: { vehicleInfo, date, time, notes }. Requires Auth

Debug

/api/v1/debug

POST /client-log Upload batched mobile log entries for debugging. Body: { logs[] }. Requires Auth

System

Health & Status

GET /api/v1/health Health check endpoint. Returns { status: 'ok', smtp, timestamp }.