{ "type": "object", "$schema": "https://json-schema.org/draft/2020-12/schema", "anyOf": [ { "type": "object", "properties": { "schema_version": { "type": "string", "const": "2.0" }, "as_of": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "currency": { "type": "string", "const": "EUR" }, "locale": { "type": "string", "const": "el-GR" }, "warnings": { "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 240 } }, "product_id": { "type": "string" }, "product_title": { "anyOf": [ { "type": "string", "minLength": 1, "maxLength": 220 }, { "type": "null" } ] }, "bestprice_url": { "type": "string", "format": "uri" }, "period_days": { "anyOf": [ { "type": "number", "const": 30 }, { "type": "number", "const": 90 }, { "type": "number", "const": 180 } ] }, "current_price": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 10000000 }, { "type": "null" } ] }, "current_price_source": { "type": "string", "enum": [ "live_offer_minimum", "latest_daily_history", "unavailable" ] }, "source_last_observed_at": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, { "type": "null" } ] }, "window_stats": { "minItems": 3, "maxItems": 3, "type": "array", "items": { "type": "object", "properties": { "days": { "anyOf": [ { "type": "number", "const": 30 }, { "type": "number", "const": 90 }, { "type": "number", "const": 180 } ] }, "minimum_price": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 10000000 }, { "type": "null" } ] }, "median_price": { "anyOf": [ { "type": "number", "minimum": 0, "maximum": 10000000 }, { "type": "null" } ] }, "observations": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "coverage_pct": { "type": "number", "minimum": 0, "maximum": 100 } }, "required": [ "days", "minimum_price", "median_price", "observations", "coverage_pct" ], "additionalProperties": false } }, "price_delta_vs_180d_median_pct": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "deal_classification": { "type": "string", "enum": [ "record_low", "excellent_price", "good_price", "typical_price", "above_typical", "insufficient_data", "unavailable" ] }, "methodology_id": { "type": "string", "const": "bestprice_daily_min_v1" }, "data_gaps": { "type": "object", "properties": { "missing_days": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "longest_gap_days": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "stale_days": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "coverage_note": { "type": "string", "minLength": 1, "maxLength": 180 } }, "required": [ "missing_days", "longest_gap_days", "stale_days", "coverage_note" ], "additionalProperties": false }, "series": { "maxItems": 64, "type": "array", "items": { "type": "object", "properties": { "date": { "type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$" }, "price": { "type": "number", "minimum": 0, "maximum": 10000000 }, "merchant_count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "date", "price", "merchant_count" ], "additionalProperties": false } } }, "required": [ "schema_version", "as_of", "currency", "locale", "warnings", "product_id", "product_title", "bestprice_url", "period_days", "current_price", "current_price_source", "source_last_observed_at", "window_stats", "price_delta_vs_180d_median_pct", "deal_classification", "methodology_id", "data_gaps", "series" ], "additionalProperties": false }, { "type": "object", "properties": { "schema_version": { "type": "string", "const": "2.0" }, "as_of": { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" }, "currency": { "type": "string", "const": "EUR" }, "locale": { "type": "string", "const": "el-GR" }, "warnings": { "maxItems": 20, "type": "array", "items": { "type": "string", "minLength": 1, "maxLength": 240 } }, "error": { "type": "object", "properties": { "code": { "type": "string", "pattern": "^[A-Z][A-Z0-9_]{2,63}$" }, "message": { "type": "string", "minLength": 1, "maxLength": 240 }, "retryable": { "type": "boolean" } }, "required": [ "code", "message", "retryable" ], "additionalProperties": false } }, "required": [ "schema_version", "as_of", "currency", "locale", "warnings", "error" ], "additionalProperties": false } ] }