Archive

Archive for the ‘Uncategorized’ Category

French Vehicle Registration API: Complete Guide to Vehicle Data Lookup in France

https://www.immatriculationapi.com/

France operates one of Europe’s most sophisticated vehicle registration systems, covering over 38 million registered vehicles across its 101 departments. The French Vehicle Registration API provides developers and businesses with access to comprehensive vehicle specifications, technical data, and registration information for vehicles registered throughout metropolitan France and overseas territories.

Overview of French Vehicle Registration System

France’s vehicle registration system is managed by the Ministry of the Interior through the National Secure Registration System (SIV – Système d’Immatriculation des Véhicules). Since 2009, France has used a standardized license plate format that includes two letters, three numbers, and two letters (AA-123-AA), replacing the older regional system.

The centralized system maintains detailed technical specifications for all registered vehicles, including data from:

  • ANTS (Agence Nationale des Titres Sécurisés) – National Agency for Secure Documents
  • UTAC-CERAM – Technical services for automotive certification
  • SRA (Sécurité et Réparation Automobiles) – Automotive security and repair classifications

French Vehicle API Features

The France endpoint provides comprehensive vehicle information including technical specifications and security classifications:

Available Data

When querying French vehicle registrations, you can retrieve:

  • Make and Model – Complete manufacturer and vehicle model identification
  • Registration Year – Year when the vehicle was first registered in France
  • Engine Specifications – Engine size, fuel type, and power ratings
  • Technical Details – Transmission type, body style, and variant information
  • Registration Date – Exact date of first vehicle registration
  • SRA Classifications – Security and theft risk classifications
  • CNIT Code – French National Vehicle Identification Code
  • K-Type ID – European vehicle type approval identifier
  • Environmental Data – CO2 emissions and cylinder count

Sample Response Format

{
  "Description": "RENAULT SCÉNIC III",
  "RegistrationYear": "2016",
  "CarMake": {
    "CurrentTextValue": "RENAULT"
  },
  "CarModel": {
    "CurrentTextValue": "SCÉNIC III"
  },
  "EngineSize": {
    "CurrentTextValue": "5"
  },
  "FuelType": {
    "CurrentTextValue": "DIESEL"
  },
  "MakeDescription": {
    "CurrentTextValue": "RENAULT"
  },
  "ModelDescription": {
    "CurrentTextValue": "SCÉNIC III"
  },
  "BodyStyle": {
    "CurrentTextValue": "MONOSPACE COMPACT"
  },
  "RegistrationDate": "2016-06-24",
  "ExtendedData": {
    "anneeSortie": "2016",
    "boiteDeVitesse": "",
    "carburantVersion": "D",
    "libVersion": "1.5 dCi 1461cm3 110cv",
    "libelleModele": "SCÉNIC III",
    "marque": "RE",
    "puissance": "5",
    "nbPlace": "5",
    "datePremiereMiseCirculation": "24062016",
    "numSerieMoteur": "VF1JZ890H55864144",
    "puissanceDyn": "110",
    "KtypeId": "5853",
    "EngineCC": "1461",
    "Co2": "105",
    "Cylinders": "4",
    "CNIT": "M10RENVP472E768"
  }
}

API Implementation

Endpoint Usage

The French Vehicle API uses the /CheckFrance endpoint and requires two parameters:

  1. Registration Number – The complete French license plate number
  2. Username – Your API authentication credentials

Basic Implementation Example

// JavaScript example for French vehicle lookup
async function lookupFrenchVehicle(registrationNumber, username) {
  const apiUrl = `https://www.immatriculationapi.com/api/reg.asmx/CheckFrance?RegistrationNumber=${registrationNumber}&username=${username}`;
  
  try {
    const response = await fetch(apiUrl);
    const xmlText = await response.text();
    
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(xmlText, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    return {
      make: vehicleInfo.MakeDescription.CurrentTextValue,
      model: vehicleInfo.ModelDescription.CurrentTextValue,
      year: vehicleInfo.RegistrationYear,
      engineSize: vehicleInfo.ExtendedData.EngineCC,
      power: vehicleInfo.ExtendedData.puissanceDyn,
      fuel: vehicleInfo.FuelType.CurrentTextValue,
      bodyStyle: vehicleInfo.BodyStyle.CurrentTextValue,
      registrationDate: vehicleInfo.RegistrationDate,
      co2: vehicleInfo.ExtendedData.Co2,
      cylinders: vehicleInfo.ExtendedData.Cylinders,
      vin: vehicleInfo.ExtendedData.numSerieMoteur,
      cnit: vehicleInfo.ExtendedData.CNIT
    };
  } catch (error) {
    console.error('French vehicle lookup failed:', error);
    return null;
  }
}

// Usage example
lookupFrenchVehicle("EG258MA", "your_username")
  .then(data => {
    if (data) {
      console.log(`Vehicle: ${data.make} ${data.model} (${data.year})`);
      console.log(`Engine: ${data.engineSize}cc, ${data.power}cv`);
      console.log(`Fuel: ${data.fuel}`);
      console.log(`CO2: ${data.co2}g/km`);
      console.log(`Registration: ${data.registrationDate}`);
    }
  });

Python Implementation

import requests
import xml.etree.ElementTree as ET
import json
from datetime import datetime

class FrenchVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.immatriculationapi.com/api/reg.asmx/CheckFrance"
    
    def validate_french_registration(self, registration):
        """Validate French registration number format"""
        if not registration:
            return False, "Registration number is required"
        
        # Remove spaces and convert to uppercase
        reg = registration.replace(" ", "").replace("-", "").upper()
        
        # Modern French format: 2 letters + 3 numbers + 2 letters
        # Old format validation could be added for historical plates
        if len(reg) < 6 or len(reg) > 9:
            return False, "Invalid registration length"
        
        return True, reg
    
    def lookup(self, registration_number):
        """Lookup French vehicle with comprehensive error handling"""
        # Validate registration format
        is_valid, processed_reg = self.validate_french_registration(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(self.base_url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No vehicle data found for this registration number"}
            
            vehicle_data = json.loads(json_element.text)
            extended_data = vehicle_data.get('ExtendedData', {})
            
            # Process and structure the response
            return {
                'success': True,
                'description': vehicle_data.get('Description'),
                'make': vehicle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': vehicle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'registration_year': vehicle_data.get('RegistrationYear'),
                'body_style': vehicle_data.get('BodyStyle', {}).get('CurrentTextValue'),
                'fuel_type': vehicle_data.get('FuelType', {}).get('CurrentTextValue'),
                'registration_date': vehicle_data.get('RegistrationDate'),
                'engine_cc': extended_data.get('EngineCC'),
                'power_cv': extended_data.get('puissanceDyn'),
                'co2_emissions': extended_data.get('Co2'),
                'cylinders': extended_data.get('Cylinders'),
                'vin': extended_data.get('numSerieMoteur'),
                'cnit': extended_data.get('CNIT'),
                'ktype_id': extended_data.get('KtypeId'),
                'seats': extended_data.get('nbPlace'),
                'make_code': extended_data.get('marque'),
                'fuel_version': extended_data.get('carburantVersion'),
                'version_details': extended_data.get('libVersion'),
                'manufacture_year': extended_data.get('anneeSortie'),
                'first_registration': extended_data.get('datePremiereMiseCirculation'),
                'raw_data': vehicle_data
            }
            
        except requests.Timeout:
            return {"error": "Request timed out - please try again"}
        except requests.RequestException as e:
            return {"error": f"Network error: {str(e)}"}
        except ET.ParseError:
            return {"error": "Invalid response format from API"}
        except json.JSONDecodeError:
            return {"error": "Could not parse vehicle data"}
        except Exception as e:
            return {"error": f"Unexpected error: {str(e)}"}

# Usage example
api = FrenchVehicleAPI("your_username")
result = api.lookup("EG258MA")

if result.get('success'):
    print(f"Vehicle: {result['make']} {result['model']}")
    print(f"Year: {result['registration_year']}")
    print(f"Engine: {result['engine_cc']}cc, {result['power_cv']}cv")
    print(f"Fuel: {result['fuel_type']} (Code: {result['fuel_version']})")
    print(f"CO2 Emissions: {result['co2_emissions']}g/km")
    print(f"Body Style: {result['body_style']}")
    print(f"VIN: {result['vin']}")
    print(f"CNIT: {result['cnit']}")
else:
    print(f"Error: {result['error']}")

French Registration Number Formats

Modern Format (2009-Present)

The current French registration system uses the format: XX-123-XX

  • First two letters: Random sequence (not location-based)
  • Three numbers: Sequential from 001 to 999
  • Last two letters: Department identifier or random

Historical Formats (1950-2009)

Older French vehicles may have regional formats:

  • 123 XX 75 – Numbers, letters, department code
  • Regional variations with different structures

Special Plates

  • Diplomatic vehicles – Special CD (Corps Diplomatique) plates
  • Temporary plates – TT format for transit
  • Military vehicles – Special military identification

Understanding French Vehicle Data

Extended Data Fields Explained

The French API provides rich extended data with specific French terminology:

Technical Specifications:

  • anneeSortie – Year of first manufacture
  • boiteDeVitesse – Transmission type
  • carburantVersion – Fuel type code (D=Diesel, E=Petrol, etc.)
  • puissance – Administrative power (chevaux fiscaux)
  • puissanceDyn – Dynamic power (chevaux vapeur/CV)
  • EngineCC – Engine displacement in cubic centimeters
  • Cylinders – Number of cylinders
  • Co2 – CO2 emissions in g/km

Identification Codes:

  • CNIT – Code National d’Identification du Type (National Type Identification Code)
  • KtypeId – European K-Type identification number
  • marque – Manufacturer code (RE=Renault, PE=Peugeot, etc.)
  • numSerieMoteur – VIN (Vehicle Identification Number)

Registration Information:

  • datePremiereMiseCirculation – Date of first registration in format DDMMYYYY
  • nbPlace – Number of seats
  • libVersion – Detailed version description with engine specs

Fuel Type Classifications

  • ESSENCE – Petrol/Gasoline
  • DIESEL – Diesel fuel
  • ELECTRIQUE – Electric vehicle
  • HYBRIDE – Hybrid vehicle
  • GPL – Liquefied Petroleum Gas
  • GNV – Compressed Natural Gas

French Motorcycle Support

For motorcycles registered in France, use the dedicated motorcycle endpoint: https://www.immatriculationapi.com/api/bespokeapi.asmx?op=CheckMotorBikeFrance

This returns motorcycle-specific data including:

  • Engine specifications optimized for motorcycles
  • Motorcycle-specific body classifications
  • Power ratings appropriate for two-wheeled vehicles

Use Cases for French Vehicle API

Insurance Industry

  • Premium Calculations – CO2 emissions and power ratings for environmental taxes
  • Claims Processing – VIN verification and technical specifications
  • Fraud Prevention – Cross-reference CNIT codes and registration dates
  • Fleet Insurance – Bulk vehicle verification for commercial policies

Automotive Industry

  • Dealership Operations – Verify vehicle history and specifications
  • Parts and Service – CNIT and K-Type codes for parts compatibility
  • Import/Export – Technical compliance verification
  • Vehicle Valuations – Detailed specifications for pricing models

Fleet Management

  • Environmental Compliance – CO2 emissions tracking for corporate reporting
  • Maintenance Scheduling – Engine specifications and service requirements
  • Fuel Management – Fuel type verification for fleet optimization
  • Asset Tracking – Comprehensive vehicle identification

Government and Regulatory

  • Environmental Monitoring – Emissions data for pollution control
  • Tax Administration – Vehicle specifications for taxation purposes
  • Import Control – Technical verification for customs procedures
  • Traffic Management – Vehicle classification for access restrictions

Mobile Applications

  • Parking Apps – Vehicle identification and permit validation
  • Insurance Apps – Instant vehicle data for quote generation
  • Service Booking – Technical specs for maintenance appointments
  • Car Sharing – Vehicle verification and specification display

French Automotive Market Context

Major French Manufacturers

France is home to several global automotive manufacturers:

Groupe PSA (Stellantis):

  • Peugeot – Founded 1810, known for innovative design and diesel technology
  • Citroën – Renowned for comfort and hydraulic suspension systems
  • DS Automobiles – Premium brand focusing on luxury and French craftsmanship

Renault Group:

  • Renault – Major European manufacturer with strong EV presence
  • Alpine – Sports car manufacturer
  • Dacia – Value brand with simple, reliable vehicles

Specialized Manufacturers:

  • Bugatti – Ultra-luxury hypercars
  • Venturi – Electric vehicle specialist

French Vehicle Classification System

Administrative Power (Chevaux Fiscaux): France uses a unique administrative power system for taxation:

  • Calculated based on CO2 emissions and engine power
  • Used for registration taxes and annual road tax
  • Ranges typically from 3CV to 20CV+ for standard vehicles

Body Style Classifications:

  • BERLINE – Sedan
  • BREAK – Station wagon
  • MONOSPACE – MPV/Minivan
  • COUPÉ – Coupe
  • CABRIOLET – Convertible
  • COMBISPACE – Compact MPV

Error Handling and Best Practices

class FrenchVehicleLookup {
  constructor(username) {
    this.username = username;
    this.apiUrl = "https://www.immatriculationapi.com/api/reg.asmx/CheckFrance";
  }
  
  async lookupWithRetry(registration, maxRetries = 3) {
    let lastError;
    
    for (let attempt = 1; attempt <= maxRetries; attempt++) {
      try {
        const result = await this.lookup(registration);
        
        if (result && !result.error) {
          return result;
        }
        
        lastError = result?.error || "Unknown error";
        
        // Wait before retry (exponential backoff)
        if (attempt < maxRetries) {
          await new Promise(resolve => setTimeout(resolve, 1000 * attempt));
        }
        
      } catch (error) {
        lastError = error.message;
        
        if (attempt < maxRetries) {
          await new Promise(resolve => setTimeout(resolve, 1000 * attempt));
        }
      }
    }
    
    return {
      error: true,
      message: `Failed after ${maxRetries} attempts: ${lastError}`,
      registration: registration
    };
  }
  
  async lookup(registration) {
    // Validate and clean registration
    const cleanReg = this.cleanRegistration(registration);
    if (!cleanReg) {
      throw new Error("Invalid registration format");
    }
    
    const response = await fetch(`${this.apiUrl}?RegistrationNumber=${cleanReg}&username=${this.username}`);
    
    if (!response.ok) {
      throw new Error(`HTTP ${response.status}: ${response.statusText}`);
    }
    
    // Process response...
    return this.parseResponse(await response.text());
  }
  
  cleanRegistration(registration) {
    if (!registration) return null;
    
    // Remove spaces, hyphens, and convert to uppercase
    const cleaned = registration.replace(/[\s\-]/g, '').toUpperCase();
    
    // Basic validation
    if (cleaned.length < 6 || cleaned.length > 9) {
      return null;
    }
    
    return cleaned;
  }
}

Data Privacy and Compliance

GDPR Compliance

As an EU member state, France follows strict data protection regulations:

  • Vehicle technical data is not considered personal information
  • VIN numbers are vehicle identifiers, not personal data
  • Implement appropriate data retention policies
  • Ensure proper access controls and audit trails

Usage Guidelines

  • API intended for legitimate business and technical purposes
  • Respect rate limits to maintain service quality
  • Implement proper caching to reduce unnecessary requests
  • Follow French data protection guidelines for automotive data

Getting Started

Account Registration

  1. Sign Up – Register for API access through the French vehicle API portal
  2. Verification – Complete email and business verification process
  3. Testing – Use sample registration “EG258MA” for development
  4. Production – Purchase credits and configure production environment

Sample Data for Testing

  • EG258MA – Renault Scénic III (sample from documentation)
  • Test various registration formats to understand response variations
  • Verify error handling with invalid registrations

Integration Planning

  • Plan for French-specific data fields in your application
  • Consider CO2 emissions display for environmental compliance
  • Implement proper error handling for network timeouts
  • Design UI to accommodate French technical terminology

Conclusion

The French Vehicle Registration API provides comprehensive access to France’s sophisticated vehicle database, offering detailed technical specifications, environmental data, and regulatory compliance information. The system’s integration of SRA classifications, CNIT codes, and detailed emissions data makes it particularly valuable for insurance, fleet management, and environmental compliance applications.

France’s centralized registration system ensures consistent data quality while the API’s rich extended data provides all necessary information for professional automotive applications. Understanding French vehicle classifications, administrative power calculations, and technical specifications enhances the effectiveness of API integration.

The system’s compliance with EU regulations and focus on environmental data positions it well for modern automotive applications requiring detailed vehicle specifications and emissions information.

Begin integrating French vehicle data by registering for API access and exploring the comprehensive database of French vehicle registrations across all departments and territories.

https://www.immatriculationapi.com/

Categories: Uncategorized

Romanian Vehicle Registration #API: Complete Guide to Vehicle Data Lookup in #Romania

TLDR: https://www.inmatriculareapi.ro/
Romania, as a member of the European Union since 2007, maintains a modern vehicle registration system that provides comprehensive vehicle information through digital databases. The Romanian Vehicle Registration API offers developers and businesses access to detailed vehicle specifications, ownership documents, and technical data for vehicles registered throughout Romania’s 42 counties.

Overview of Romanian Vehicle Registration System

Romania’s vehicle registration system is centralized under the Romanian National Agency for Fiscal Administration (ANAF) and the Romanian Automobile Registry (RAR). The system covers all Romanian counties from Bucharest (București) to the smallest rural regions, providing standardized vehicle identification and technical specifications.

The Romanian license plate format typically consists of:

  • County Code – 1-2 letters identifying the county of registration
  • Numbers – Sequential numerical identifier
  • Letters – Additional letter combinations

Romanian Vehicle API Features

The Romania endpoint provides comprehensive vehicle information including:

Available Data

When querying Romanian vehicle registrations, you can retrieve:

  • Make and Model – Complete manufacturer and vehicle model information
  • Registration Year – Year when the vehicle was first registered
  • Engine Specifications – Engine size in cubic centimeters and power in kilowatts
  • Fuel Type – Fuel classification (benzina/petrol, motorina/diesel, GPL/LPG, electric)
  • VIN Number – Complete 17-character Vehicle Identification Number
  • CIV Document – Vehicle Identity Document (Cartea de Identitate a Vehiculului)
  • Vehicle Type – Classification (Autoturism/passenger car, Autoutilitară/utility vehicle, etc.)
  • Technical Specifications – Weight, number of seats, variant information
  • Registration Region – County or city where the vehicle is registered
  • Representative Image – Visual identification of the vehicle type

Sample Response Format

{
  "Description": "Renault Clio",
  "RegistrationYear": "1999",
  "CarMake": {
    "CurrentTextValue": "Renault"
  },
  "CarModel": {
    "CurrentTextValue": "Clio"
  },
  "MakeDescription": {
    "CurrentTextValue": "Renault"
  },
  "ModelDescription": {
    "CurrentTextValue": "Clio"
  },
  "Type": "Autoturism",
  "VIN": "VF1CB0A0F20507251",
  "CIV": "J350228",
  "Variant": "",
  "Weight": "955",
  "FuelType": "benzina",
  "NumberOfSeats": "5",
  "Power": "43",
  "EngineSize": "1149",
  "Region": "București",
  "ImageUrl": "http://www.inmatriculareapi.ro/image.aspx/@UmVuYXVsdCBDbGlv"
}

API Implementation

Endpoint Usage

The Romanian Vehicle API uses the /CheckRomania endpoint and requires two parameters:

  1. Registration Number – The complete Romanian license plate number
  2. Username – Your API authentication credentials

Basic Implementation Example

// JavaScript example for Romanian vehicle lookup
async function lookupRomanianVehicle(registrationNumber, username) {
  const apiUrl = `https://www.inmatriculareapi.ro/api/reg.asmx/CheckRomania?RegistrationNumber=${registrationNumber}&username=${username}`;
  
  try {
    const response = await fetch(apiUrl);
    const xmlText = await response.text();
    
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(xmlText, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    return {
      make: vehicleInfo.MakeDescription.CurrentTextValue,
      model: vehicleInfo.ModelDescription.CurrentTextValue,
      year: vehicleInfo.RegistrationYear,
      engineSize: vehicleInfo.EngineSize,
      power: vehicleInfo.Power,
      fuel: vehicleInfo.FuelType,
      vin: vehicleInfo.VIN,
      civ: vehicleInfo.CIV,
      region: vehicleInfo.Region,
      weight: vehicleInfo.Weight,
      seats: vehicleInfo.NumberOfSeats,
      type: vehicleInfo.Type
    };
  } catch (error) {
    console.error('Romanian vehicle lookup failed:', error);
    return null;
  }
}

// Usage example
lookupRomanianVehicle("B123ABC", "your_username")
  .then(data => {
    if (data) {
      console.log(`Vehicle: ${data.make} ${data.model} (${data.year})`);
      console.log(`Engine: ${data.engineSize}cc, ${data.power}kW`);
      console.log(`Fuel: ${data.fuel}`);
      console.log(`CIV: ${data.civ}`);
      console.log(`Region: ${data.region}`);
    }
  });

Python Implementation

import requests
import xml.etree.ElementTree as ET
import json

class RomanianVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.inmatriculareapi.ro/api/reg.asmx/CheckRomania"
    
    def validate_registration_format(self, registration):
        """Validate Romanian registration number format"""
        if not registration or len(registration.strip()) < 6:
            return False, "Registration number too short"
        
        # Remove spaces and convert to uppercase
        reg = registration.replace(" ", "").upper()
        
        # Basic format validation (letters + numbers + letters)
        if not any(c.isalpha() for c in reg) or not any(c.isdigit() for c in reg):
            return False, "Invalid format - must contain both letters and numbers"
        
        return True, reg
    
    def lookup(self, registration_number):
        """Lookup Romanian vehicle with comprehensive error handling"""
        # Validate registration format
        is_valid, processed_reg = self.validate_registration_format(registration_number)
        if not is_valid:
            return {"error": processed_reg}
        
        try:
            params = {
                'RegistrationNumber': processed_reg,
                'username': self.username
            }
            
            response = requests.get(self.base_url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No vehicle data found for this registration number"}
            
            vehicle_data = json.loads(json_element.text)
            
            # Process and structure the response
            return {
                'success': True,
                'description': vehicle_data.get('Description'),
                'make': vehicle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': vehicle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'registration_year': vehicle_data.get('RegistrationYear'),
                'vehicle_type': vehicle_data.get('Type'),
                'vin': vehicle_data.get('VIN'),
                'civ': vehicle_data.get('CIV'),
                'engine_size': vehicle_data.get('EngineSize'),
                'power_kw': vehicle_data.get('Power'),
                'fuel_type': vehicle_data.get('FuelType'),
                'weight_kg': vehicle_data.get('Weight'),
                'number_of_seats': vehicle_data.get('NumberOfSeats'),
                'region': vehicle_data.get('Region'),
                'variant': vehicle_data.get('Variant'),
                'image_url': vehicle_data.get('ImageUrl'),
                'raw_data': vehicle_data
            }
            
        except requests.Timeout:
            return {"error": "Request timed out - please try again"}
        except requests.RequestException as e:
            return {"error": f"Network error: {str(e)}"}
        except ET.ParseError:
            return {"error": "Invalid response format from API"}
        except json.JSONDecodeError:
            return {"error": "Could not parse vehicle data"}
        except Exception as e:
            return {"error": f"Unexpected error: {str(e)}"}

# Usage example
api = RomanianVehicleAPI("your_username")
result = api.lookup("B123ABC")

if result.get('success'):
    print(f"Vehicle: {result['make']} {result['model']}")
    print(f"Year: {result['registration_year']}")
    print(f"Engine: {result['engine_size']}cc, {result['power_kw']}kW")
    print(f"Fuel: {result['fuel_type']}")
    print(f"VIN: {result['vin']}")
    print(f"CIV: {result['civ']}")
    print(f"Region: {result['region']}")
    print(f"Weight: {result['weight_kg']}kg")
    print(f"Seats: {result['number_of_seats']}")
else:
    print(f"Error: {result['error']}")

Romanian Vehicle Registration Format

County Codes

Romanian license plates begin with county codes that identify the registration location:

Major Cities and Counties:

  • B – București (Bucharest) – Capital city
  • AB – Alba – Alba Iulia
  • AG – Argeș – Pitești
  • AR – Arad – Arad
  • BC – Bacău – Bacău
  • BH – Bihor – Oradea
  • BN – Bistrița-Năsăud – Bistrița
  • BR – Brăila – Brăila
  • BT – Botoșani – Botoșani
  • BV – Brașov – Brașov
  • BZ – Buzău – Buzău
  • CJ – Cluj – Cluj-Napoca
  • CL – Călărași – Călărași
  • CS – Caraș-Severin – Reșița
  • CT – Constanța – Constanța
  • CV – Covasna – Sfântu Gheorghe
  • DB – Dâmbovița – Târgoviște
  • DJ – Dolj – Craiova
  • GJ – Gorj – Târgu Jiu
  • GL – Galați – Galați
  • GR – Giurgiu – Giurgiu
  • HD – Hunedoara – Deva
  • HR – Harghita – Miercurea Ciuc
  • IF – Ilfov – Buftea
  • IL – Ialomița – Slobozia
  • IS – Iași – Iași
  • MH – Mehedinți – Drobeta-Turnu Severin
  • MM – Maramureș – Baia Mare
  • MS – Mureș – Târgu Mureș
  • NT – Neamț – Piatra Neamț
  • OT – Olt – Slatina
  • PH – Prahova – Ploiești
  • SB – Sibiu – Sibiu
  • SJ – Sălaj – Zalău
  • SM – Satu Mare – Satu Mare
  • SV – Suceava – Suceava
  • TL – Tulcea – Tulcea
  • TM – Timiș – Timișoara
  • TR – Teleorman – Alexandria
  • VL – Vâlcea – Râmnicu Vâlcea
  • VN – Vrancea – Focșani
  • VS – Vaslui – Vaslui

Understanding Romanian Vehicle Data

Vehicle Types (Tip Vehicul)

  • Autoturism – Passenger car
  • Autoutilitară – Utility vehicle/van
  • Autocamion – Truck
  • Autobus/Autobuz – Bus
  • Motocicletă – Motorcycle
  • Moped – Moped
  • Remorcă – Trailer

Fuel Types (Tip Combustibil)

  • Benzină – Petrol/Gasoline
  • Motorină – Diesel
  • GPL – Liquefied Petroleum Gas
  • Electric – Electric vehicle
  • Hibrid – Hybrid (petrol/electric or diesel/electric)

CIV Document

The CIV (Cartea de Identitate a Vehiculului) is Romania’s vehicle identity document, similar to a vehicle registration certificate. It contains:

  • Vehicle technical specifications
  • Ownership history
  • Registration details
  • Environmental compliance information

Use Cases for Romanian Vehicle API

Insurance Industry

  • Policy Underwriting – Access technical specifications for risk assessment
  • Claims Processing – Verify vehicle details during accident claims
  • Fraud Prevention – Cross-reference VIN and CIV data for authenticity
  • Premium Calculation – Engine power and weight for insurance categories

Automotive Dealers

  • Vehicle History – Verify registration and technical details
  • Import/Export – VIN verification for cross-border transactions
  • Inventory Management – Automated vehicle data population
  • Trade Valuations – Technical specifications for pricing

Fleet Management

  • Asset Tracking – Maintain detailed vehicle records
  • Compliance Monitoring – Ensure registration validity across fleet
  • Maintenance Planning – Engine specifications for service schedules
  • Environmental Reporting – Fuel type and emissions data

Government and Law Enforcement

  • Vehicle Identification – Quick lookups during traffic enforcement
  • Registration Verification – Confirm vehicle legitimacy
  • Import Control – VIN verification for customs procedures
  • Investigation Support – Vehicle tracking and identification

Mobile Applications

  • Car Shopping Apps – Instant vehicle specification lookup
  • Insurance Apps – Quick vehicle verification for quotes
  • Service Apps – Technical specifications for maintenance booking
  • Parking Apps – Vehicle identification and validation

Error Handling Best Practices

function handleRomanianVehicleLookup(registration, username) {
  // Validate input format
  if (!registration || registration.length < 6) {
    return Promise.reject(new Error("Invalid registration number format"));
  }
  
  // Clean registration number
  const cleanReg = registration.replace(/\s+/g, '').toUpperCase();
  
  return lookupRomanianVehicle(cleanReg, username)
    .then(data => {
      if (!data) {
        throw new Error("No vehicle data returned");
      }
      
      // Validate essential fields
      if (!data.make || !data.model) {
        throw new Error("Incomplete vehicle data received");
      }
      
      return data;
    })
    .catch(error => {
      console.error('Romanian vehicle lookup error:', error);
      
      // Return structured error response
      return {
        error: true,
        message: error.message,
        registration: registration,
        timestamp: new Date().toISOString()
      };
    });
}

Data Privacy and Compliance

GDPR Compliance

As an EU member state, Romania follows strict data protection regulations:

  • The API returns technical vehicle specifications, not personal owner data
  • VIN and CIV numbers are vehicle identifiers, not personal information
  • Consider data retention policies when caching API responses
  • Implement proper access controls for vehicle data systems

Usage Limitations

  • API is intended for legitimate business purposes
  • Vehicle data should not be used for unauthorized tracking
  • Respect rate limits and terms of service
  • Implement proper error handling to avoid excessive requests

Getting Started

Account Setup

  1. Register for API access at the Romanian vehicle API portal
  2. Verify your email address and business credentials
  3. Test with sample registration numbers like “B123ABC”
  4. Purchase credits for production usage

Integration Testing

Test with various Romanian registration formats:

  • Bucharest format: B123ABC, B456DEF
  • County formats: CJ12ABC, TM34DEF, CT56GHI
  • Different vehicle types to understand data variations

Production Considerations

  • Implement robust error handling for network issues
  • Cache responses appropriately to reduce API calls
  • Monitor API usage and credit consumption
  • Plan for data updates and system maintenance windows

Conclusion

The Romanian Vehicle Registration API provides comprehensive access to vehicle data across all Romanian counties and cities. With detailed technical specifications, official document references (CIV), and standardized data formats, the API supports diverse applications from insurance processing to fleet management.

Romania’s centralized registration system ensures consistent data quality while the API’s detailed response format provides all necessary vehicle information for professional applications. Understanding Romanian vehicle types, fuel classifications, and regional codes enhances the effectiveness of API integration.

The system’s compliance with EU data protection standards and focus on technical specifications rather than personal data makes it suitable for business applications requiring vehicle verification and specification lookup.

Start integrating Romanian vehicle data today by registering for API access and exploring the comprehensive database of Romanian vehicle registrations.

Please visit https://www.inmatriculareapi.ro/ to get started.

NEVDIS #API Australia #NEVDIS – Australian Vehicle Registration API: Complete State-by-State Guide to Vehicle Data Lookup

Quicklinks:
Australian API: https://www.carregistrationapi.com.au/
Nevdis info: https://austroads.gov.au/drivers-and-vehicles/nevdis

Australian Vehicle Registration API: Complete State-by-State Guide to Vehicle Data Lookup

Australia’s vast continent is divided into eight distinct states and territories, each maintaining its own vehicle registration system and database. The Australian Vehicle Registration API provides comprehensive access to vehicle information across all Australian jurisdictions, from the bustling cities of Sydney and Melbourne to the remote regions of the Northern Territory and Western Australia.

Overview of Australian Vehicle Registration System

Unlike centralized systems found in some countries, Australia operates a federated vehicle registration model where each state and territory maintains independent databases. This decentralized approach reflects Australia’s federal structure and means that vehicle lookups require both the registration number and the state of registration.

The Australian Vehicle Registration API supports all eight Australian jurisdictions:

  • New South Wales (NSW)
  • Victoria (VIC)
  • Queensland (QLD)
  • South Australia (SA)
  • Australian Capital Territory (ACT)
  • Northern Territory (NT)
  • Western Australia (WA)
  • Tasmania (TAS)

API Implementation

Endpoint Usage

The Australian Vehicle API uses the /CheckAustralia endpoint and requires three parameters:

  1. Registration Number – The vehicle’s registration plate number
  2. State – Two or three letter state/territory abbreviation
  3. Username – Your API authentication credentials

Basic Implementation Example

// JavaScript example for Australian vehicle lookup
async function lookupAustralianVehicle(registration, state, username) {
  const apiUrl = `https://www.regcheck.org.uk/api/reg.asmx/CheckAustralia?RegistrationNumber=${registration}&State=${state}&username=${username}`;
  
  try {
    const response = await fetch(apiUrl);
    const xmlText = await response.text();
    
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(xmlText, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    return vehicleInfo;
  } catch (error) {
    console.error('Australian vehicle lookup failed:', error);
    return null;
  }
}

// Usage example
lookupAustralianVehicle("ABC123", "NSW", "your_username")
  .then(data => {
    if (data) {
      console.log(`Vehicle: ${data.Description}`);
      console.log(`State: ${data.State}`);
    }
  });

State-by-State Data Coverage

Each Australian state provides different levels of vehicle information based on their registration systems and data sharing policies.

New South Wales (NSW)

New South Wales, Australia’s most populous state, provides comprehensive vehicle data including:

Available Data:

  • Vehicle description (make, model, body style)
  • Make and model details
  • Registration year
  • Vehicle color
  • Body style classification
  • NEVDIS code (National Exchange of Vehicle and Driver Information System)
  • Engine size specifications
  • NVIC code (National Vehicle Identification Code)
  • Transmission type

Sample Response (NSW):

{
  "Description": "FORD Fairmont 4D Sedan",
  "RegistrationYear": "1994",
  "CarMake": {
    "CurrentTextValue": "FORD"
  },
  "MakeDescription": {
    "CurrentTextValue": "FORD"
  },
  "ModelDescription": {
    "CurrentTextValue": "Fairmont 4D Sedan"
  },
  "BodyStyle": {
    "CurrentTextValue": "4-Speed Auto"
  },
  "VechileIdentificationNumber": "FORFMT---7402E01994A",
  "Engine": "4.0 litre, 6 cyl, EF",
  "State": "NSW",
  "extended": {
    "nvic": "OP5",
    "driveType": "4D SEDAN",
    "family": "FAIRMONT",
    "model": "Fairmont 4D Sedan",
    "make": "FORD",
    "fuelType": "",
    "capacityValue": "4.0",
    "series": "EF",
    "engineDescription": "4.0 litre, 6 cyl, EF",
    "cylinders": "6",
    "year": "1994",
    "capacityUnit": "L",
    "transmissionType": "4-Speed Auto"
  }
}

NSW Motorcycle Support: NSW also supports motorcycle lookups with slightly different data structure:

{
  "Description": "YAMAHA XVS650 MOTORCYCLE V",
  "RegistrationYear": "2014",
  "CarMake": {
    "CurrentTextValue": "YAMAHA"
  },
  "MakeDescription": {
    "CurrentTextValue": "YAMAHA"
  },
  "ModelDescription": {
    "CurrentTextValue": "XVS650"
  },
  "VehicleType": "Motorcycle",
  "State": "NSW"
}

Victoria (VIC)

Victoria provides essential vehicle identification data with focus on ownership verification:

Available Data:

  • Vehicle description
  • Registration year
  • Make identification
  • Body style
  • Vehicle color
  • Vehicle Identification Number (VIN)
  • Engine number
  • Registration expiry date
  • Stolen vehicle indicator
  • Goods carrying vehicle classification

Sample Response (VIC):

{
  "Description": "2012 WHITE HYUNDAI WAGON",
  "RegistrationYear": "2012",
  "CarMake": {
    "CurrentTextValue": "HYUNDAI"
  },
  "MakeDescription": {
    "CurrentTextValue": "HYUNDAI"
  },
  "Colour": "WHITE",
  "VechileIdentificationNumber": "KMHJU81CSCU459552",
  "Engine": "G4KECU661333",
  "Stolen": "No",
  "GoodsCarryingVehicle": "No",
  "RegistrationSerialNumber": "7112510",
  "ComplianceDate": "02/2012",
  "Expiry": "20/02/2018",
  "State": "VIC"
}

Queensland (QLD)

Queensland focuses on basic vehicle identification with insurance information:

Available Data:

  • Vehicle description
  • Make and model
  • Registration year
  • Vehicle Identification Number (VIN)
  • Insurance expiry date
  • Vehicle purpose classification

Sample Response (QLD):

{
  "Description": "2011 HYUNDAI ACCENT HATCHBACK",
  "CarMake": {
    "CurrentTextValue": "HYUNDAI"
  },
  "CarModel": {
    "CurrentTextValue": "ACCENT HATCHBACK"
  },
  "RegistrationYear": "2011",
  "VechileIdentificationNumber": "KMHCT51DLCU021130",
  "InsuranceExpiry": "01/11/2019",
  "Purpose": "PRIVATE",
  "State": "QLD"
}

South Australia (SA)

South Australia provides comprehensive data including insurance company information:

Available Data:

  • Complete vehicle description
  • Make and model details
  • Body style classification
  • Vehicle color
  • Registration year
  • Registration expiry date
  • Insurance company details
  • Vehicle Identification Number (VIN)

Sample Response (SA):

{
  "Description": "WHITE MITSUBISHI STATION WAGON",
  "CarMake": {
    "CurrentTextValue": "MITSUBISHI"
  },
  "CarModel": {
    "CurrentTextValue": "Pajero"
  },
  "RegistrationYear": "2015",
  "BodyStyle": {
    "CurrentTextValue": "STATION WAGON"
  },
  "Colour": "WHITE",
  "Expiry": "05/09/2022",
  "VechileIdentificationNumber": "JMFLYV98WGJ003504",
  "InsuranceCompany": "AAMI",
  "State": "SA"
}

Australian Capital Territory (ACT)

The ACT system provides detailed vehicle and insurance information:

Available Data:

  • Vehicle description with year
  • Make and model identification
  • Registration year
  • Vehicle color
  • Registration expiry date
  • Engine number
  • Stolen vehicle indicator
  • Net weight specifications
  • Insurance company details

Sample Response (ACT):

{
  "Description": "Black MERCEDES 204 C CLASS (2010)",
  "CarMake": {
    "CurrentTextValue": "MERCEDES"
  },
  "CarModel": {
    "CurrentTextValue": "MERCEDES"
  },
  "RegistrationYear": 2010,
  "Colour": "Black",
  "Expiry": "27/05/2017",
  "EngineNumber": "2420",
  "Stolen": "N",
  "NetWeight": "1436",
  "InsuranceCompany": "NRMA INSURANCE LIMITED",
  "State": "ACT"
}

Northern Territory (NT)

The Northern Territory provides registration status and inspection information:

Available Data:

  • Vehicle description
  • Make and model details
  • Registration year
  • Vehicle color
  • Registration plate details
  • Insurance class information
  • Inspection date requirements
  • Plate type classification
  • Registration status

Sample Response (NT):

{
  "Description": "BLACK TOYOTA PRADO 2012",
  "CarMake": {
    "CurrentTextValue": "TOYOTA"
  },
  "CarModel": {
    "CurrentTextValue": "PRADO"
  },
  "RegistrationYear": 2012,
  "Colour": "BLACK",
  "RegistrationPlate": {
    "can_register": true,
    "plate": "CA71JS",
    "can_inspect": true,
    "insurance_class": "A",
    "insurance_class_desc": "Vehicle not exceeding 4.5 tonne GVM or bus used for private or business.",
    "date_inspection": 1516579200000,
    "plate_type": "C",
    "class_code": "",
    "can_remind": true,
    "status": "REGISTERED",
    "date_expired": 1490227200000
  },
  "State": "NT"
}

Western Australia (WA)

Western Australia provides detailed technical specifications:

Available Data:

  • Complete vehicle description
  • Make and model details
  • Registration year
  • Body style classification
  • Vehicle color
  • NEVDIS number
  • Engine specifications
  • NVIC code
  • Transmission type
  • Registration expiry date

Sample Response (WA):

{
  "Description": "MAZDA Mazda6 4D Sedan CLASSIC",
  "RegistrationYear": "2008",
  "CarMake": {
    "CurrentTextValue": "MAZDA"
  },
  "MakeDescription": {
    "CurrentTextValue": "MAZDA"
  },
  "ModelDescription": {
    "CurrentTextValue": "Mazda6 4D Sedan"
  },
  "BodyStyle": {
    "CurrentTextValue": "Classic 6-Speed Manual"
  },
  "VechileIdentificationNumber": "MAZ--6CLGH25HV92008B",
  "Engine": "2.5 litre, 4 cyl, GH",
  "extended": {
    "nvic": "HV908B",
    "driveType": "4D SEDAN",
    "family": "MAZDA6",
    "variant": "CLASSIC",
    "model": "Mazda6 4D Sedan",
    "make": "MAZDA",
    "capacityValue": "2.5",
    "series": "GH",
    "engineDescription": "2.5 litre, 4 cyl, GH",
    "bodyType": "Classic 6-Speed Manual",
    "cylinders": "4",
    "year": "2008",
    "capacityUnit": "L",
    "transmissionType": "Manual"
  },
  "Expiry": "16/12/2017",
  "State": "WA"
}

WA Motorcycle Support: Western Australia also supports motorcycle lookups:

{
  "Description": "YAMAHA XVS650 MOTORCYCLE V",
  "RegistrationYear": "2014",
  "CarMake": {
    "CurrentTextValue": "YAMAHA"
  },
  "MakeDescription": {
    "CurrentTextValue": "YAMAHA"
  },
  "ModelDescription": {
    "CurrentTextValue": "XVS650"
  },
  "VehicleType": "Motorcycle",
  "State": "WA"
}

Tasmania (TAS)

Tasmania provides comprehensive technical vehicle data:

Available Data:

  • Complete vehicle description
  • Make and model details
  • Registration year
  • Body style specifications
  • Vehicle color
  • NEVDIS number
  • Engine specifications with displacement
  • NVIC code
  • Transmission details
  • Registration expiry date

Sample Response (TAS):

{
  "Description": "MAZDA Cx-5 4D Wagon MAXX (4x2)",
  "RegistrationYear": "2012",
  "CarMake": {
    "CurrentTextValue": "MAZDA"
  },
  "MakeDescription": {
    "CurrentTextValue": "MAZDA"
  },
  "ModelDescription": {
    "CurrentTextValue": "Cx-5 4D Wagon"
  },
  "BodyStyle": {
    "CurrentTextValue": "Maxx (4X2) 6-Speed Manual"
  },
  "VechileIdentificationNumber": "MAZCX5M2--20NHI2012B",
  "Engine": "2.0 litre, 4 cyl",
  "extended": {
    "nvic": "NHI12B",
    "driveType": "4D WAGON",
    "family": "CX-5",
    "variant": "MAXX (4x2)",
    "model": "Cx-5 4D Wagon",
    "make": "MAZDA",
    "capacityValue": "2.0",
    "engineDescription": "2.0 litre, 4 cyl",
    "bodyType": "Maxx (4X2) 6-Speed Manual",
    "cylinders": "4",
    "year": "2012",
    "capacityUnit": "L",
    "transmissionType": "Manual"
  },
  "State": "TAS"
}

State Code Validation

function validateAustralianState(state) {
  const validStates = ['NSW', 'VIC', 'QLD', 'SA', 'ACT', 'NT', 'WA', 'TAS'];
  
  if (!state) {
    return { valid: false, error: "State code is required" };
  }
  
  const upperState = state.toUpperCase();
  if (!validStates.includes(upperState)) {
    return { 
      valid: false, 
      error: `Invalid state code. Must be one of: ${validStates.join(', ')}` 
    };
  }
  
  return { valid: true, state: upperState };
}

// Usage example
const stateValidation = validateAustralianState("nsw");
if (stateValidation.valid) {
  // Proceed with API call using stateValidation.state
} else {
  console.error(stateValidation.error);
}

Complete Implementation Example

import requests
import xml.etree.ElementTree as ET
import json

class AustralianVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.regcheck.org.uk/api/reg.asmx/CheckAustralia"
        self.valid_states = ['NSW', 'VIC', 'QLD', 'SA', 'ACT', 'NT', 'WA', 'TAS']
    
    def validate_inputs(self, registration, state):
        """Validate registration and state inputs"""
        errors = []
        
        if not registration or len(registration.strip()) < 2:
            errors.append("Registration number is required (minimum 2 characters)")
        
        if not state:
            errors.append("State code is required")
        elif state.upper() not in self.valid_states:
            errors.append(f"Invalid state. Must be one of: {', '.join(self.valid_states)}")
        
        return errors
    
    def lookup(self, registration, state):
        """Lookup Australian vehicle with comprehensive error handling"""
        # Validate inputs
        errors = self.validate_inputs(registration, state)
        if errors:
            return {"error": "; ".join(errors)}
        
        try:
            params = {
                'RegistrationNumber': registration.strip(),
                'State': state.upper(),
                'username': self.username
            }
            
            response = requests.get(self.base_url, params=params, timeout=15)
            response.raise_for_status()
            
            # Parse XML response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No vehicle data found for this registration"}
            
            vehicle_data = json.loads(json_element.text)
            
            # Add lookup metadata
            vehicle_data['lookup_info'] = {
                'registration': registration.strip(),
                'state': state.upper(),
                'timestamp': response.headers.get('Date')
            }
            
            return vehicle_data
            
        except requests.Timeout:
            return {"error": "Request timed out - please try again"}
        except requests.RequestException as e:
            return {"error": f"Network error: {str(e)}"}
        except ET.ParseError:
            return {"error": "Invalid response format from API"}
        except json.JSONDecodeError:
            return {"error": "Could not parse vehicle data"}
        except Exception as e:
            return {"error": f"Unexpected error: {str(e)}"}
    
    def lookup_multiple_states(self, registration, states=None):
        """Try lookup across multiple states if state is unknown"""
        if states is None:
            states = self.valid_states
        
        results = {}
        for state in states:
            result = self.lookup(registration, state)
            if "error" not in result:
                return result  # Return first successful match
            results[state] = result
        
        return {"error": "Vehicle not found in any specified states", "attempts": results}

# Usage examples
api = AustralianVehicleAPI("your_username")

# Single state lookup
result = api.lookup("ABC123", "NSW")
if "error" not in result:
    print(f"Found: {result.get('Description')}")
    print(f"State: {result.get('State')}")
    if 'extended' in result:
        ext = result['extended']
        print(f"Engine: {ext.get('engineDescription')}")
        print(f"Transmission: {ext.get('transmissionType')}")
else:
    print(f"Error: {result['error']}")

# Multi-state search when state is unknown
result = api.lookup_multiple_states("XYZ789", ["NSW", "VIC", "QLD"])
if "error" not in result:
    print(f"Vehicle found in {result.get('State')}: {result.get('Description')}")

Use Cases by Industry

Insurance Industry

  • Premium Calculations – Vehicle specifications for risk assessment
  • Claims Processing – Verify vehicle details during claim investigations
  • Policy Management – Automatic vehicle data population
  • Fraud Detection – Cross-reference vehicle information across states

Automotive Industry

  • Dealership Operations – Verify trade-in vehicle specifications
  • Parts and Service – Identify correct parts using VIN and specifications
  • Vehicle History – Track registration history across states
  • Inventory Management – Automated vehicle data for listings

Fleet Management

  • Asset Tracking – Maintain comprehensive vehicle records
  • Compliance Monitoring – Ensure registration currency across fleets
  • Insurance Management – Track insurance expiry dates
  • Maintenance Scheduling – Engine specifications for service planning

Law Enforcement

  • Vehicle Identification – Quick lookups during traffic stops
  • Investigation Support – Cross-state vehicle tracking
  • Stolen Vehicle Detection – Access to stolen vehicle indicators
  • Registration Verification – Confirm registration validity

Data Variations and Considerations

Coverage Differences

Each Australian state provides different data depth based on their systems:

  • Most Comprehensive: NSW, WA, TAS (detailed technical specifications)
  • Insurance Focus: SA, ACT, QLD (insurance company information)
  • Basic Identification: VIC, NT (essential vehicle details)

Motorcycle Support

Currently available in NSW and WA with plans for expansion to other states.

Historical Data

Data availability varies by state, with some providing records from the 1990s while others focus on more recent registrations.

Getting Started

Account Setup

  1. Register at regcheck.org.uk for API access
  2. Verify email address to receive test credits
  3. Test with sample registrations from different states
  4. Purchase credits for production usage

Testing Recommendations

Test across multiple states to understand data variations:

  • NSW: Comprehensive technical data
  • VIC: Basic identification with VIN
  • QLD: Insurance-focused information
  • SA: Color and insurance details

Conclusion

The Australian Vehicle Registration API provides comprehensive access to vehicle data across all eight Australian states and territories. Each jurisdiction offers different data depths, from basic identification to detailed technical specifications including engine details, transmission types, and extended vehicle information.

Understanding state-specific data variations is crucial for effective implementation. NSW, WA, and TAS provide the most comprehensive technical data, while other states focus on identification and insurance information. The API’s support for motorcycle lookups in select states adds versatility for diverse Australian vehicle types.

The federated nature of Australian vehicle registration creates unique opportunities and challenges. Developers can leverage state-specific data strengths while implementing fallback mechanisms for comprehensive vehicle identification across the continent.

Start exploring Australian vehicle data today by registering for your API account and testing across different states to understand the rich variety of information available from Australia’s diverse vehicle registration systems.

Quicklinks:
Australian API: https://www.carregistrationapi.com.au/
Nevdis info: https://austroads.gov.au/drivers-and-vehicles/nevdis

Categories: Uncategorized

How to Open .pkpasses Files on Your iPhone: The Hidden Multi-Pass Secret #PKPASSES

If you’ve ever booked multiple tickets with airlines like EasyJet, you might have encountered a mysterious file type: .pkpasses. Unlike the familiar .pkpass files that open seamlessly in Apple Wallet, these multi-pass bundles can leave you scratching your head when they won’t open directly on your iPhone.

Don’t worry – there’s a simple workaround that airlines don’t always explain clearly. Here’s everything you need to know about .pkpasses files and how to get your boarding passes into Apple Wallet where they belong.

What Are .pkpasses Files?

A .pkpasses file is essentially a container that holds multiple .pkpass files bundled together. When you book multiple flights or tickets in a single transaction, airlines like EasyJet use this format to deliver all your passes at once, rather than sending separate emails for each boarding pass.

Think of it as a digital envelope containing multiple boarding passes – convenient for the airline’s system, but not immediately compatible with your iPhone’s Wallet app, which expects individual .pkpass files.

The Problem: Why Won’t My .pkpasses File Open?

When you try to open a .pkpasses file directly on your iPhone, you’ll likely encounter one of these frustrating scenarios:

  • The file downloads but nothing happens when you tap it
  • You get an error message saying the file can’t be opened
  • The Wallet app doesn’t recognize or import the passes

This happens because Apple Wallet is designed to handle individual .pkpass files, not the bundled .pkpasses format.

The Solution: Extract Individual Passes

Here’s the step-by-step process to extract your individual boarding passes from a .pkpasses file:

Step 1: Rename the File Extension

The key insight is that .pkpasses files are actually ZIP archives in disguise. To access the individual passes inside:

  1. Save the .pkpasses file to your device (usually through email or download)
  2. Rename the file extension from .pkpasses to .zip
  3. You can do this using the Files app on iOS, or more easily on a computer

Step 2: Unzip the Archive

Once renamed to .zip, you can extract the contents:

  • On iPhone/iPad: Use the Files app to tap the ZIP file and it will automatically extract
  • On Mac/PC: Double-click the ZIP file or use your preferred extraction tool

Step 3: Find Your Individual .pkpass Files

Inside the extracted folder, you’ll discover multiple .pkpass files – one for each boarding pass or ticket in your booking. These files will typically be named with flight numbers, dates, or passenger names.

Step 4: Email the Passes to Yourself

This is where the magic happens:

  1. Select each .pkpass file individually
  2. Email them to yourself (or use AirDrop if working on a Mac)
  3. Open the email on your iPhone
  4. Tap each .pkpass attachment
  5. Each pass will now open properly in Apple Wallet

Why This Method Works

By extracting and emailing the individual .pkpass files, you’re essentially doing what the airline’s system should have done in the first place – delivering each pass in a format that Apple Wallet can recognize and import.

The email step is crucial because it triggers iOS to properly recognize the MIME type and offer to open the file in Wallet. Simply copying the extracted .pkpass files to your phone via other methods might not work as reliably.

Pro Tips for Managing Multiple Passes

  • Organize by trip: Create separate emails for outbound and return flights
  • Check all details: Verify that each extracted pass contains the correct passenger and flight information
  • Keep the original: Save the original .pkpasses file as a backup
  • Test early: Don’t wait until you’re at the airport to discover pass issues

Alternative Solutions

If the manual extraction method seems too technical, consider these alternatives:

  • Contact the airline: Many airlines can resend individual .pkpass files if you explain the issue
  • Use airline apps: Download the airline’s official app, which often provides wallet-compatible passes
  • Third-party tools: Some online services can convert .pkpasses to individual passes, though be cautious about uploading sensitive travel documents

When You Might Encounter .pkpasses Files

This file format is most commonly used by:

  • Budget airlines like EasyJet for multi-leg bookings
  • Travel booking platforms managing multiple tickets
  • Event organizers selling group or family ticket bundles
  • Transit authorities for multi-ride passes

Conclusion

While .pkpasses files might seem like an unnecessary complication, understanding how to handle them ensures you’re never stuck without access to your boarding passes. The rename-to-ZIP trick is a simple but powerful solution that turns a frustrating file format issue into a minor inconvenience.

Next time you receive a .pkpasses file, you’ll know exactly what to do: rename it to .zip, extract the individual passes, and email them to yourself. Your future self at the airport will thank you for taking these few extra minutes to ensure your passes are properly loaded in Apple Wallet.

Remember, technology should make travel easier, not harder – and now you have the knowledge to make sure it does.

Unlock Brand Recognition in Emails: Free #BIMI #API from AvatarAPI.com

https://www.avatarapi.com/

Email marketing is more competitive than ever, and standing out in crowded inboxes is a constant challenge. What if there was a way to instantly make your emails more recognizable and trustworthy? Enter BIMI – a game-changing email authentication standard that’s revolutionizing how brands appear in email clients.

What is BIMI? (In Simple Terms)

BIMI stands for “Brand Indicators for Message Identification.” Think of it as a verified profile picture for your company’s emails. Just like how you recognize friends by their profile photos on social media, BIMI lets email providers display your company’s official logo next to emails you send.

Here’s how it works in everyday terms:

  • Traditional email: When Spotify sends you an email, you might only see their name in your inbox
  • BIMI-enabled email: You’d see Spotify’s recognizable logo right next to their name, making it instantly clear the email is legitimate

This visual verification helps recipients quickly identify authentic emails from brands they trust, while making it harder for scammers to impersonate legitimate companies.

Why BIMI Matters for Your Business

Instant Brand Recognition: Your logo appears directly in the inbox, increasing brand visibility and email open rates.

Enhanced Trust: Recipients can immediately verify that emails are genuinely from your company, reducing the likelihood they’ll mark legitimate emails as spam.

Competitive Advantage: Many companies haven’t implemented BIMI yet, so adopting it early helps you stand out.

Better Deliverability: Email providers like Gmail and Yahoo prioritize authenticated emails, potentially improving your delivery rates.

Introducing the Free BIMI API from AVATARAPI.com

While implementing BIMI traditionally requires DNS configuration and technical setup, AVATARAPI.com offers a simple API that lets you retrieve BIMI information for any email domain instantly. This is perfect for:

  • Email marketing platforms checking sender authenticity
  • Security tools validating email sources
  • Analytics services tracking BIMI adoption
  • Developers building email-related applications

How to Use the Free BIMI API

Getting started is incredibly simple. Here’s everything you need to know:

API Endpoint

POST https://avatarapi.com/v2/api.aspx

Request Format

Send a JSON request with these parameters:

{
    "username": "demo",
    "password": "demo___",
    "provider": "Bimi",
    "email": "no-reply@alerts.spotify.com"
}

Parameters Explained:

  • username & password: Use “demo” and “demo___” for free access
  • provider: Set to “Bimi” to retrieve BIMI data
  • email: The email address you want to check for BIMI records

Example Response

The API returns comprehensive BIMI information:

{
    "Name": "",
    "Image": "https://message-editor.scdn.co/spotify_ab_1024216054.svg",
    "Valid": true,
    "City": "",
    "Country": "",
    "IsDefault": false,
    "Success": true,
    "RawData": "",
    "Source": {
        "Name": "Bimi"
    }
}

Response Fields:

  • Image: Direct URL to the company’s BIMI logo
  • Valid: Whether the BIMI record is properly configured
  • Success: Confirms the API call was successful
  • IsDefault: Indicates if this is a fallback or authentic BIMI record

Practical Use Cases

Email Security Platforms: Verify sender authenticity by checking if incoming emails have valid BIMI records.

Marketing Analytics: Track which competitors have implemented BIMI to benchmark your email marketing efforts.

Email Client Development: Integrate BIMI logo display into custom email applications.

Compliance Monitoring: Ensure your company’s BIMI implementation is working correctly across different domains.

Try It Now

Ready to explore BIMI data? The API is free to use with the demo credentials provided above. Simply make a POST request to test it with any email address – try major brands like Spotify, PayPal, or LinkedIn to see their BIMI implementations in action.

Whether you’re a developer building email tools, a marketer researching competitor strategies, or a security professional validating email authenticity, this free BIMI API provides instant access to valuable brand verification data.

Start integrating BIMI checking into your applications today and help make email communication more secure and recognizable for everyone.
https://www.avatarapi.com/

German Vehicle #KBA #API: Complete Guide to German Car Data Lookup Using KBA Numbers

https://www.kbaapi.de/
Audi R8 Spyder 5.2 FSI quattro in Kupferzell

Germany represents Europe’s largest automotive market and home to world-renowned manufacturers like BMW, Mercedes-Benz, Audi, and Volkswagen. Unlike most vehicle registration APIs that use license plates, the German Vehicle API operates using KBA numbers (Kraftfahrt-Bundesamt codes) – unique identifiers registered with the Federal Motor Transport Authority. (https://www.kbaapi.de/)

Understanding the German KBA System

The Kraftfahrt-Bundesamt (KBA) is Germany’s Federal Motor Transport Authority, responsible for vehicle type approvals and maintaining the central database of vehicle specifications. Every vehicle model sold in Germany receives a unique KBA number that identifies its exact specifications, engine type, and technical details.

What is a KBA Number?

A KBA number consists of two parts in the format HSN/TSN:

  • HSN (Herstellerschlüsselnummer) – Manufacturer key number
  • TSN (Typschlüsselnummer) – Type key number

Together, these numbers uniquely identify a specific vehicle model variant, including engine specifications, body type, and equipment levels.

Where to Find KBA Numbers

KBA numbers can be found in several locations on German vehicle documentation:

  • Vehicle Registration Certificate (Part 1) – Fields 2.1 and 2.2
  • Vehicle Registration Document – Boxes 2 and 3
  • Certificate of Conformity – Technical documentation
  • Insurance Documents – Often included in policy details

German Vehicle API Features

The German endpoint provides comprehensive technical specifications for vehicles registered in Germany:

Available Data

When querying German vehicle records using KBA numbers, you can retrieve:

  • Make and Model – Complete manufacturer and model designation
  • Engine Specifications – Power in both KW and horsepower (PS)
  • Engine Capacity – Displacement in cubic centimeters
  • Fuel Type – Petrol (Benzin), diesel, electric, or hybrid classifications
  • Technical Period – Years of manufacture for this specification
  • Representative Images – Visual identification of the vehicle type

Sample Response Format

{
  "Description": "ALFA GIULIETTA Spider 1.3 [196101 - 196212] (59kW 80hp Otto AR 00508)",
  "CarMake": {
    "CurrentTextValue": "alfa romeo"
  },
  "CarModel": {
    "CurrentTextValue": "GIULIETTA SPIDER"
  },
  "MakeDescription": {
    "CurrentTextValue": "alfa romeo"
  },
  "ModelDescription": {
    "CurrentTextValue": "GIULIETTA SPIDER"
  },
  "PowerKW": 59,
  "PowerHP": 80,
  "EngineSize": 1281,
  "Fuel": "Benzin"
}

API Implementation

Endpoint Usage

The German Vehicle API uses the /CheckGermany endpoint and requires two parameters:

  1. KBA Number – In HSN/TSN format (e.g., “4000/305”)
  2. Username – Your API authentication username

Basic Implementation Example

// JavaScript example for German KBA lookup
async function lookupGermanVehicle(kbaNumber, username) {
  const apiUrl = `https://www.regcheck.org.uk/api/reg.asmx/CheckGermany?KBANumber=${kbaNumber}&username=${username}`;
  
  try {
    const response = await fetch(apiUrl);
    const xmlText = await response.text();
    
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(xmlText, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    return {
      make: vehicleInfo.MakeDescription.CurrentTextValue,
      model: vehicleInfo.ModelDescription.CurrentTextValue,
      powerKW: vehicleInfo.PowerKW,
      powerHP: vehicleInfo.PowerHP,
      engineSize: vehicleInfo.EngineSize,
      fuel: vehicleInfo.Fuel,
      description: vehicleInfo.Description
    };
  } catch (error) {
    console.error('German KBA lookup failed:', error);
    return null;
  }
}

// Usage example
lookupGermanVehicle("4000/305", "your_username")
  .then(data => {
    if (data) {
      console.log(`Vehicle: ${data.make} ${data.model}`);
      console.log(`Power: ${data.powerKW}kW (${data.powerHP}hp)`);
      console.log(`Engine: ${data.engineSize}cc ${data.fuel}`);
    }
  });

Python Implementation

import requests
import xml.etree.ElementTree as ET
import json

def lookup_german_vehicle(kba_number, username):
    """
    Look up German vehicle data using KBA number
    
    Args:
        kba_number (str): KBA number in format "HSN/TSN"
        username (str): API username
        
    Returns:
        dict: Vehicle specifications or None if not found
    """
    url = "https://www.regcheck.org.uk/api/reg.asmx/CheckGermany"
    params = {
        'KBANumber': kba_number,
        'username': username
    }
    
    try:
        response = requests.get(url, params=params)
        response.raise_for_status()
        
        # Parse XML response
        root = ET.fromstring(response.content)
        json_element = root.find('.//vehicleJson')
        
        if json_element is not None and json_element.text:
            vehicle_data = json.loads(json_element.text)
            
            return {
                'make': vehicle_data.get('MakeDescription', {}).get('CurrentTextValue'),
                'model': vehicle_data.get('ModelDescription', {}).get('CurrentTextValue'),
                'power_kw': vehicle_data.get('PowerKW'),
                'power_hp': vehicle_data.get('PowerHP'),
                'engine_size': vehicle_data.get('EngineSize'),
                'fuel_type': vehicle_data.get('Fuel'),
                'description': vehicle_data.get('Description')
            }
        else:
            return None
            
    except Exception as e:
        print(f"Error looking up KBA {kba_number}: {e}")
        return None

# Example usage
vehicle_info = lookup_german_vehicle("4000/305", "your_username")
if vehicle_info:
    print(f"Make: {vehicle_info['make']}")
    print(f"Model: {vehicle_info['model']}")
    print(f"Power: {vehicle_info['power_kw']}kW ({vehicle_info['power_hp']}hp)")
    print(f"Engine: {vehicle_info['engine_size']}cc")
    print(f"Fuel: {vehicle_info['fuel_type']}")

German Automotive Market Context

Major German Manufacturers

The German automotive industry is dominated by several world-leading manufacturers, each with distinct KBA number ranges:

Luxury Brands:

  • Mercedes-Benz – Known for luxury sedans, SUVs, and commercial vehicles
  • BMW – Premium vehicles including the iconic 3 Series, 5 Series, and X-series SUVs
  • Audi – Volkswagen Group’s luxury division with quattro all-wheel drive technology

Volume Manufacturers:

  • Volkswagen – Europe’s largest automaker with diverse model range
  • Opel – German subsidiary of Stellantis (formerly General Motors)
  • Ford Germany – American manufacturer’s European operations

Specialist Manufacturers:

  • Porsche – High-performance sports cars and SUVs
  • Smart – City cars and electric vehicles
  • Maybach – Ultra-luxury vehicles

Technical Specifications in German Data

German vehicle data typically includes precise technical specifications reflecting the country’s rigorous automotive standards:

Engine Data:

  • Power ratings in both KW (European standard) and PS (German horsepower)
  • Precise displacement measurements in cubic centimeters
  • Detailed fuel type classifications including Euro emission standards

Period Information:

  • Exact production periods showing when specifications were valid
  • Model year ranges for specific technical configurations
  • Regulatory compliance periods

Use Cases for German KBA API

Insurance Industry Applications

Premium Calculation:

  • Access precise power ratings for risk assessment
  • Engine size data for determining insurance categories
  • Technical specifications for replacement value calculations

Claims Processing:

  • Verify vehicle specifications for parts compatibility
  • Confirm power ratings for performance-related claims
  • Validate technical data for repair cost estimates

Automotive Industry

Parts and Service:

  • Identify correct parts using precise technical specifications
  • Determine service intervals based on engine types
  • Verify compatibility for aftermarket components

Vehicle Trading:

  • Accurate vehicle descriptions for used car listings
  • Specification verification for import/export documentation
  • Technical data for vehicle valuations

Fleet Management

Asset Tracking:

  • Maintain detailed technical records of company vehicles
  • Power and fuel type data for operational planning
  • Engine specifications for maintenance scheduling

Compliance Monitoring:

  • Verify emissions standards for environmental regulations
  • Power ratings for driver license category compliance
  • Technical data for safety inspections

Development and Research

Market Analysis:

  • Technical specification trends in German automotive market
  • Power and efficiency data for competitive analysis
  • Fuel type distribution for market research

Regulatory Compliance:

  • Emission standard verification for import/export
  • Technical data for type approval processes
  • Specification validation for regulatory filings

KBA Number Validation and Best Practices

Input Validation

function validateKBANumber(kbaNumber) {
  // KBA format: HSN/TSN (e.g., "4000/305")
  const kbaPattern = /^\d{4}\/\d{3}$/;
  
  if (!kbaNumber) {
    return { valid: false, error: "KBA number is required" };
  }
  
  if (!kbaPattern.test(kbaNumber)) {
    return { 
      valid: false, 
      error: "Invalid KBA format. Expected format: XXXX/XXX (e.g., 4000/305)" 
    };
  }
  
  const [hsn, tsn] = kbaNumber.split('/');
  
  if (parseInt(hsn) < 1000 || parseInt(hsn) > 9999) {
    return { valid: false, error: "HSN must be between 1000 and 9999" };
  }
  
  if (parseInt(tsn) < 1 || parseInt(tsn) > 999) {
    return { valid: false, error: "TSN must be between 001 and 999" };
  }
  
  return { valid: true };
}

// Example usage
const validation = validateKBANumber("4000/305");
if (validation.valid) {
  // Proceed with API call
} else {
  console.error(validation.error);
}

Error Handling

class GermanVehicleAPI:
    def __init__(self, username):
        self.username = username
        self.base_url = "https://www.regcheck.org.uk/api/reg.asmx/CheckGermany"
    
    def validate_kba_format(self, kba_number):
        """Validate KBA number format"""
        if not kba_number or '/' not in kba_number:
            return False, "KBA number must contain HSN/TSN format"
        
        try:
            hsn, tsn = kba_number.split('/')
            if len(hsn) != 4 or len(tsn) != 3:
                return False, "HSN must be 4 digits, TSN must be 3 digits"
            
            int(hsn)  # Validate numeric
            int(tsn)  # Validate numeric
            return True, "Valid format"
        except ValueError:
            return False, "HSN and TSN must be numeric"
    
    def lookup(self, kba_number):
        """Lookup vehicle by KBA number with comprehensive error handling"""
        # Validate format
        is_valid, message = self.validate_kba_format(kba_number)
        if not is_valid:
            return {"error": message}
        
        try:
            response = requests.get(self.base_url, params={
                'KBANumber': kba_number,
                'username': self.username
            }, timeout=10)
            
            if response.status_code == 404:
                return {"error": "KBA number not found in database"}
            
            response.raise_for_status()
            
            # Parse response
            root = ET.fromstring(response.content)
            json_element = root.find('.//vehicleJson')
            
            if json_element is None or not json_element.text:
                return {"error": "No vehicle data available for this KBA number"}
            
            return json.loads(json_element.text)
            
        except requests.Timeout:
            return {"error": "API request timed out"}
        except requests.RequestException as e:
            return {"error": f"API request failed: {str(e)}"}
        except ET.ParseError:
            return {"error": "Invalid XML response from API"}
        except json.JSONDecodeError:
            return {"error": "Invalid JSON data in response"}

# Usage
api = GermanVehicleAPI("your_username")
result = api.lookup("4000/305")

if "error" in result:
    print(f"Lookup failed: {result['error']}")
else:
    print(f"Vehicle found: {result.get('Description')}")

Comparison with License Plate Systems

Why KBA Numbers Instead of License Plates?

The German system’s use of KBA numbers instead of license plates reflects several key differences:

Technical Precision:

  • KBA numbers identify exact technical specifications
  • License plates only identify individual vehicles
  • Multiple vehicles can share the same KBA specifications

Privacy Protection:

  • KBA lookups don’t reveal personal ownership information
  • License plate systems often include owner data
  • Complies with strict German data protection laws (GDPR)

Standardization:

  • KBA numbers are consistent across all German states
  • License plate formats vary by region and time period
  • Technical specifications remain constant regardless of registration location

Alternative: German License Plate Availability

For developers specifically needing German license plate availability checking, a separate service is available through RapidAPI. However, this service only checks if a license plate combination is available for registration, not vehicle specifications.

Data Coverage and Limitations

Coverage Scope

  • Complete KBA Database – All vehicles approved for German market
  • Historical Data – Vehicles from 1960s onwards
  • Technical Accuracy – Official specifications from Federal Motor Transport Authority
  • Regular Updates – Database maintained with current approvals

Limitations

  • KBA Number Required – Cannot lookup by license plate
  • German Market Only – Covers vehicles approved for German sale
  • Technical Focus – Provides specifications, not ownership data
  • Import Vehicles – Limited data for non-German market vehicles

Getting Started with German KBA API

Account Setup Process

  1. Register Account – Sign up at regcheck.org.uk
  2. Email Verification – Confirm account to receive test credits
  3. Test with Sample Data – Use KBA number “4000/305” for testing
  4. Production Setup – Purchase credits for live applications

Sample KBA Numbers for Testing

  • 4000/305 – Alfa Romeo Giulietta Spider 1.3L
  • Test this KBA number without consuming credits during development

Integration Planning

  • Determine if your application needs KBA number input from users
  • Consider how to help users locate their KBA numbers
  • Plan for error handling when KBA numbers aren’t found
  • Design UI to display technical specifications clearly

Conclusion

The German Vehicle KBA API provides unique access to precise technical specifications for vehicles in the German market. By using official KBA numbers rather than license plates, the system offers technical accuracy while maintaining privacy compliance.

The API serves various industries from insurance and automotive services to fleet management and regulatory compliance. With proper implementation and error handling, developers can integrate reliable German vehicle specification data into their applications.

Understanding the KBA system’s technical focus and format requirements is essential for successful integration. The system’s precision makes it particularly valuable for applications requiring exact vehicle specifications rather than general identification data.

Ready to access German vehicle technical data? Register for your API account and start exploring the comprehensive KBA database today.
https://www.kbaapi.de/

Categories: Uncategorized

USA Vehicle Registration API: Complete Guide to American VIN and License Plate Lookups

The United States represents one of the largest automotive markets in the world, with over 270 million registered vehicles across all 50 states. For developers and businesses working with American vehicle data, the USA Vehicle Registration API provides instant access to comprehensive vehicle information using license plate numbers and state codes. See here: https://www.vehicleregistrationapi.com/

Overview of USA Vehicle Registration System

Unlike many countries that have centralized vehicle registration systems, the United States operates on a state-by-state basis. Each of the 50 states, plus Washington D.C., Puerto Rico, Guam, and the Virgin Islands, maintains its own vehicle registration database. This decentralized approach means that vehicle lookups require both the license plate number and the state where the vehicle is registered.

USA Vehicle API Features

The USA endpoint provides access to vehicle information across all American jurisdictions, including:

Supported Jurisdictions

  • All 50 States – From Alabama to Wyoming
  • Federal District – Washington D.C. (DC)
  • Territories – Puerto Rico (PR), Guam (GU), Virgin Islands (VI)

Data Available

When querying American vehicle registrations, you can retrieve:

  • Vehicle Description – Complete make, model, and year information
  • Body Style – Vehicle type classification (sedan, SUV, pickup truck, etc.)
  • VIN Number – Complete 17-character Vehicle Identification Number
  • Engine Specifications – Engine size and configuration details
  • Country of Assembly – Where the vehicle was manufactured
  • Registration Year – Year the vehicle was first registered

API Implementation

Endpoint Usage

The USA Vehicle Registration API uses the /CheckUSA endpoint and requires two parameters:

  1. License Plate Number – The registration number (without spaces or special characters)
  2. State Code – Two-letter abbreviation for the state of registration

State Codes Reference

The API accepts standard two-letter state abbreviations:

States A-M:

  • AL (Alabama), AK (Alaska), AZ (Arizona), AR (Arkansas)
  • CA (California), CO (Colorado), CT (Connecticut), DE (Delaware)
  • FL (Florida), GA (Georgia), HI (Hawaii), ID (Idaho)
  • IL (Illinois), IN (Indiana), IA (Iowa), KS (Kansas)
  • KY (Kentucky), LA (Louisiana), ME (Maine), MD (Maryland)
  • MA (Massachusetts), MI (Michigan), MN (Minnesota), MS (Mississippi), MO (Missouri), MT (Montana)

States N-W:

  • NE (Nebraska), NV (Nevada), NH (New Hampshire), NJ (New Jersey)
  • NM (New Mexico), NY (New York), NC (North Carolina), ND (North Dakota)
  • OH (Ohio), OK (Oklahoma), OR (Oregon), PA (Pennsylvania)
  • RI (Rhode Island), SC (South Carolina), SD (South Dakota), TN (Tennessee)
  • TX (Texas), UT (Utah), VT (Vermont), VA (Virginia)
  • WA (Washington), WV (West Virginia), WI (Wisconsin), WY (Wyoming)

Federal & Territories:

  • DC (District of Columbia), GU (Guam), PR (Puerto Rico), VI (Virgin Islands)

Sample Implementation

Basic API Call Example

// JavaScript example for USA vehicle lookup
const username = 'your_api_username';
const plateNumber = 'ABC1234';
const state = 'CA'; // California

const apiUrl = `https://www.regcheck.org.uk/api/reg.asmx/CheckUSA?RegistrationNumber=${plateNumber}&State=${state}&username=${username}`;

fetch(apiUrl)
  .then(response => response.text())
  .then(data => {
    // Parse XML response
    const parser = new DOMParser();
    const xmlDoc = parser.parseFromString(data, "text/xml");
    const jsonData = xmlDoc.getElementsByTagName("vehicleJson")[0].textContent;
    const vehicleInfo = JSON.parse(jsonData);
    
    console.log("Vehicle:", vehicleInfo.Description);
    console.log("VIN:", vehicleInfo.VechileIdentificationNumber);
    console.log("Body Style:", vehicleInfo.BodyStyle.CurrentTextValue);
  })
  .catch(error => console.error('Error:', error));

Response Format

The API returns data in both XML and JSON formats. Here’s a sample response for a 2004 Dodge Durango:

{
  "Description": "2004 Dodge Durango Limited",
  "BodyStyle": {
    "CurrentTextValue": "SUV 4D"
  },
  "VechileIdentificationNumber": "1D8HB58D04F177301",
  "Assembly": "United States",
  "EngineSize": {
    "CurrentTextValue": "5.7L V8 MPI"
  },
  "RegistrationYear": "2004",
  "CarMake": {
    "CurrentTextValue": "Dodge"
  },
  "CarModel": {
    "CurrentTextValue": "Durango Limited"
  },
  "MakeDescription": {
    "CurrentTextValue": "Dodge"
  },
  "ModelDescription": {
    "CurrentTextValue": "Durango Limited"
  }
}

State-Specific Considerations

California (CA)

California has one of the most comprehensive vehicle databases in the US, with detailed information available for most vehicles. The state’s emissions requirements mean additional environmental data may be available.

Texas (TX)

As the second-largest state by population and vehicle registrations, Texas maintains extensive records. The state’s diverse automotive market includes everything from pickup trucks to luxury vehicles.

Florida (FL)

Florida’s high volume of vehicle imports and exports, combined with its large retiree population, creates a unique mix of vehicle types and registration patterns.

New York (NY)

New York’s database includes both upstate rural vehicles and New York City urban registrations, providing a diverse dataset for vehicle information.

Use Cases for USA Vehicle API

Insurance Industry Applications

  • Policy Underwriting – Verify vehicle specifications for accurate premium calculations
  • Claims Processing – Validate vehicle information during accident claims
  • Fraud Prevention – Cross-reference vehicle details to detect inconsistencies

Automotive Dealers

  • Inventory Management – Automatically populate vehicle listings with accurate specifications
  • Trade-In Valuations – Verify vehicle details for pricing assessments
  • Sales Documentation – Ensure accurate vehicle information on sales contracts

Fleet Management

  • Asset Tracking – Maintain detailed records of company vehicle fleets
  • Compliance Monitoring – Verify vehicle specifications for regulatory compliance
  • Maintenance Scheduling – Access manufacturer specifications for service intervals

Law Enforcement

  • Vehicle Identification – Quick lookup for traffic stops and investigations
  • Asset Recovery – Verify vehicle ownership and specifications
  • Investigation Support – Cross-reference vehicle data in criminal cases

Mobile Applications

  • Car Shopping Apps – Instant vehicle specification lookup for used car buyers
  • Maintenance Apps – Access vehicle specs for service reminders and parts ordering
  • Insurance Apps – Quick vehicle verification for policy quotes

Integration Best Practices

Error Handling

Always implement robust error handling when working with the USA API:

import requests
import xml.etree.ElementTree as ET
import json

def lookup_usa_vehicle(plate_number, state, username):
    try:
        url = f"https://www.regcheck.org.uk/api/reg.asmx/CheckUSA"
        params = {
            'RegistrationNumber': plate_number,
            'State': state,
            'username': username
        }
        
        response = requests.get(url, params=params)
        response.raise_for_status()
        
        # Parse XML response
        root = ET.fromstring(response.content)
        json_data = root.find('.//vehicleJson').text
        
        if json_data:
            vehicle_data = json.loads(json_data)
            return vehicle_data
        else:
            return {"error": "No vehicle data found"}
            
    except requests.RequestException as e:
        return {"error": f"API request failed: {str(e)}"}
    except ET.ParseError as e:
        return {"error": f"XML parsing failed: {str(e)}"}
    except json.JSONDecodeError as e:
        return {"error": f"JSON parsing failed: {str(e)}"}

# Usage example
result = lookup_usa_vehicle("ABC1234", "CA", "your_username")
print(result)

Rate Limiting and Credits

The USA Vehicle API operates on a credit-based system:

  • Each successful lookup consumes one credit
  • Failed lookups (no data found) typically don’t consume credits
  • Monitor your credit balance to avoid service interruptions
  • Consider implementing local caching for frequently accessed data

Data Validation

Before making API calls, validate input parameters:

function validateUSALookup(plateNumber, state) {
  // Valid US state codes
  const validStates = [
    'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA',
    'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD',
    'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ',
    'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC',
    'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY',
    'DC', 'GU', 'PR', 'VI'
  ];
  
  if (!plateNumber || plateNumber.length < 2 || plateNumber.length > 8) {
    return { valid: false, error: "Invalid plate number length" };
  }
  
  if (!validStates.includes(state.toUpperCase())) {
    return { valid: false, error: "Invalid state code" };
  }
  
  return { valid: true };
}

Limitations and Coverage

Data Availability

  • Coverage varies by state based on data sharing agreements
  • Some states may have limited historical data
  • Newer registrations typically have more complete information
  • Commercial vehicles may have different data availability

Privacy Considerations

  • The API provides vehicle specifications, not personal owner information
  • All data returned is from publicly available vehicle registration records
  • Comply with local privacy laws when storing or processing vehicle data
  • Consider data retention policies for cached information

Getting Started

Account Setup

  1. Create Account – Register at regcheck.org.uk for API access
  2. Email Verification – Confirm your email to receive free test credits
  3. Test the Service – Use provided sample license plates for testing
  4. Purchase Credits – Buy additional credits for production use

Testing with Sample Data

Use this sample license plate for testing: ZZZ9999 with state NC (North Carolina)

This will return information about a 2004 Dodge Durango Limited without consuming your credits.

Pricing and Support

Credit Costs

  • Standard rate: 1 credit per successful vehicle lookup
  • Volume discounts available for high-usage applications
  • Failed lookups typically don’t consume credits

Technical Support

  • API documentation available at regcheck.org.uk
  • Email support for technical integration questions
  • WSDL definition available for SOAP implementations

Conclusion

The USA Vehicle Registration API provides comprehensive access to American vehicle data across all 50 states and territories. With proper implementation and error handling, developers can integrate reliable vehicle lookup functionality into their applications, supporting use cases from insurance processing to mobile app development.

The decentralized nature of American vehicle registration creates unique challenges, but the API abstracts this complexity, providing a single endpoint for nationwide vehicle data access. Whether you’re building consumer applications or enterprise solutions, the USA Vehicle Registration API offers the reliability and coverage needed for professional vehicle data integration.

Ready to start integrating American vehicle data into your application? Sign up for your free API account today and begin exploring the extensive database of US vehicle registrations.

Categories: Uncategorized Tags: , ,

Complete Guide to the UK Vehicle Registration #API: Access #DVLA Data, #MOT History, and More

Are you developing an application that needs instant access to UK vehicle information? The UK Vehicle Registration API provides comprehensive access to DVLA data, MOT history, tax information, and vehicle specifications through a simple integration. This powerful tool allows developers to retrieve detailed vehicle information using just a Vehicle Registration Mark (VRM). Here: https://regcheck.org.uk/

What is the UK Vehicle Registration API?

The UK Vehicle Registration API is a SOAP-based web service that provides instant access to official UK vehicle data. By simply entering a vehicle registration number (VRM), you can retrieve comprehensive information about cars, motorcycles, and commercial vehicles registered with the DVLA.

Key Features:

  • Instant VRM lookups for all UK-registered vehicles
  • Complete MOT history with test results and failure reasons
  • Tax status information including expiry dates
  • Comprehensive vehicle specifications including make, model, engine details
  • Support for special territories including Isle of Man and Jersey
  • Both XML and JSON response formats

UK Vehicle Data Available

Standard Vehicle Information

When you query the UK endpoint using a vehicle registration number, you’ll receive:

  • Make and Model – Manufacturer and specific vehicle model
  • Year of Registration – When the vehicle was first registered
  • VIN Number – Complete Vehicle Identification Number
  • ABI Code – Association of British Insurers classification code
  • Body Style – Vehicle type (saloon, hatchback, SUV, etc.)
  • Engine Size – Displacement in cubic centimeters
  • Number of Doors – Vehicle door configuration
  • Transmission Type – Manual or automatic
  • Fuel Type – Petrol, diesel, electric, hybrid
  • Immobiliser Status – Security system information
  • Number of Seats – Seating capacity
  • Driver Side – Left or right-hand drive
  • Vehicle Color – Primary exterior color

Example Response for UK Vehicle Data

{
  "ABICode": "32130768",
  "Description": "MERCEDES-BENZ E220 SE CDI",
  "RegistrationYear": "2013",
  "CarMake": {
    "CurrentTextValue": "MERCEDES-BENZ"
  },
  "CarModel": {
    "CurrentTextValue": "E220 SE CDI"
  },
  "EngineSize": {
    "CurrentTextValue": "2143"
  },
  "FuelType": {
    "CurrentTextValue": "Diesel"
  },
  "Transmission": {
    "CurrentTextValue": "Automatic"
  },
  "NumberOfDoors": {
    "CurrentTextValue": "4DR"
  },
  "BodyStyle": {
    "CurrentTextValue": "Saloon"
  },
  "Colour": "WHITE",
  "VehicleIdentificationNumber": "WDD2120022A899877"
}

MOT History API – Complete Test Records

One of the most valuable features of the UK Vehicle API is access to complete MOT history data. This service covers all UK cars (excluding Northern Ireland) and provides detailed test information including:

MOT Data Includes:

  • Test Date – When each MOT was conducted
  • Test Result – Pass or Fail status
  • Odometer Reading – Mileage at time of test
  • Test Number – Official MOT test reference
  • Failure Reasons – Detailed list of any failures
  • Advisory Notes – Items that need attention
  • Expiry Date – When the MOT certificate expires

MOT History Response Example

[
  {
    "TestDate": "8 November 2016",
    "ExpiryDate": "16 November 2017",
    "Result": "Pass",
    "Odometer": "61,706 miles",
    "TestNumber": "2754 6884 4000",
    "FailureReasons": [],
    "Advisories": []
  },
  {
    "TestDate": "8 November 2016",
    "Result": "Fail",
    "Odometer": "61,703 miles",
    "TestNumber": "5901 3690 4542",
    "FailureReasons": [
      "Nearside Rear Brake pipe excessively corroded (3.6.B.2c)",
      "Offside Rear Brake pipe excessively corroded (3.6.B.2c)"
    ],
    "Advisories": []
  }
]

Extended Vehicle Information with Tax Data

The API also provides enhanced vehicle information including tax and emissions data:

  • Make and Registration Date
  • Year of Manufacture
  • CO2 Emissions – Environmental impact rating
  • Tax Status – Current road tax status
  • Tax Due Date – When road tax expires
  • Vehicle Type Approval – EU approval classification
  • Wheelplan – Axle configuration
  • Weight Information – Gross vehicle weight

UK Motorcycle Support

For motorcycles registered in the UK, use the dedicated CheckMotorBikeUK endpoint. This returns motorcycle-specific information:

  • Make and Model – Manufacturer and bike model
  • Year of Registration
  • Engine Size – Engine displacement
  • Variant – Specific model variant
  • Colour – Primary color
  • VIN – Complete chassis number
  • Engine Number – Engine identification

Motorcycle Response Example

{
  "Description": "HONDA ST1300 A",
  "RegistrationYear": "2005",
  "CarMake": {
    "CurrentTextValue": "HONDA"
  },
  "CarModel": {
    "CurrentTextValue": "ST1300 A"
  },
  "EngineSize": {
    "CurrentTextValue": "1261"
  },
  "BodyStyle": {
    "CurrentTextValue": "Motorbike"
  },
  "FuelType": {
    "CurrentTextValue": "PETROL"
  },
  "Colour": "YELLOW",
  "VehicleIdentificationNumber": "JH2SC51A92M007472"
}

Isle of Man Vehicle Support

Vehicles registered in the Isle of Man (identified by “MN”, “MAN”, or “MANX” in the registration) return enhanced data including:

  • Standard vehicle information (make, model, engine size)
  • Version details – Specific trim level
  • CO2 emissions – Environmental data
  • Tax status – “Active” or expired
  • Tax expiry date – When road tax is due
  • Wheelplan – Vehicle configuration

Isle of Man Response Example

{
  "Description": "HONDA JAZZ",
  "RegistrationYear": 2012,
  "CarMake": {
    "CurrentTextValue": "HONDA"
  },
  "Version": "I-VTEC ES",
  "Colour": "SILVER",
  "Co2": "126",
  "RegistrationDate": "06/07/2012",
  "WheelPlan": "2-AXLE Rigid",
  "Taxed": "Active",
  "TaxExpiry": "31/07/2018"
}

Integration and Implementation

API Endpoint

The service is available at: https://www.regcheck.org.uk/api/reg.asmx

WSDL Definition

Access the service definition at: https://www.regcheck.org.uk/api/reg.asmx?wsdl

Authentication

All API calls require a valid username. You can obtain a test account with 10 free credits after email verification.

Sample Implementation (PHP)

<?php
$username = 'Your_Username_Here';
$regNumber = 'AB12CDE';

$xmlData = file_get_contents("https://www.regcheck.org.uk/api/reg.asmx/Check?RegistrationNumber=" . $regNumber . "&username=" . $username);

$xml = simplexml_load_string($xmlData);
$strJson = $xml->vehicleJson;
$json = json_decode($strJson);

echo "Vehicle: " . $json->Description;
echo "Year: " . $json->RegistrationYear;
echo "Fuel: " . $json->FuelType->CurrentTextValue;
?>

Use Cases for UK Vehicle API

For Businesses:

  • Insurance Companies – Instant vehicle verification and risk assessment
  • Car Dealers – Vehicle history checks and specifications
  • Fleet Management – MOT tracking and compliance monitoring
  • Automotive Marketplaces – Automated vehicle data population
  • Garage Services – Customer vehicle information lookup

For Developers:

  • Mobile Apps – Vehicle checking applications
  • Web Platforms – Integrated vehicle lookup features
  • Compliance Tools – MOT and tax reminder systems
  • Data Validation – Verify vehicle registration details

Benefits of Using the UK Vehicle Registration API

  1. Official DVLA Data – Access to authoritative government vehicle records
  2. Real-time Information – Instant access to current vehicle status
  3. Comprehensive Coverage – Supports cars, motorcycles, and commercial vehicles
  4. Historical Data – Complete MOT history with detailed records
  5. Multiple Formats – Both XML and JSON response options
  6. Reliable Service – High uptime and consistent performance
  7. Cost Effective – Credit-based pricing with free test options

Getting Started

To begin using the UK Vehicle Registration API:

  1. Sign up for a free test account at regcheck.org.uk
  2. Verify your email address to receive 10 free credits
  3. Test the API with sample vehicle registration numbers
  4. Purchase additional credits as needed for production use
  5. Implement the API in your application using provided documentation

Security and Compliance

The API includes several security features:

  • IP Address Restrictions – Lock access to specific IP addresses
  • Credit Monitoring – Balance alerts and daily usage limits
  • Secure Connections – HTTPS encryption for all API calls
  • Data Protection – Compliance with UK data protection regulations

Conclusion

The UK Vehicle Registration API provides developers and businesses with comprehensive access to official DVLA data, MOT records, and vehicle specifications. Whether you’re building a consumer app for vehicle checks or integrating vehicle data into business systems, this API offers the reliability and data coverage needed for professional applications.

With support for standard UK vehicles, motorcycles, and special territories like the Isle of Man, plus detailed MOT history and tax information, the UK Vehicle Registration API is the most complete solution for accessing UK vehicle data programmatically.

Ready to get started? Visit the RegCheck website to create your free account and begin exploring UK vehicle data today.

Filling the Gaps: Introducing NicheVinDecoder – A Specialized #VIN Library for Forgotten Vehicles

When was the last time you tried to decode a VIN for an RV, specialty trailer, or electric scooter only to get a frustrating “manufacturer not found” error? If you’ve worked with vehicle data beyond mainstream cars and trucks, you’ve probably hit this wall more times than you’d care to count.

The standard NHTSA VIN decoder works brilliantly for Ford, Toyota, and GM vehicles. But what happens when you’re dealing with a Highland Ridge travel trailer, a Segway electric scooter, or a custom-built utility trailer? You’re often left with nothing but the basic World Manufacturer Identifier and a lot of guesswork.

That’s exactly the problem that led us to create NicheVinDecoder – an open-source .NET library specifically designed to decode VINs from the manufacturers that traditional decoders leave behind.

The Problem: A Tale of Two VIN Decoders

Picture this scenario: You’re building an application for an RV dealership. A customer walks in with a 2023 Highland Ridge Open Range travel trailer, VIN number 58TBM0BU8P3A13051. You run it through a standard VIN decoder and get:

Manufacturer: Highland Ridge RV (maybe)
Model Year: 2023
Everything else: Unknown

But with NicheVinDecoder, that same VIN reveals:

Manufacturer: Highland Ridge RV
Model Year: 2023
Model: Open Range 330BHS Travel Trailer
Body Style: RV Trailer [Standard] Enclosed Living Quarters
Trailer Type: Ball Pull (Travel Trailer)
Axle Configuration: Two Axles (Tandem)
Length: 38 ft - less than 40 ft
Plant Location: 3195 N. SR 5, Shipshewana, IN 46565
Model Code: A1 (330BHS)
Sequential Production Number: 3051

The difference is dramatic. Instead of generic data, you get actionable information that can drive business decisions, inventory management, and customer service.

🔗 Check out NicheVinDecoder on GitHub

Who This Library Is For

NicheVinDecoder isn’t trying to replace existing VIN decoders – it’s designed to complement them. It’s perfect for developers working with:

RV and Trailer Industry

  • Dealership management systems
  • Insurance applications
  • Parts lookup systems
  • Rental platforms

Specialty Vehicle Markets

  • Electric vehicle fleets
  • Industrial equipment tracking
  • Custom manufacturer databases
  • International vehicle imports

Data Integration Projects

  • Vehicle history reports
  • Fleet management systems
  • Auction platforms
  • Compliance tracking

The Technical Architecture

We built NicheVinDecoder with extensibility as the core principle. The library uses a factory pattern that automatically detects which decoder to use based on the World Manufacturer Identifier (WMI):

csharp

// Simple usage
var result = VinDecoder.Decode("58TBM0BU8P3A13051");

if (result.IsValid)
{
    Console.WriteLine($"Manufacturer: {result.Manufacturer}");
    Console.WriteLine($"Model: {result.Model}");
    Console.WriteLine($"Plant: {result.AdditionalProperties["PlantLocation"]}");
}

Each manufacturer decoder inherits from BaseVinDecoder and implements the specific VIN structure for that manufacturer. This means adding support for a new manufacturer is as simple as creating a new class and defining their VIN format.

Current Coverage and Growing

As of today, NicheVinDecoder supports six manufacturers across diverse vehicle types:

ManufacturerVehicle TypesExample ModelsHighland Ridge RVTravel Trailers, Fifth WheelsOpen Range, Mesa Ridge, Go PlayBrinkley RVLuxury Fifth WheelsModel Z, Model GAppalachian TrailersUtility TrailersCar Haulers, Equipment TrailersNine Tech (Segway)Electric ScootersA-Series, B-SeriesXPO ManufacturingCommercial TrailersDry Freight VansLoad Glide TrailersAluminum TrailersFlatbed Trailers

But here’s where it gets exciting – this is just the beginning.

🚀 Contribute to NicheVinDecoder

Real-World Impact

We’re already seeing NicheVinDecoder make a difference in production environments:

RV Dealership Systems: Dealers can now automatically populate inventory details, generate accurate listings, and provide instant vehicle history to customers.

Insurance Applications: Underwriters can access precise vehicle specifications for accurate risk assessment and premium calculation.

Fleet Management: Companies managing specialized vehicle fleets can track detailed asset information for maintenance scheduling and compliance reporting.

The Open Source Advantage

One of the most exciting aspects of NicheVinDecoder is its open-source nature. Every manufacturer decoder is built using publicly available VIN specifications, and we encourage the community to contribute.

Adding a new manufacturer is surprisingly straightforward:

  1. Research the VIN Structure: Gather the manufacturer’s VIN specification
  2. Create the Decoder Class: Implement the decoding logic
  3. Add Unit Tests: Ensure reliability with comprehensive tests
  4. Submit a Pull Request: Share your work with the community

We’ve made the contribution process as smooth as possible with detailed documentation, code templates, and examples.

A Community-Driven Future

The beauty of focusing on niche manufacturers is that there’s a passionate community behind each one. RV enthusiasts know Highland Ridge inside and out. Electric vehicle advocates understand every nuance of their chosen brands. Trailer professionals have deep expertise in their specialized equipment.

By tapping into this collective knowledge, NicheVinDecoder can grow to cover hundreds of specialized manufacturers that would never make it into mainstream VIN decoders.

Getting Started

Ready to try NicheVinDecoder in your project? Here’s how to get started:

Installation

bash

# Clone the repository
git clone https://github.com/infiniteloopltd/NicheVinDecoder.git

# Or reference it in your project
# (NuGet package coming soon)

Basic Usage

csharp

using NicheVinDecoder;

var result = VinDecoder.Decode(yourVin);
if (result.IsValid)
{
    // Access rich vehicle data
    var make = result.AdditionalProperties["Make"];
    var plantLocation = result.AdditionalProperties["PlantLocation"];
    // And much more...
}

📖 Full Documentation Available on GitHub

What’s Next?

We have big plans for NicheVinDecoder:

Short Term

  • NuGet package for easy installation
  • Additional RV manufacturers (Forest River, Thor Industries)
  • More electric vehicle brands
  • Enhanced error handling and validation

Long Term

  • Web API for non-.NET applications
  • Machine learning for automatic VIN structure detection
  • Integration with popular vehicle databases
  • Mobile SDK for field applications

Community Driven

  • Whatever manufacturers the community needs most
  • International vehicle support
  • Specialized industry focus areas

Join the Movement

NicheVinDecoder represents more than just another code library – it’s a movement to ensure that no vehicle gets left behind in our increasingly digital automotive world.

Whether you’re a developer who’s frustrated by VIN decoder limitations, a domain expert with knowledge of a specific manufacturer, or simply someone who believes that open source makes everything better, we’d love to have you join us.

Ways to Get Involved:

🔧 Developers: Contribute decoder classes for manufacturers you know 📚 Domain Experts: Share VIN specifications and vehicle knowledge
🧪 Testers: Help validate decoders with real-world VIN samples 📢 Advocates: Spread the word in your professional networks

⭐ Star NicheVinDecoder on GitHub

Conclusion

Every VIN tells a story. With mainstream vehicles, that story is usually easy to read. But for the millions of specialty vehicles on our roads – the RVs that enable adventure, the trailers that move commerce, the electric scooters that transform urban mobility – those stories have been largely untold.

NicheVinDecoder changes that. By focusing on the forgotten corners of the automotive world and leveraging the power of open source collaboration, we’re building something that couldn’t exist any other way.

The next time you encounter a VIN from a manufacturer you’ve never heard of, don’t just shrug and move on. That vehicle has a story to tell – and with your help, NicheVinDecoder can learn to tell it.

Ready to dive in? Check out the project on GitHub, try it with your own VINs, and let us know what manufacturers you’d like to see supported next.

🎯 Visit NicheVinDecoder on GitHub Today


Have experience with a manufacturer not yet covered by NicheVinDecoder? We’d love to hear from you! Open an issue on GitHub or reach out to discuss adding support for your area of expertise.

Categories: Uncategorized

Porting a PHP OAuth Spotler Client to C#: Lessons Learned

Recently I had to integrate with Spotler’s REST API from a .NET application. Spotler provides a powerful marketing automation platform, and their API uses OAuth 1.0 HMAC-SHA1 signatures for authentication.

They provided a working PHP client, but I needed to port this to C#. Here’s what I learned (and how you can avoid some common pitfalls).


🚀 The Goal

We started with a PHP class that:

✅ Initializes with:

  • consumerKey
  • consumerSecret
  • optional SSL certificate verification

✅ Creates properly signed OAuth 1.0 requests

✅ Makes HTTP requests with cURL and parses the JSON responses.

I needed to replicate this in C# so we could use it inside a modern .NET microservice.


🛠 The Port to C#

🔑 The tricky part: OAuth 1.0 signatures

Spotler’s API requires a specific signature format. It’s critical to:

  1. Build the signature base string by concatenating:
    • The uppercase HTTP method (e.g., GET),
    • The URL-encoded endpoint,
    • And the URL-encoded, sorted OAuth parameters.
  2. Sign it using HMAC-SHA1 with the consumerSecret followed by &.
  3. Base64 encode the HMAC hash.

This looks simple on paper, but tiny differences in escaping or parameter order will cause 401 Unauthorized.

💻 The final C# solution

We used HttpClient for HTTP requests, and HMACSHA1 from System.Security.Cryptography for signatures. Here’s what our C# SpotlerClient does:

✅ Generates the OAuth parameters (consumer_key, nonce, timestamp, etc).
✅ Creates the exact signature base string, matching the PHP implementation character-for-character.
✅ Computes the HMAC-SHA1 signature and Base64 encodes it.
✅ Builds the Authorization header.
✅ Sends the HTTP request, with JSON bodies if needed.

We also added better exception handling: if the API returns an error (like 401), we throw an exception that includes the full response body. This made debugging much faster.


🐛 Debugging tips for OAuth 1.0

  1. Print the signature base string.
    It needs to match exactly what Spotler expects. Any stray spaces or wrong escaping will fail.
  2. Double-check timestamp and nonce generation.
    OAuth requires these to prevent replay attacks.
  3. Compare with the PHP implementation.
    We literally copied the signature generation line-by-line from PHP into C#, carefully mapping rawurlencode to Uri.EscapeDataString.
  4. Turn off SSL validation carefully.
    During development, you might disable certificate checks (ServerCertificateCustomValidationCallback), but never do this in production.

using System.Security.Cryptography;
using System.Text;

namespace SpotlerClient
{
 
    public class SpotlerClient
    {
        private readonly string _consumerKey;
        private readonly string _consumerSecret;
        private readonly string _baseUrl = "https://restapi.mailplus.nl";
        private readonly HttpClient _httpClient;

        public SpotlerClient(string consumerKey, string consumerSecret, bool verifyCertificate = true)
        {
            _consumerKey = consumerKey;
            _consumerSecret = consumerSecret;

            var handler = new HttpClientHandler();
            if (!verifyCertificate)
            {
                handler.ServerCertificateCustomValidationCallback = (sender, cert, chain, sslPolicyErrors) => true;
            }

            _httpClient = new HttpClient(handler);
        }

        public async Task<string> ExecuteAsync(string endpoint, HttpMethod method, string jsonData = null)
        {
            var request = new HttpRequestMessage(method, $"{_baseUrl}/{endpoint}");
            var authHeader = CreateAuthorizationHeader(method.Method, endpoint);
            request.Headers.Add("Accept", "application/json");
            request.Headers.Add("Authorization", authHeader);

            if (jsonData != null)
            {
                request.Content = new StringContent(jsonData, Encoding.UTF8, "application/json");
            }

            var response = await _httpClient.SendAsync(request);

            if (!response.IsSuccessStatusCode)
            {
                var body = await response.Content.ReadAsStringAsync();
                return body;
            }

            return await response.Content.ReadAsStringAsync();
        }

        private string CreateAuthorizationHeader(string httpMethod, string endpoint)
        {
            var timestamp = DateTimeOffset.UtcNow.ToUnixTimeSeconds().ToString();
            var nonce = Guid.NewGuid().ToString("N");

            var paramString = "oauth_consumer_key=" + Uri.EscapeDataString(_consumerKey) +
                              "&oauth_nonce=" + Uri.EscapeDataString(nonce) +
                              "&oauth_signature_method=" + Uri.EscapeDataString("HMAC-SHA1") +
                              "&oauth_timestamp=" + Uri.EscapeDataString(timestamp) +
                              "&oauth_version=" + Uri.EscapeDataString("1.0");

            var sigBase = httpMethod.ToUpper() + "&" +
                          Uri.EscapeDataString(_baseUrl + "/" + endpoint) + "&" +
                          Uri.EscapeDataString(paramString);

            var sigKey = _consumerSecret + "&";

            var signature = ComputeHmacSha1Signature(sigBase, sigKey);

            var authHeader = $"OAuth oauth_consumer_key=\"{_consumerKey}\", " +
                             $"oauth_nonce=\"{nonce}\", " +
                             $"oauth_signature_method=\"HMAC-SHA1\", " +
                             $"oauth_timestamp=\"{timestamp}\", " +
                             $"oauth_version=\"1.0\", " +
                             $"oauth_signature=\"{Uri.EscapeDataString(signature)}\"";

            return authHeader;
        }

        private string ComputeHmacSha1Signature(string data, string key)
        {
            using var hmac = new HMACSHA1(Encoding.UTF8.GetBytes(key));
            var hash = hmac.ComputeHash(Encoding.UTF8.GetBytes(data));
            return Convert.ToBase64String(hash);
        }
    }
}

✅ The payoff

Once the signature was constructed precisely, authentication errors disappeared. We could now use the Spotler REST API seamlessly from C#, including:

  • importing contact lists,
  • starting campaigns,
  • and fetching campaign metrics.

📚 Sample usage

var client = new SpotlerClient(_consumerKey, _consumerSecret, false);
var endpoint = "integrationservice/contact/email@gmail.com";
var json = client.ExecuteAsync(endpoint, HttpMethod.Get).GetAwaiter().GetResult();

🎉 Conclusion

Porting from PHP to C# isn’t always as direct as it looks — especially when it comes to cryptographic signatures. But with careful attention to detail and lots of testing, we managed to build a robust, reusable client.

If you’re facing a similar integration, feel free to reach out or clone this approach. Happy coding!

Categories: Uncategorized Tags: , , , ,