If you want to build a custom integration (e.g., a mobile app, a CRM integration, or a custom-designed lookup page), you can use the Vehicle Lookup API directly.
**Basic Integration Flow:**
1. **Fetch Makes** - Call `/makes.php` to get the list of vehicle makes
2. **Fetch Models** - When the user selects a make, call `/models.php?make=BMW` to get models
3. **Fetch Generations** - Call `/generations.php` with make and model
4. **Fetch Engines** - Call `/engines.php` with make, model, and generation
5. **Get Performance Data** - Call `/search.php` with all four parameters to get BHP/torque data
6. **Submit Quote** - POST to `/quote-request.php` with customer details and vehicle data
**Example (JavaScript):**
```javascript
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://remappingwebsite.com/lookup/api';
// Fetch all makes
const response = await fetch(`${BASE_URL}/makes.php?api_key=${API_KEY}`);
const data = await response.json();
console.log(data.makes); // ["Abarth", "Alfa Romeo", "Audi", ...]
// Fetch models for BMW
const models = await fetch(`${BASE_URL}/models.php?api_key=${API_KEY}&make=BMW`);
const modelData = await models.json();
console.log(modelData.models); // ["1 Series", "2 Series", "3 Series", ...]
```
**VRM Lookup (if enabled):**
```javascript
const vrm = await fetch(`${BASE_URL}/vrm-lookup.php?api_key=${API_KEY}&vrm=AB12CDE`);
const vrmData = await vrm.json();
// Returns identified vehicle make, model, generation, engine
```
**Submitting a Quote:**
```javascript
const quoteData = new FormData();
quoteData.append('api_key', API_KEY);
quoteData.append('firstname', 'John');
quoteData.append('surname', 'Smith');
quoteData.append('email', 'john@example.com');
quoteData.append('telephone', '07700900000');
quoteData.append('postcode', 'AB1 2CD');
quoteData.append('make', 'BMW');
quoteData.append('model', '3 Series');
quoteData.append('generation', 'F30');
quoteData.append('engine', '320d');
// ... add services and performance data
await fetch(`${BASE_URL}/quote-request.php`, {
method:'POST',
body:quoteData
});
```
**Notes:**
- All endpoints return JSON
- CORS is enabled, so you can call the API from any domain
- Your custom colours and gauge style can be fetched via `/tenant-settings.php` and `/tenant-styles.php`
- Rate limiting may apply. Contact support if you need higher limits for custom integrations