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_hereImportant: Keep your API keys secure and never expose them in client-side code or public repositories.
Base URL
https://api.content-hub.net/v1Vehicle Insurance Verification
GETEndpoint
GET /vehicle/{registration}/insuranceParameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| registration | string | Yes | Vehicle 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
POSTEndpoint
POST /vehicle/bulk-insuranceRequest 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
GETEndpoint
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 Code | Error Type | Description |
|---|---|---|
| 400 | Bad Request | Invalid request parameters or malformed data |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Vehicle registration not found in database |
| 429 | Too Many Requests | Rate limit exceeded. Check your plan limits |
| 500 | Internal Server Error | Server 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