Aardvark

Quote engine is running.

Endpoints

MethodPathDescription
GET/This page
GET/healthReturns { "status": "ok" }
POST/quoteRequests a motor insurance quote

POST /quote

Request

The request body must be a JSON object with the following fields. All fields are required; any other fields are ignored.

FieldTypeDescription
dateOfBirthstringDriver's date of birth, in YYYY-MM-DD format
engineSizenumberEngine size in litres; must be greater than zero
fuelTypestringOne of petrol, diesel or electric
penaltyPointsnumberPenalty points on the driver's licence; zero or more
POST /quote
Content-Type: application/json

{
  "dateOfBirth": "1990-12-10",
  "engineSize": 1.6,
  "fuelType": "petrol",
  "penaltyPoints": 0
}

Response: quote accepted

200 OK

FieldTypeDescription
resultstringAlways ACCEPTED
quoteIdstring12-character quote reference
premiumnumberAnnual premium, rounded to two decimal places
currencystringISO 4217 currency code; always GBP
validUntilstringISO 8601 UTC timestamp after which the quote expires
{
  "result": "ACCEPTED",
  "quoteId": "3F2A9C1B-7D4",
  "premium": 252.98,
  "currency": "GBP",
  "validUntil": "2026-10-11T09:30:00.000Z"
}

Response: quote declined

200 OK. The request was valid, but Aardvark will not insure this driver or vehicle.

FieldTypeDescription
resultstringAlways DECLINED
reasonsstring[]One or more human-readable reasons the quote was declined
{
  "result": "DECLINED",
  "reasons": [
    "Aardvark does not insure drivers with more than 6 penalty points"
  ]
}

Response: invalid request

400 Bad Request. The body was not valid JSON, or one or more fields were missing or invalid.

FieldTypeDescription
errorstringAlways Invalid quote request
detailsstring[]One message for each problem with the request
{
  "error": "Invalid quote request",
  "details": [
    "engineSize must be a positive number",
    "fuelType must be one of: petrol, diesel, electric"
  ]
}

Other errors

An unknown path returns 404 Not Found. The wrong HTTP method returns 405 Method Not Allowed with an Allow header. Both have a JSON body of the form { "error": "..." }.