{
  "$id": "https://schemas.aramis.group/catalog/vehicle-single-language-output.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "$schema": { "type": "string", "pattern": "\/catalog\/vehicle-single-language-output\\.schema\\.json$" },
    "vin": { "type": ["null", "string"], "pattern": "^[A-HJ-NPR-Z0-9]{17}$" },
    "offerId": { "type": "string", "minLength": 1 },
    "vehicleId": { "type": "string", "minLength": 1 },
    "offerType": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/offer-type-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "status": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/status-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "isMarketplace": { "type": "boolean" },
    "firstCirculationDate": { "type": ["null", "string"], "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
    "warrantyExpirationDate": { "type": ["null", "string"], "format": "date", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" },
    "mileage": { "type": "object", "additionalProperties": false, "required": ["km"], "properties": {
      "km": { "type": "integer", "minimum": 0 }
    }},
    "euronorm": { "anyOf": [{ "type": "null" }, { "$ref": "./base.schema.json#/$defs/euronorm-string" }] },
    "critair": { "anyOf": [{ "type": "null" }, { "$ref": "./base.schema.json#/$defs/critair-string" }] },
    "frenchFiscalPower": { "type": ["null", "integer"], "exclusiveMinimum": 0 },
    "frenchGenre": { "anyOf": [{ "type": "null" }, { "$ref": "./base.schema.json#/$defs/french-genre-string" }] },
    "belgianFiscalPower": { "type": ["null", "integer"], "exclusiveMinimum": 0 },
    "belgianOtoto": { "type": "object", "additionalProperties": false, "required": ["url"], "properties": {
      "url": { "type":  ["null", "string"], "format": "uri", "pattern": "^https?://" }
    }},
    "belgianCarpass": { "type": "object", "additionalProperties": false, "required": ["url"], "properties": {
      "url": { "type":  ["null", "string"], "format": "uri", "pattern": "^https?://" }
    }},
    "catalogPriceWithOptionsWithTaxes": { "type": "number", "exclusiveMinimum": 0 },
    "takeoverPremium": { "type": "number", "maximum": 0 },
    "sellingPriceWithTaxes": { "type": "number", "exclusiveMinimum": 0 },
    "discount": { "type": "object", "additionalProperties": false, "required": ["percent"], "properties": {
      "percent": { "type": "number", "minimum": 0, "maximum": 100 }
    }},
    "sellingPriceWithTakeoverWithTaxes": { "type": "number", "minimum": 0 },
    "discountWithTakeover": { "type": "object", "additionalProperties": false, "required": ["percent"], "properties": {
      "percent": { "type": "number", "minimum": 0, "maximum": 100 }
    }},
    "indicativeLoan": { "type": "object", "additionalProperties": false, "required": ["monthlyInstallment", "months"], "properties": {
      "monthlyInstallment": { "type": "number", "exclusiveMinimum": 0 },
      "months": { "type": "integer", "exclusiveMinimum": 0 }
    }},
    "variants": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["vehicleId", "status", "manufacturerColor", "simpleColor", "simpleColor2", "photo"], "properties": {
      "vehicleId": { "type": "string", "minLength": 1 },
      "status": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
        "id": { "$ref": "./base.schema.json#/$defs/status-id" },
        "label": { "type": "string", "minLength": 1 }
      }},
      "manufacturerColor": { "type": "string", "minLength": 1 },
      "simpleColor": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
        "id": { "$ref": "./base.schema.json#/$defs/simple-color-id" },
        "label": { "type": "string", "minLength": 1 }
      }},
      "simpleColor2": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
        "id": { "anyOf": [{"type": "null"},{ "$ref": "./base.schema.json#/$defs/simple-color-id" }] },
        "label": { "type": ["null","string"], "minLength": 1 }
      }},
      "photo": { "type": "object", "additionalProperties": false, "required": ["url"], "properties": {
        "url": { "type": ["null","string"], "format": "uri", "pattern": "^https?://" }
      }}
    }}},
    "maker": { "type": "string", "minLength": 1 },
    "model": { "type": "string", "minLength": 1 },
    "engine": { "type": ["null","string"], "minLength": 1 },
    "finish": { "type": ["null","string"], "minLength": 1 },
    "version": { "type": ["null","string"], "minLength": 1 },
    "interior": { "type": ["null","string"], "minLength": 1 },
    "manufacturerColor": { "type": "string", "minLength": 1 },
    "expertComments": { "type": ["null","string"], "minLength": 1 },
    "media": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["type", "url"], "properties": {
      "type": { "enum": ["photo", "video"] },
      "url": { "type": "string", "format": "uri", "pattern": "^https?://" },
      "orientation": { "type": "integer", "minimum": 0, "exclusiveMaximum": 360 }
    }}},
    "photo": { "type": "object", "additionalProperties": false, "required": ["url"], "properties": {
      "url": { "type": ["null","string"], "format": "uri", "pattern": "^https?://" }
    }},
    "category": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/category-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "segment": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "anyOf": [{ "type": "null" }, { "$ref": "./base.schema.json#/$defs/segment-id" }] },
      "label": { "type": ["null", "string"], "minLength": 1 }
    }},
    "energyType": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/energy-type-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "simpleColor": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/simple-color-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "simpleColor2": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "anyOf": [{"type": "null"}, { "$ref": "./base.schema.json#/$defs/simple-color-id" }] },
      "label": { "type": ["null","string"], "minLength": 1 }
    }},
    "interiorSimpleColor":  { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "anyOf": [{"type": "null"}, { "$ref": "./base.schema.json#/$defs/simple-color-id" }] },
      "label": { "type": ["null","string"], "minLength": 1 }
    }},
    "transmission": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/transmission-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "drive": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/drive-id" },
      "label": { "type": "string", "minLength": 1 }
    }},
    "equipments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["label", "category"], "properties": {
      "label": { "type": "string", "minLength": 1 },
      "category": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
        "id": { "$ref": "./base.schema.json#/$defs/equipment-category-id" },
        "label": { "type": "string", "minLength": 1 }
      }}
    }}},
    "simpleEquipments": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "$ref": "./base.schema.json#/$defs/simple-equipment-id" },
      "label": { "type": "string", "minLength": 1 }
    }}},
    "options": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["label", "priceWithTaxes"], "properties": {
      "label": { "type": "string", "minLength": 1 },
      "priceWithTaxes": { "type": "number" }
    }}},
    "promotions": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["id", "label"], "properties": {
      "id": { "type": "string", "minLength": 1 },
      "label": { "type": "string", "minLength": 1 },
      "color": { "type": "string", "pattern": "^#[a-fA-F0-9]{6}$" }
    }}},
    "doors": { "type": ["null","integer"], "exclusiveMinimum": 0 },
    "gears": { "type": ["null","integer"], "exclusiveMinimum": 0 },
    "seats": { "type": ["null","integer"], "exclusiveMinimum": 0 },
    "cylinders": { "type": ["null","integer"], "exclusiveMinimum": 0 },
    "power": { "type": "object", "additionalProperties": false, "required": ["ch", "kw"], "properties": {
      "ch": { "type": ["null","number"], "exclusiveMinimum": 0 },
      "kw": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "engineCapacity": { "type": "object", "additionalProperties": false, "required": ["cc"], "properties": {
      "cc": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "urbanCycleConsumption": { "type": "object", "additionalProperties": false, "required": ["ltPer100Km", "kwhPer100Km"], "properties": {
      "ltPer100Km": { "type": ["null","number"], "exclusiveMinimum": 0 },
      "kwhPer100Km": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "extraUrbanCycleConsumption": { "type": "object", "additionalProperties": false, "required": ["ltPer100Km", "kwhPer100Km"], "properties": {
      "ltPer100Km": { "type": ["null","number"], "exclusiveMinimum": 0 },
      "kwhPer100Km": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "combinedCycleConsumption": { "type": "object", "additionalProperties": false, "required": ["ltPer100Km", "kwhPer100Km"], "properties": {
      "ltPer100Km": { "type": ["null","number"], "exclusiveMinimum": 0 },
      "kwhPer100Km": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "co2EmissionsNedc": { "type": "object", "additionalProperties": false, "required": ["gramsPerKm"], "properties": {
      "gramsPerKm": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "co2EmissionsWltp": { "type": "object", "additionalProperties": false, "required": ["gramsPerKm"], "properties": {
      "gramsPerKm": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "height": { "type": "object", "additionalProperties": false, "required": ["meters"], "properties": {
      "meters": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "width": { "type": "object", "additionalProperties": false, "required": ["meters"], "properties": {
      "meters": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "length": { "type": "object", "additionalProperties": false, "required": ["meters"], "properties": {
      "meters": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "wheelbase": { "type": "object", "additionalProperties": false, "required": ["meters"], "properties": {
      "meters": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "unloadedWeight": { "type": "object", "additionalProperties": false, "required": ["kg"], "properties": {
      "kg": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "totalAuthorizedWeight": { "type": "object", "additionalProperties": false, "required": ["kg"], "properties": {
      "kg": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "minBootSpaceBackCapacity": { "type": "object", "additionalProperties": false, "required": ["lt"], "properties": {
      "lt": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "maxBootSpaceBackCapacity": { "type": "object", "additionalProperties": false, "required": ["lt"], "properties": {
      "lt": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "bootSpaceFrontCapacity": { "type": "object", "additionalProperties": false, "required": ["lt"], "properties": {
      "lt": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "maxSpeed": { "type": "object", "additionalProperties": false, "required": ["kmPerHour"], "properties": {
      "kmPerHour": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricRangeNedc": { "type": "object", "additionalProperties": false, "required": ["km"], "properties": {
      "km": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricRangeWltp": { "type": "object", "additionalProperties": false, "required": ["km"], "properties": {
      "km": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryWarrantyPeriod": { "type": "object", "additionalProperties": false, "required": ["km", "years"], "properties": {
      "km": { "type": ["null","number"], "exclusiveMinimum": 0 },
      "years": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryStateOfHealth": { "type": "object", "additionalProperties": false, "required": ["percent"], "properties": {
      "percent": { "type": ["null","number"], "minimum": 0, "maximum": 100 }
    }},
    "electricBatteryCapacity": { "type": "object", "additionalProperties": false, "required": ["kwh"], "properties": {
      "kwh": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryType": { "type": ["null","string"], "minLength": 1 },
    "electricBatterySlowChargePower": { "type": "object", "additionalProperties": false, "required": ["kw"], "properties": {
      "kw": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatterySlowChargeTime": { "type": "object", "additionalProperties": false, "required": ["minutes"], "properties": {
      "minutes": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryMediumChargePower": { "type": "object", "additionalProperties": false, "required": ["kw"], "properties": {
      "kw": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryMediumChargeTime": { "type": "object", "additionalProperties": false, "required": ["minutes"], "properties": {
      "minutes": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryQuickChargePower": { "type": "object", "additionalProperties": false, "required": ["kw"], "properties": {
      "kw": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryQuickChargeTime": { "type": "object", "additionalProperties": false, "required": ["minutes"], "properties": {
      "minutes": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricBatteryCost": { "type": ["null","number"], "exclusiveMinimum": 0 },
    "electricMaximumPowerCarElectricalOutlet": { "type": "object", "additionalProperties": false, "required": ["kw"], "properties": {
      "kw": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }},
    "electricMaximumPowerCarDirectCurrent": { "type": "object", "additionalProperties": false, "required": ["amperes"], "properties": {
      "amperes": { "type": ["null","number"], "exclusiveMinimum": 0 }
    }}
  },
  "required": [
    "vin",
    "offerId",
    "vehicleId",
    "variants",
    "offerType",
    "status",
    "isMarketplace",
    "firstCirculationDate",
    "warrantyExpirationDate",
    "mileage",
    "euronorm",
    "critair",
    "frenchFiscalPower",
    "frenchGenre",
    "belgianFiscalPower",
    "belgianOtoto",
    "belgianCarpass",
    "catalogPriceWithOptionsWithTaxes",
    "takeoverPremium",
    "sellingPriceWithTaxes",
    "discount",
    "sellingPriceWithTakeoverWithTaxes",
    "discountWithTakeover",
    "indicativeLoan",
    "maker",
    "model",
    "version",
    "engine",
    "finish",
    "manufacturerColor",
    "interior",
    "expertComments",
    "media",
    "photo",
    "category",
    "segment",
    "energyType",
    "simpleColor",
    "simpleColor2",
    "interiorSimpleColor",
    "transmission",
    "drive",
    "equipments",
    "simpleEquipments",
    "options",
    "promotions",
    "doors",
    "gears",
    "seats",
    "cylinders",
    "power",
    "engineCapacity",
    "urbanCycleConsumption",
    "extraUrbanCycleConsumption",
    "combinedCycleConsumption",
    "co2EmissionsNedc",
    "co2EmissionsWltp",
    "height",
    "width",
    "length",
    "wheelbase",
    "unloadedWeight",
    "totalAuthorizedWeight",
    "minBootSpaceBackCapacity",
    "maxBootSpaceBackCapacity",
    "bootSpaceFrontCapacity",
    "maxSpeed",
    "electricRangeNedc",
    "electricRangeWltp",
    "electricBatteryWarrantyPeriod",
    "electricBatteryStateOfHealth",
    "electricBatteryCapacity",
    "electricBatteryType",
    "electricBatterySlowChargePower",
    "electricBatterySlowChargeTime",
    "electricBatteryMediumChargePower",
    "electricBatteryMediumChargeTime",
    "electricBatteryQuickChargePower",
    "electricBatteryQuickChargeTime",
    "electricBatteryCost",
    "electricMaximumPowerCarElectricalOutlet",
    "electricMaximumPowerCarDirectCurrent"
  ]
}
