API Documentation
Integrate vehicle checks directly into your applications with our REST API
API Access Requirements
All 4 requirements must be met before you can use the API
1. Minimum £100 Balance
Your account must maintain at least £100 credit to use the API
2. Saved Payment Card
A payment method must be saved on your account for automatic billing
3. Auto Top-Up Enabled
Auto top-up must be configured to ensure uninterrupted service
4. API Key Generated
Generate an API key from your Settings page
Why these requirements? API access is designed for high-volume integrations. The saved card and auto top-up ensure your service runs continuously without manual intervention. Every API check appears in your reports, billing transactions, and audit trail.
Quick Start
Get up and running with the CheckVehicles API in minutes
Base URL
All API endpoints are relative to this base URL.
Authentication
All API requests require authentication using a Bearer token. Include your API key in theAuthorizationheader.
Sandbox Mode
Test your integration without consuming credits
Sign In Required
How it works:
- Enable sandbox mode above or in Settings
- Use your API key for both sandbox and live requests
- Sandbox requests return cached data from 10 real vehicles
- No credits are consumed for sandbox requests
- Responses include
_sandbox: true
Get Sandbox Vehicles
Returns a list of available sandbox test registrations and VINs. Use these with sandbox mode enabled for free testing.
Check Types & Pricing
API pricing is based on your spend tier - prices shown are from the best tier (Diamond)
maxi150+ data points including valuation and MOT history
maxi-plusComplete check including finance, stolen, write-off
Data Points Reference
Complete breakdown of all data returned by each check type
Everything in Maxi plus comprehensive security checks, finance records, ownership history, and enhanced specifications.
Code Examples
Copy and paste these examples to get started
curl -X POST "https://yctsicokfslyvibcoyza.supabase.co/functions/v1/api/v1/check" \
-H "Authorization: Bearer cv_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"registration": "AB12 CDE", "type": "maxi-plus"}'Endpoints
/v1/checkRun a vehicle check and deduct credits from your balance
Parameters
registrationtypeResponse Example
{
"success": true,
"report_id": "550e8400-e29b-41d4-a716-446655440000",
"registration": "AB12CDE",
"check_type": "maxi-plus",
"data": {
"make": "BMW",
"model": "3 Series",
"year": 2019,
"colour": "Black",
"fuelType": "Diesel",
"vin": "WBAXXXXXXXX",
"valuation": {
"dealerForecourt": 18500,
"tradeRetail": 16200,
"privateClean": 17000
},
"stolenCheck": { "isStolen": false },
"financeRecords": [],
"writeOffRecords": []
},
"balance": {
"before": 100.00,
"after": 97.25,
"currency": "GBP",
"low_balance_warning": false
}
}/v1/reportsList all your vehicle reports with pagination
Parameters
limitoffsetsourceResponse Example
{
"reports": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"registration": "AB12CDE",
"make": "BMW",
"model": "3 Series",
"year": 2019,
"check_type": "full",
"source": "api",
"created_at": "2024-01-15T10:30:00Z"
}
],
"total": 42,
"limit": 20,
"offset": 0
}/v1/reports/:idGet a specific report by ID with full data
Parameters
idResponse Example
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"registration": "AB12CDE",
"make": "BMW",
"model": "3 Series",
"year": 2019,
"check_type": "full",
"status": "completed",
"source": "api",
"data": { ... },
"created_at": "2024-01-15T10:30:00Z"
}/v1/balanceGet your current credit balance (simple endpoint)
Response Example
{
"balance": 97.25,
"currency": "GBP"
}/v1/billingGet comprehensive billing information including balance, auto top-up settings, and payment status
Response Example
{
"balance": 97.25,
"currency": "GBP",
"auto_topup": {
"enabled": true,
"threshold": 25,
"amount": 100
},
"payment_method": {
"has_card": true,
"last4": "4242",
"brand": "visa",
"exp_month": 12,
"exp_year": 2027
},
"requirements": {
"min_balance": 100,
"topup_threshold": 20
},
"status": {
"api_enabled": true,
"failure_count": 0,
"last_failure_at": null,
"disabled_reason": null
},
"spend_tier": "standard"
}/v1/billing/auto-topupEnable or configure auto top-up settings via API
Parameters
enabledthresholdamountResponse Example
{
"success": true,
"auto_topup": {
"enabled": true,
"threshold": 25,
"amount": 100
},
"message": "Auto top-up settings updated"
}/v1/billing/topupTrigger a manual top-up using your saved payment method
Parameters
amountResponse Example
{
"success": true,
"amount": 50,
"balance": {
"before": 25.00,
"after": 75.00
},
"payment_id": "pi_abc123...",
"currency": "GBP"
}Error Codes
Common error responses and their meanings
MISSING_API_KEYINVALID_API_KEYKEY_REVOKEDAPI_ACCESS_DISABLEDPAYMENT_METHOD_REQUIREDAUTO_TOPUP_REQUIREDINSUFFICIENT_BALANCEINSUFFICIENT_CREDITSRATE_LIMITEDVEHICLE_NOT_FOUNDNOT_FOUNDTOPUP_FAILEDINVALID_TOPUP_AMOUNTTHRESHOLD_TOO_LOWWALLET_NOT_FOUNDUPDATE_FAILEDResponse Schema
Complete type definitions for API responses - copy into your project for type-safe integration
// ===== API Response Types =====
/** Main check response wrapper */
interface VehicleCheckResponse {
success: boolean;
report_id: string;
registration: string;
check_type: 'maxi' | 'maxi-plus';
data: VehicleData;
balance: BalanceInfo;
}
/** Balance information returned with each check */
interface BalanceInfo {
before: number;
after: number;
currency: 'GBP';
low_balance_warning: boolean;
}
/** Complete vehicle data structure */
interface VehicleData {
// Identity
make: string;
model: string;
year: number;
colour: string;
vin?: string; // Partial VIN for Maxi, full for Maxi-Plus
// Registration & Tax
registrationDate: string; // ISO date
taxStatus: 'Taxed' | 'SORN' | 'Untaxed';
taxDueDate?: string;
motExpiryDate?: string;
// Technical
fuelType: string;
engineSize?: number; // cc
transmission?: string;
bodyType?: string;
doors?: number;
co2Emissions?: number;
euroStatus?: string;
// Valuations (9-band)
valuation?: ValuationData;
// MOT History
motHistory?: MOTRecord[];
// EV Data (if applicable)
evData?: EVData;
// Maxi-Plus Only Fields
stolenCheck?: StolenCheckResult;
financeRecords?: FinanceRecord[];
writeOffRecords?: WriteOffRecord[];
keeperHistory?: KeeperRecord[];
plateChanges?: PlateChange[];
ncapRating?: NCAPRating;
performanceData?: PerformanceData;
dimensions?: DimensionsData;
}
/** 9-band valuation data */
interface ValuationData {
dealerForecourt: number;
tradeRetail: number;
tradeAverage: number;
privateClean: number;
privateAverage: number;
auction: number;
partExchange: number;
futureValue3Months?: number;
futureValue6Months?: number;
futureValue12Months?: number;
valuationDate: string;
}
/** Individual MOT test record */
interface MOTRecord {
testDate: string;
expiryDate?: string;
result: 'PASS' | 'FAIL';
odometerValue: number;
odometerUnit: 'mi' | 'km';
testNumber: string;
defects?: MOTDefect[];
advisories?: MOTDefect[];
}
interface MOTDefect {
text: string;
type: 'DANGEROUS' | 'MAJOR' | 'MINOR' | 'ADVISORY';
dangerous?: boolean;
}
/** EV-specific data */
interface EVData {
batteryCapacity?: number; // kWh
wltpRange?: number; // miles
realWorldRange?: number; // miles
chargingSpeedAC?: number; // kW
chargingSpeedDC?: number; // kW
connectorTypes?: string[];
chargeTime0to100AC?: number; // hours
chargeTime10to80DC?: number; // minutes
}
/** Stolen vehicle check result (Maxi-Plus) */
interface StolenCheckResult {
isStolen: boolean;
stolenDate?: string;
policeReference?: string;
policeForce?: string;
}
/** Outstanding finance record (Maxi-Plus) */
interface FinanceRecord {
agreementType: 'HP' | 'PCP' | 'Lease' | 'Other';
agreementId: string;
financerName: string;
financerContact?: string;
startDate?: string;
endDate?: string;
}
/** Insurance write-off record (Maxi-Plus) */
interface WriteOffRecord {
category: 'A' | 'B' | 'S' | 'N';
recordedDate: string;
insurer?: string;
lossType?: string;
}
/** Keeper/owner history (Maxi-Plus) */
interface KeeperRecord {
dateFrom: string;
dateTo?: string;
keeperNumber: number;
isCurrentKeeper: boolean;
}
/** Registration plate change (Maxi-Plus) */
interface PlateChange {
previousPlate: string;
newPlate: string;
changeDate: string;
}
/** NCAP safety rating (Maxi-Plus) */
interface NCAPRating {
overallRating: number; // 0-5 stars
adultOccupant: number; // percentage
childOccupant: number;
pedestrian: number;
safetyAssist: number;
testYear?: number;
}
/** Performance specifications (Maxi-Plus) */
interface PerformanceData {
powerBHP?: number;
torqueNm?: number;
torqueLbFt?: number;
acceleration0to60?: number; // seconds
topSpeed?: number; // mph
fuelConsumptionCombined?: number; // mpg
}
/** Vehicle dimensions (Maxi-Plus) */
interface DimensionsData {
lengthMm?: number;
widthMm?: number;
heightMm?: number;
wheelbaseMm?: number;
bootCapacityLitres?: number;
fuelTankLitres?: number;
kerbWeightKg?: number;
grossWeightKg?: number;
towingCapacityBrakedKg?: number;
towingCapacityUnbrakedKg?: number;
}
// ===== Error Response =====
interface APIErrorResponse {
success: false;
error: string;
code: ErrorCode;
details?: Record<string, unknown>;
}
type ErrorCode =
| 'MISSING_API_KEY'
| 'INVALID_API_KEY'
| 'KEY_REVOKED'
| 'API_ACCESS_DISABLED'
| 'INSUFFICIENT_BALANCE'
| 'RATE_LIMITED'
| 'VEHICLE_NOT_FOUND'
| 'INVALID_REGISTRATION'
| 'INTERNAL_ERROR';Copy these TypeScript interfaces into your project for full type safety when working with the API.
Webhooks
Receive real-time notifications when events occur
Configure webhooks in your Settings page to receive HTTP POST callbacks when certain events occur.
Available Events
check.completedWebhook Payload Example
{
"event": "check.completed",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"report_id": "550e8400-e29b-41d4-a716-446655440000",
"registration": "AB12CDE",
"check_type": "full",
"make": "BMW",
"model": "3 Series",
"year": 2019
}
}Security
Each webhook includes a signature header for verification. Always validate the signature before processing webhook payloads to ensure they came from CheckVehicles.
Rate Limiting & Best Practices
Handle rate limits gracefully with exponential backoff and proper retry strategies
Standard Limit
100 req/min
Per API key
Window Reset
60 seconds
Rolling window
Exceeded Response
429
Too Many Requests
Rate Limit Response Headers
X-RateLimit-RemainingRequests remaining in current window. Monitor this to avoid hitting limits.Retry-AfterSeconds to wait before retrying (only on 429 responses). Always respect this value.Rate Limiting Best Practices
- Monitor headers - Track
X-RateLimit-Remainingproactively - Implement backoff - Use exponential backoff with jitter on 429 responses
- Respect Retry-After - Always wait the specified duration before retrying
- Batch requests - If checking multiple vehicles, space requests 600ms apart
- Cache responses - Store results locally to avoid duplicate API calls
Retry Implementation Examples
// Exponential backoff with jitter for rate limit handling
async function fetchWithRetry(url, options, maxRetries = 3) {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
const response = await fetch(url, options);
// Check rate limit headers
const remaining = response.headers.get('X-RateLimit-Remaining');
console.log(`Rate limit remaining: ${remaining}`);
if (response.status === 429) {
if (attempt === maxRetries) {
throw new Error('Rate limit exceeded after max retries');
}
// Get retry delay from header or calculate exponential backoff
const retryAfter = response.headers.get('Retry-After');
const baseDelay = retryAfter
? parseInt(retryAfter, 10) * 1000
: Math.pow(2, attempt) * 1000;
// Add jitter (0-500ms) to prevent thundering herd
const jitter = Math.random() * 500;
const delay = baseDelay + jitter;
console.log(`Rate limited. Retrying in ${delay}ms...`);
await new Promise(resolve => setTimeout(resolve, delay));
continue;
}
return response;
}
}
// Usage with the CheckVehicles API
async function checkVehicle(registration) {
const response = await fetchWithRetry(
`${API_URL}/v1/check`,
{
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ registration, type: 'maxi-plus' }),
}
);
return response.json();
}Example 429 Response
HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Remaining: 0
Retry-After: 45
{
"error": "Rate limit exceeded",
"code": "RATE_LIMITED",
"retryAfter": 45,
"message": "You have exceeded the rate limit of 100 requests per minute"
}Need Higher Limits?
Enterprise customers can request custom rate limits, dedicated infrastructure, and priority support. Contact us to discuss your requirements.
Testing & Validation
Validate your integration before going live with production checks
Sandbox Mode Available
Enable sandbox mode in Settings → API tab or in the API Documentation page to test with sample data without consuming credits. The same API key works for both modes - just toggle sandbox on/off.
Free Validation Endpoints
Use these endpoints to verify your authentication and billing setup without consuming credits:
/v1/balanceReturns current balance - validates API key authentication/v1/billingReturns billing status - checks all API requirements/v1/reportsLists your reports - validates read permissionsIntegration Validation Script
Run this script to verify your API setup is correct before making paid checks:
// Validate your API integration without consuming credits
async function validateApiSetup() {
try {
// Step 1: Check authentication
const balanceResponse = await fetch(`${API_URL}/v1/balance`, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
if (balanceResponse.status === 401) {
console.error('❌ Authentication failed - check your API key');
return false;
}
const balance = await balanceResponse.json();
console.log('✅ Authentication successful');
console.log(` Balance: £${balance.balance}`);
// Step 2: Check billing status
const billingResponse = await fetch(`${API_URL}/v1/billing`, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
const billing = await billingResponse.json();
console.log('✅ Billing endpoint accessible');
console.log(` Auto top-up: ${billing.auto_topup?.enabled ? 'Enabled' : 'Disabled'}`);
console.log(` Card saved: ${billing.payment_method?.has_card ? 'Yes' : 'No'}`);
// Step 3: Verify minimum requirements
if (balance.balance < 100) {
console.warn('⚠️ Balance below £100 minimum for API access');
}
if (!billing.auto_topup?.enabled) {
console.warn('⚠️ Auto top-up must be enabled for API access');
}
console.log('\n✅ API validation complete - ready for live checks');
return true;
} catch (error) {
console.error('❌ Validation failed:', error.message);
return false;
}
}
// Run validation
validateApiSetup();Testing with Real Vehicles
For a low-cost way to test the full check flow, use a Maxi check (from £0.50) on any real UK registration. This validates your complete integration including:
- Request/response parsing
- Credit deduction flow
- Report data structure
- Error handling
Recommended Testing Approach
- Use the free validation script above to verify authentication
- Run one Maxi check (£0.50-£0.80) to test basic flow
- Run one Maxi-Plus check (£2.75+) to test full data structure
- Use
/v1/reports/:idto verify data retrieval
Pre-Production Checklist
API Explorer
Test API endpoints directly from your browser
Webhooks
Receive real-time notifications when events occur
Configure webhooks in your Settings page to receive HTTP POST callbacks when certain events occur.
Available Events
check.completedWebhook Payload Example
{
"event": "check.completed",
"timestamp": "2024-01-15T10:30:00Z",
"data": {
"report_id": "550e8400-e29b-41d4-a716-446655440000",
"registration": "AB12CDE",
"check_type": "full",
"make": "BMW",
"model": "3 Series",
"year": 2019
}
}Security
Each webhook includes a signature header for verification. Always validate the signature before processing webhook payloads to ensure they came from CheckVehicles.