Developer Portal

Access tools, documentation, and resources to integrate with the AskMid Motor Insurance Database API.

SDKs & Libraries

We provide official SDKs for popular programming languages to make integration with the AskMid API easier and more reliable. Each SDK includes comprehensive documentation, examples, and type definitions.

JavaScript

JavaScript SDK

Version 1.2.0

Official JavaScript SDK for Node.js and browser applications.

Features

  • Promise-based API
  • TypeScript support
  • Error handling
  • Automatic retries
npm install askmid-api-sdk
Python

Python SDK

Version 2.1.3

Official Python SDK for server-side applications.

Features

  • Async support
  • Comprehensive error handling
  • Pagination helpers
  • Logging integration
pip install askmid-api
PHP

PHP SDK

Version 1.0.5

Official PHP SDK for integrating with the AskMid API.

Features

  • PSR-18 compatible
  • Laravel integration
  • Detailed exceptions
  • Webhook handling
composer require askmid/askmid-php
Java

Java SDK

Version 1.0.2

Official Java SDK for enterprise applications.

Features

  • Thread-safe client
  • Spring Boot integration
  • Comprehensive logging
  • Connection pooling
implementation "com.askmid:askmid-java:1.0.2"
Ruby

Ruby SDK

Version 0.9.1

Official Ruby SDK for Rails and other Ruby applications.

Features

  • Rails integration
  • ActiveRecord-like interface
  • Detailed error handling
  • Webhook support
gem install askmid-api
.NET

.NET SDK

Version 1.1.0

Official .NET SDK for C# and other .NET applications.

Features

  • Async/await support
  • Strong typing
  • Dependency injection
  • Comprehensive logging
Install-Package AskMid.Api

Community Libraries

In addition to our official SDKs, there are several community-maintained libraries that provide integration with the AskMid API. While not officially supported, these libraries may be useful for specific frameworks or languages not covered by our official SDKs.

Laravel Package

A Laravel-specific package with Facade and service provider.

View on GitHub

WordPress Plugin

WordPress plugin for integrating AskMid checks into your site.

View on GitHub

Go Client

A community-maintained Go client for the AskMid API.

View on GitHub

SDK Usage Example

JavaScript Example

// Initialize the AskMid client
const AskMid = require('askmid-api-sdk');
const client = new AskMid.Client('YOUR_API_KEY');

// Check if a vehicle is insured
async function checkVehicle(registration) {
  try {
    const result = await client.vehicles.check({
      registration: registration
    });
    
    console.log('Insurance status:', result.insured ? 'Insured' : 'Not insured');
    console.log('Policy status:', result.policyStatus);
    console.log('Last checked:', result.lastChecked);
    
    return result;
  } catch (error) {
    if (error instanceof AskMid.APIError) {
      console.error('API Error:', error.message);
      console.error('Error code:', error.code);
      console.error('Status:', error.status);
    } else {
      console.error('Unexpected error:', error);
    }
  }
}

// Call the function
checkVehicle('AB12CDE');

Python Example

# Initialize the AskMid client
import askmid

client = askmid.Client(api_key="YOUR_API_KEY")

# Check if a vehicle is insured
def check_vehicle(registration):
    try:
        result = client.vehicles.check(registration=registration)
        
        print(f"Insurance status: {'Insured' if result.insured else 'Not insured'}")
        print(f"Policy status: {result.policy_status}")
        print(f"Last checked: {result.last_checked}")
        
        return result
    except askmid.APIError as e:
        print(f"API Error: {e.message}")
        print(f"Error code: {e.code}")
        print(f"Status: {e.status}")
    except Exception as e:
        print(f"Unexpected error: {str(e)}")

# Call the function
check_vehicle("AB12CDE")

Need a Different SDK?

If you need support for a language or framework not listed here, please let us know. We're constantly expanding our SDK offerings based on developer feedback.