{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/curacel/json-schema/curacel-comprehensive-auto-purchase-data-schema.json",
  "title": "ComprehensiveAutoPurchaseData",
  "description": "Data for buying Comprehensive auto insurance",
  "x-generated": "2026-11-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/curacel-openapi-openapi.yml#/components/schemas/ComprehensiveAutoPurchaseData",
  "type": "object",
  "required": [
    "product_code",
    "customer_ref",
    "policy_start_date",
    "registration_number",
    "vehicle_class",
    "vehicle_make",
    "vehicle_year",
    "chassis_number",
    "engine_number",
    "vehicle_color",
    "drivers_licence_number",
    "vehicle_model",
    "drivers_licence_attachment_id"
  ],
  "properties": {
    "product_code": {
      "type": "string",
      "description": "The code of an approved, non-archived product available to the authenticated partner."
    },
    "customer_ref": {
      "type": "string",
      "description": "The reference of a customer belonging to the authenticated partner."
    },
    "payment_type": {
      "type": "string",
      "enum": [
        "wallet",
        "web_link",
        "card"
      ],
      "description": "How the order will be paid. If omitted, the authenticated partner's configured payment option is used."
    },
    "policy_start_date": {
      "type": "string",
      "format": "date",
      "description": "the start date of the intended policy coverage"
    },
    "asset_value": {
      "type": "number",
      "format": "float",
      "description": "Estimated value of the insured vehicle. Required when the product uses relative-premium calculation."
    },
    "asset_ref": {
      "type": [
        "string",
        "null"
      ],
      "description": "An external reference stored on the order and included in relevant webhooks."
    },
    "registration_number": {
      "type": "string",
      "description": "the vehicle registration number"
    },
    "vehicle_class": {
      "type": "string",
      "description": "the class of the vehicle",
      "enum": [
        "car",
        "sedan",
        "suv"
      ]
    },
    "vehicle_make": {
      "type": "string",
      "description": "The brand of the vehicle"
    },
    "vehicle_model": {
      "type": "string",
      "description": "The model of the vehicle"
    },
    "vehicle_year": {
      "type": "integer",
      "description": "The vehicle's year of manufacture"
    },
    "chassis_number": {
      "type": "string"
    },
    "engine_number": {
      "type": "string"
    },
    "drivers_licence_number": {
      "type": "string",
      "description": "The customer's driver's license number"
    },
    "drivers_licence_attachment_id": {
      "type": "integer",
      "description": "Required for the Kenyan market. The id of the attachment containing the customer's driver's license"
    },
    "vehicle_valuation_report_attachment_id": {
      "type": "integer",
      "description": "Required for Kenyan products when the partner was created on or after November 28, 2023. The ID of the vehicle valuation report attachment."
    },
    "vehicle_color": {
      "type": "string",
      "description": "The color of the vehicle"
    },
    "attachments": {
      "type": "array",
      "items": {
        "type": "integer"
      },
      "description": "If this order has other attachments, supply their IDs as an array. Each attachment must belong to the authenticated partner and must not already be attached to another resource."
    },
    "broker_premium_rate": {
      "type": "number",
      "format": "float",
      "description": "For brokers only. The premium rate for the product."
    },
    "broker_taxes": {
      "type": "number",
      "format": "float",
      "description": "For brokers only. A percentage of the premium to be added as tax"
    },
    "premium_frequency": {
      "type": "string",
      "enum": [
        "monthly",
        "quarterly",
        "annually"
      ]
    },
    "child_partner_id": {
      "type": "string",
      "description": "The key of a child partner belonging to the authenticated parent partner."
    }
  }
}