{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reusefulshop-com/json-schema/reusefulshop-com-estimate-schema.json",
  "title": "Estimate",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reusefulshop-com-openapi.json#/components/schemas/Estimate",
  "type": "object",
  "properties": {
    "found": {
      "type": "boolean"
    },
    "query": {
      "type": "string"
    },
    "title": {
      "type": "string"
    },
    "category": {
      "type": "string"
    },
    "currency": {
      "type": "string"
    },
    "low": {
      "type": "number"
    },
    "typical": {
      "type": "number"
    },
    "high": {
      "type": "number"
    },
    "basis": {
      "type": "string",
      "enum": [
        "asking",
        "market"
      ]
    },
    "sample": {
      "type": "integer",
      "description": "Number of listings used"
    },
    "confidence": {
      "type": "number",
      "description": "0 to 1"
    },
    "source": {
      "type": "string"
    },
    "sourceUrl": {
      "type": "string"
    },
    "market": {
      "type": "string",
      "description": "Geographic market for the prices"
    },
    "match_quality": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ],
      "description": "How well the tracked item matches the query words"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    },
    "sold": {
      "$ref": "#/$defs/SoldStats"
    }
  },
  "$defs": {
    "SoldStats": {
      "type": "object",
      "description": "Real sold prices from the operator shop (actual transactions)",
      "properties": {
        "median": {
          "type": "number"
        },
        "low": {
          "type": "number"
        },
        "high": {
          "type": "number"
        },
        "count": {
          "type": "integer"
        },
        "latest": {
          "type": "string",
          "description": "Date of most recent matching sale"
        },
        "source": {
          "type": "string",
          "enum": [
            "shop"
          ]
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Last time the shop sales were synced; null if never synced"
        }
      }
    }
  }
}