{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/harktech-co-uk/json-schema/harktech-co-uk-repair-services-schema.json",
  "title": "RepairServices",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/harktech-co-uk-openapi.json#/components/schemas/RepairServices",
  "type": "object",
  "required": [
    "query",
    "in_scope",
    "results"
  ],
  "properties": {
    "query": {
      "type": "object",
      "properties": {
        "device": {
          "type": "string"
        },
        "symptom": {
          "type": "string"
        }
      }
    },
    "in_scope": {
      "type": "boolean",
      "description": "False when Hark Tech does not repair that kind of device; message says why."
    },
    "message": {
      "type": "string"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RepairService"
      }
    },
    "turnaround": {
      "type": "string"
    },
    "mail_in": {
      "type": "string"
    },
    "all_services": {
      "type": "string",
      "format": "uri"
    },
    "contact": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "RepairPricing": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "fixed",
            "assessment",
            "assessment_then_quote"
          ],
          "description": "fixed: one published price. assessment: a paid assessment (e.g. controllers). assessment_then_quote: an assessment fee, then a fixed written price."
        },
        "price_gbp": {
          "type": "number",
          "description": "fixed only: the full price, parts, labour and tracked UK return included."
        },
        "includes": {
          "type": "string"
        },
        "deposit_gbp": {
          "type": "number",
          "description": "fixed only: paid at booking and credited against the price."
        },
        "deposit_note": {
          "type": "string"
        },
        "extra_unit_gbp": {
          "type": "number"
        },
        "assessment_gbp": {
          "type": "number",
          "description": "Assessment fee, charged whether or not the item proves repairable, credited in full against a repair."
        },
        "paid_at_booking_gbp": {
          "type": "number"
        },
        "assessment_covers": {
          "type": "string"
        },
        "after_assessment": {
          "type": "string"
        },
        "typical_total": {
          "type": "string"
        }
      }
    },
    "RepairService": {
      "type": "object",
      "properties": {
        "service": {
          "type": "string"
        },
        "device": {
          "type": "string"
        },
        "pricing": {
          "$ref": "#/$defs/RepairPricing"
        },
        "turnaround": {
          "type": "string"
        },
        "warranty": {
          "type": "string"
        },
        "how_to_book": {
          "type": "string"
        },
        "notes": {
          "type": "string"
        },
        "booking_url": {
          "type": "string",
          "format": "uri",
          "description": "Give this to the person: they book and pay there."
        },
        "page_url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}