{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/wievielkostetmeinumzug-de/json-schema/wievielkostetmeinumzug-de-cbm-estimate-response-schema.json",
  "title": "CbmEstimateResponse",
  "description": "Response body for POST /v1/cbm/estimate.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/wievielkostetmeinumzug-de-openapi.json#/components/schemas/CbmEstimateResponse",
  "properties": {
    "total_m3": {
      "type": "number",
      "title": "Total M3"
    },
    "low_m3": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Low M3"
    },
    "high_m3": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "High M3"
    },
    "confidence": {
      "type": "string",
      "enum": [
        "estimate",
        "high",
        "photo-verified"
      ],
      "title": "Confidence",
      "default": "estimate"
    },
    "source": {
      "type": "string",
      "enum": [
        "room_based",
        "item_search",
        "ai_photo"
      ],
      "title": "Source",
      "default": "room_based"
    },
    "breakdown": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/CbmEstimateBreakdown"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Breakdown"
    },
    "boxes_estimate": {
      "anyOf": [
        {
          "$ref": "#/$defs/CbmBoxesEstimate"
        },
        {
          "type": "null"
        }
      ]
    },
    "methodology_version": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Methodology Version"
    },
    "sources": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Sources"
    }
  },
  "type": "object",
  "required": [
    "total_m3"
  ],
  "$defs": {
    "CbmBoxesEstimate": {
      "properties": {
        "box_type": {
          "type": "string",
          "title": "Box Type",
          "default": "Buecherkarton"
        },
        "count": {
          "type": "integer",
          "title": "Count"
        },
        "capacity_m3": {
          "type": "number",
          "title": "Capacity M3",
          "default": 0.5
        }
      },
      "type": "object",
      "required": [
        "count"
      ],
      "title": "CbmBoxesEstimate"
    },
    "CbmEstimateBreakdown": {
      "properties": {
        "id": {
          "type": "integer",
          "title": "Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "qty": {
          "type": "integer",
          "title": "Qty"
        },
        "unit_m3": {
          "type": "number",
          "title": "Unit M3"
        },
        "subtotal": {
          "type": "number",
          "title": "Subtotal"
        }
      },
      "type": "object",
      "required": [
        "id",
        "qty",
        "unit_m3",
        "subtotal"
      ],
      "title": "CbmEstimateBreakdown"
    }
  }
}