API Documentation

Complete reference for Content Hub's REST API

Authentication

All API requests require authentication using API keys. Include your API key in the request header.

Headers

Authorization: Bearer your_api_key_here

Important: Keep your API keys secure and never expose them in client-side code or public repositories.

Base URL

https://api.content-hub.net/v1

Vehicle Insurance Verification

GET

Endpoint

GET /vehicle/{registration}/insurance

Parameters

ParameterTypeRequiredDescription
registrationstringYesVehicle registration number (e.g., "AB12CDE")

Response

{
  "registration": "AB12CDE",
  "insured": true,
  "policy": {
    "number": "POL123456789",
    "insurer": "Example Insurance Ltd",
    "validFrom": "2024-01-01",
    "validTo": "2024-12-31",
    "type": "Comprehensive"
  },
  "vehicle": {
    "make": "Toyota",
    "model": "Corolla",
    "year": 2020,
    "color": "Blue"
  },
  "lastUpdated": "2024-09-19T10:00:00Z"
}

Example Request

curl -X GET "https://api.cornucopia.net/v1/vehicle/AB12CDE/insurance" \
  -H "X-API-Key: your_api_key_here"

Bulk Vehicle Verification

POST

Endpoint

POST /vehicle/bulk-insurance

Request Body

{
  "registrations": ["AB12CDE", "XY34FGH", "LM56NOP"]
}

Response

{
  "results": [
    {
      "registration": "AB12CDE",
      "insured": true,
      "policy": { ... }
    },
    {
      "registration": "XY34FGH",
      "insured": false,
      "error": "Vehicle not found"
    }
  ],
  "processed": 3,
  "successful": 2,
  "failed": 1
}

Compliance Check

GET

Endpoint

GET /compliance/{registration}

Response

{
  "registration": "AB12CDE",
  "compliant": true,
  "checks": {
    "insuranceValid": true,
    "motValid": true,
    "roadTaxPaid": true,
    "noOutstandingFines": true
  },
  "lastChecked": "2024-09-19T10:00:00Z"
}

Error Codes

Status CodeError TypeDescription
400Bad RequestInvalid request parameters or malformed data
401UnauthorizedInvalid or missing API key
404Not FoundVehicle registration not found in database
429Too Many RequestsRate limit exceeded. Check your plan limits
500Internal Server ErrorServer error occurred. Please try again later

Rate Limits

API rate limits vary by your subscription plan. Rate limit headers are included in all responses.

Response Headers

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1632093600