Draft v0.1 — published for review. Not final until approved; may change incompatibly before 1.0.

Vehicle criteria and item fields

criteria-vehicle.schema.json · raw JSON · JSON Schema 2020-12

$id: https://istointents.org/schemas/0.1/criteria-vehicle.schema.json

Fields#

fieldtyperequireddescription
makestring
modelstring
trimstring
yearMininteger (≥ 1900)
yearMaxinteger (≥ 1900)
yearinteger (≥ 1900)
mileageMaxKminteger (≥ 0)
mileageKminteger (≥ 0)
fuelarray of "petrol" | "diesel" | "hybrid" | "plug-in-hybrid" | "electric" | "lpg" | "cng" | "hydrogen" | "other"
transmissionarray of "manual" | "automatic"
bodyarray of "hatchback" | "sedan" | "estate" | "suv" | "coupe" | "convertible" | "mpv" | "van" | "pickup" | "other"
drivetrainarray of "fwd" | "rwd" | "awd"
powerMinKwinteger (≥ 0)
powerMaxKwinteger (≥ 0)
powerKwinteger (≥ 0)
seatsMininteger (≥ 1)
colourarray of string
condition"new" | "used" | "certified-used"
vinstring (pattern ^[A-HJ-NPR-Z0-9]{17}$)
firstRegistrationstring (pattern ^[0-9]{4}-[0-9]{2}$)

Full schema#

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://istointents.org/schemas/0.1/criteria-vehicle.schema.json",
  "title": "Vehicle criteria and item fields",
  "type": "object",
  "properties": {
    "make": { "type": "string" },
    "model": { "type": "string" },
    "trim": { "type": "string" },
    "yearMin": { "type": "integer", "minimum": 1900 },
    "yearMax": { "type": "integer", "minimum": 1900 },
    "year": { "type": "integer", "minimum": 1900 },
    "mileageMaxKm": { "type": "integer", "minimum": 0 },
    "mileageKm": { "type": "integer", "minimum": 0 },
    "fuel": { "type": "array", "items": { "enum": ["petrol", "diesel", "hybrid", "plug-in-hybrid", "electric", "lpg", "cng", "hydrogen", "other"] } },
    "transmission": { "type": "array", "items": { "enum": ["manual", "automatic"] } },
    "body": { "type": "array", "items": { "enum": ["hatchback", "sedan", "estate", "suv", "coupe", "convertible", "mpv", "van", "pickup", "other"] } },
    "drivetrain": { "type": "array", "items": { "enum": ["fwd", "rwd", "awd"] } },
    "powerMinKw": { "type": "integer", "minimum": 0 },
    "powerMaxKw": { "type": "integer", "minimum": 0 },
    "powerKw": { "type": "integer", "minimum": 0 },
    "seatsMin": { "type": "integer", "minimum": 1 },
    "colour": { "type": "array", "items": { "type": "string" } },
    "condition": { "enum": ["new", "used", "certified-used"] },
    "vin": { "type": "string", "pattern": "^[A-HJ-NPR-Z0-9]{17}$" },
    "firstRegistration": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}$" }
  },
  "additionalProperties": false
}