Skip to content

Vehicle Data - Overview

Purpose

The Vehicle Data island manages vehicle information from external sources (DriveRight, WheelSize) and enables product-to-vehicle mapping for the webshop's "search by vehicle" functionality.

Architecture

┌─────────────────────────────────────────────────────────────────┐
│                      VEHICLE DATA                                │
│                                                                  │
│  ┌────────────────────────────────────────────────────────────┐ │
│  │                   Data Source Adapters                      │ │
│  │  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │ │
│  │  │  DriveRight │  │  WheelSize  │  │  Manual Entry       │ │ │
│  │  │   Adapter   │  │   Adapter   │  │  (Admin)            │ │ │
│  │  └──────┬──────┘  └──────┬──────┘  └──────────┬──────────┘ │ │
│  └─────────┼────────────────┼────────────────────┼────────────┘ │
│            │                │                    │               │
│            └────────────────┼────────────────────┘               │
│                             ▼                                    │
│                 ┌───────────────────────┐                       │
│                 │   Vehicle Repository  │                       │
│                 │   (Unified Storage)   │                       │
│                 └───────────┬───────────┘                       │
│                             │                                    │
│            ┌────────────────┼────────────────┐                  │
│            ▼                ▼                ▼                  │
│    ┌──────────────┐ ┌──────────────┐ ┌──────────────┐          │
│    │   Vehicle    │ │  Fitment     │ │  Vehicle     │          │
│    │   Search     │ │  Service     │ │  Product     │          │
│    │   Service    │ │              │ │  Mapping     │          │
│    └──────────────┘ └──────────────┘ └──────────────┘          │
│                                                                  │
└────────────────────────────────────────────────────────────────┘
                              │ REST API
                              ▼
                    ┌─────────────────────┐
                    │      WEBSHOP        │
                    └─────────────────────┘

Core Entities

Vehicle Hierarchy

Make (Brand)
  └── Model
        └── Generation (Year Range)
              └── Variant (Engine/Trim)

Example

Volkswagen
  └── Golf
        └── Golf 8 (2019-present)
              └── 2.0 TDI 150hp
              └── 1.5 TSI 130hp
              └── GTI 245hp

Data Sources

Source Type Primary Data
DriveRight API Dutch license plate lookup
WheelSize API Global vehicle database
Manual Admin Custom vehicles, corrections

Key Features

Feature Description
Multi-source sync Aggregate data from multiple providers
License plate lookup NL/BE plate → vehicle identification
Fitment data Wheels/tyres that fit each vehicle
Conflict resolution Handle discrepancies between sources
Manual override Admin can correct/add vehicle data

Vehicle-Product Relationship

Vehicle Variant ──┬── Tyre Fitments (OE sizes)
                  │
                  └── Wheel Fitments (compatible specs)
                        ├── PCD (bolt pattern)
                        ├── Center bore
                        ├── Offset range
                        └── Diameter options

Data Flow

Sync Process

  1. Scheduler triggers daily sync
  2. Fetch updates from DriveRight/WheelSize APIs
  3. Map external data to internal schema
  4. Detect conflicts with existing data
  5. Apply conflict resolution rules
  6. Update vehicle repository
  7. Recalculate product fitments

License Plate Lookup

  1. User enters license plate
  2. Query DriveRight API (NL) or DIV API (BE)
  3. Receive vehicle identification
  4. Match to internal vehicle database
  5. Return vehicle with fitment data

Multi-Tenancy

Vehicles are shared master data across all tenants:

Data Type Scope Why
Makes/Models Global Same vehicles everywhere
Fitment specs Global Technical data is universal
Product mapping Per-tenant Each tenant has own products

API Endpoints

Endpoint Method Purpose
/api/vehicles/makes GET List all makes
/api/vehicles/makes/{id}/models GET Models for a make
/api/vehicles/models/{id}/generations GET Generations for model
/api/vehicles/lookup/{plate} GET Lookup by license plate
/api/vehicles/{id}/fitments GET Fitment data for vehicle
/api/vehicles/{id}/products GET Compatible products