{
  "openapi": "3.1.0",
  "info": {
    "title": "Standby Home UK Be Ready API",
    "version": "1.0.0",
    "description": "Public read-only API for UK 72-hour household preparedness planning (GOV.UK Be Ready guidance), local BBC FM emergency radio & DNO 105 power-cut lookups, DIY vs curated kit cost comparison, and the 9-SKU Standby Home catalog.",
    "contact": {
      "name": "Standby Home",
      "url": "https://getstandbyhome.com",
      "email": "hello@getstandbyhome.com"
    }
  },
  "servers": [
    {
      "url": "https://getstandbyhome.com",
      "description": "Production Standby Home API"
    }
  ],
  "paths": {
    "/api/be-ready-plan": {
      "post": {
        "operationId": "calculateBeReadyPlan",
        "summary": "Calculate a tailored 72-hour UK Be Ready household plan",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "adults"
                ],
                "properties": {
                  "adults": {
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 12,
                    "default": 2
                  },
                  "children": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 10,
                    "default": 0
                  },
                  "infants": {
                    "type": "boolean",
                    "default": false
                  },
                  "pets": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6,
                    "default": 0
                  },
                  "elderly_or_vulnerable": {
                    "type": "boolean",
                    "default": false
                  },
                  "home_type": {
                    "type": "string",
                    "enum": [
                      "flat",
                      "house",
                      "rural"
                    ],
                    "default": "house"
                  },
                  "region_or_postcode": {
                    "type": "string",
                    "description": "UK postcode prefix (e.g. EX1, EH1, BT1) or region name."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tailored 72-hour UK household emergency plan",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/radio-lookup": {
      "get": {
        "operationId": "ukEmergencyRadioLookup",
        "summary": "Look up UK BBC FM emergency radio frequencies, DNO, 105 hotline, and Floodline",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "UK postcode prefix (e.g. EX1, LS6, BT1) or region name (e.g. Scotland, Wales)."
          }
        ],
        "responses": {
          "200": {
            "description": "Regional BBC FM radio and DNO outage details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/compare-diy": {
      "get": {
        "operationId": "compareDiyVsKit",
        "summary": "Compare 2026 UK Amazon DIY emergency kit costs against Standby Home curated kits",
        "parameters": [
          {
            "name": "household_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "solo_couple",
                "family",
                "grab_bag"
              ],
              "default": "solo_couple"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Itemised UK DIY vs Standby Home cost comparison",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/catalog": {
      "get": {
        "operationId": "searchStandbyCatalog",
        "summary": "List or look up Standby Home 9-SKU UK emergency kits and individual items",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "kits",
                "power",
                "lighting",
                "first-aid",
                "addons"
              ],
              "default": "all"
            }
          },
          {
            "name": "max_price_gbp",
            "in": "query",
            "required": false,
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "sku",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Optional SKU or slug to fetch full single-product details."
          }
        ],
        "responses": {
          "200": {
            "description": "Standby Home catalog or single-product specification",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}
