{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/riskrouter-eu/json-schema/riskrouter-eu-quote-response-schema.json",
  "title": "QuoteResponse",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/riskrouter-eu-openapi.json#/components/schemas/QuoteResponse",
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean"
    },
    "quote": {
      "type": "object",
      "properties": {
        "quote_reference": {
          "type": "string",
          "format": "uuid"
        },
        "active_vertical": {
          "type": "string"
        },
        "currency": {
          "type": "string",
          "const": "EUR"
        },
        "billing_interval": {
          "type": "string",
          "const": "MONTHLY"
        },
        "selected_components": {
          "type": "object",
          "additionalProperties": {
            "type": "boolean"
          }
        },
        "ignored_components": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "line_items": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true
          }
        },
        "totals": {
          "type": "object",
          "properties": {
            "base_layer_premium": {
              "$ref": "#/$defs/Money"
            },
            "add_on_premium": {
              "$ref": "#/$defs/Money"
            },
            "total_monthly_premium": {
              "$ref": "#/$defs/Money"
            },
            "indicative_annual_premium": {
              "$ref": "#/$defs/Money"
            },
            "active_add_on_count": {
              "type": "integer"
            }
          }
        }
      }
    },
    "attribution": {
      "type": "object",
      "properties": {
        "recorded": {
          "type": "boolean",
          "description": "True only when the ledger accepted the entry."
        },
        "mode": {
          "type": "string",
          "enum": [
            "ANONYMOUS",
            "ATTRIBUTED"
          ]
        },
        "distributor": {
          "type": "string"
        },
        "environment": {
          "type": "string",
          "enum": [
            "sandbox",
            "production"
          ]
        },
        "note": {
          "type": "string"
        }
      }
    },
    "persistence": {
      "type": "object",
      "properties": {
        "attempted": {
          "type": "boolean"
        },
        "persisted": {
          "type": "boolean"
        },
        "record_id": {
          "type": "string"
        },
        "seal": {
          "type": "object",
          "properties": {
            "chain_index": {
              "type": "integer"
            },
            "row_hash": {
              "type": "string"
            },
            "prev_hash": {
              "type": "string"
            }
          }
        },
        "detail": {
          "type": "string"
        },
        "replayed": {
          "type": "boolean",
          "description": "True when an earlier request with the same Idempotency-Key recorded this entry; nothing new was written."
        },
        "idempotency_key": {
          "type": "string"
        }
      }
    },
    "compliance": {
      "type": "object",
      "additionalProperties": true
    },
    "engine": {
      "type": "object",
      "additionalProperties": true
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Money": {
      "type": "string",
      "pattern": "^\\d+\\.\\d{2}$",
      "description": "EUR, exactly two decimals, as a string. Never a float."
    }
  }
}