{
 "openapi": "3.1.0",
 "info": {
  "title": "Deep Almanac: Australian building insurance",
  "version": "1.0.0",
  "summary": "What each Australian building insurance policy covers (how the building is valued, flood, accidental damage, a building left empty) for homes, strata, commercial and industrial property, with the insurer that issues it, joined to APRA's and ASIC's registers.",
  "description": "The building policies of the brands found selling building insurance in Australia (not a guarantee that no other exists): home and landlord policies for houses and rental properties, strata policies for apartment and unit buildings, business packs and property owners' policies for commercial property, and industrial special risks (ISR) for large and industrial property. Residential policies carry how the building is valued (sum insured, a buffer, or total replacement), flood and accidental damage; every policy carries what happens once the building is left unoccupied (`unoccupied`), and the insurer that issues it, with that insurer's APRA authorisation and AFS licence. Every fact carries the URL and the sentence it was read from on the brand's or insurer's own documents. Brands: 78 (62 residential, 25 commercial, 13 industrial).\n\nEvery file is static JSON; no authentication, CORS open. This is reference data, not advice about which policy to buy.",
  "termsOfService": "https://deepalmanac.com/terms",
  "contact": {
   "name": "Deep Almanac",
   "url": "https://deepalmanac.com"
  },
  "license": {
   "name": "Deep Almanac's own work CC BY 4.0; source data under its own terms, listed in licences in each index.json",
   "url": "https://deepalmanac.com/terms#data-licences"
  }
 },
 "servers": [
  {
   "url": "https://deepalmanac.com"
  }
 ],
 "security": [],
 "tags": [
  {
   "name": "building-insurance",
   "description": "Australian building insurance",
   "externalDocs": {
    "description": "Page",
    "url": "https://deepalmanac.com/au/insurance/building/"
   }
  }
 ],
 "paths": {
  "/au/insurance/building/v1/index.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceIndex",
    "summary": "Dataset index",
    "description": "The dataset's files, timestamps and every brand with its page and JSON URL.",
    "responses": {
     "200": {
      "description": "Dataset index.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "dataset": {
           "type": "string",
           "description": "Dataset name."
          },
          "page": {
           "type": "string",
           "description": "Human-readable page for the dataset.",
           "format": "uri"
          },
          "start_here": {
           "type": [
            "object",
            "null"
           ],
           "description": "The small file that answers most questions here: answer_file (a URL template), inputs (how to fill it), example (a filled-in URL) and sometimes also (the next file for a common variant).",
           "properties": {
            "answer_file": {
             "type": "string",
             "description": "URL template of the answer file."
            },
            "inputs": {
             "type": "string",
             "description": "What each placeholder takes."
            },
            "example": {
             "type": "string",
             "description": "A filled-in answer file URL.",
             "format": "uri"
            },
            "also": {
             "type": "string",
             "description": "Another file for a common variant of the question."
            },
            "lookup": {
             "type": "string",
             "description": "Where present: a /v1/lookup URL that takes the reader's own numbers, applies the bucket rules and redirects to the answer file.",
             "format": "uri"
            },
            "compare": {
             "type": "string",
             "description": "Where present: a /v1/compare URL that ranks every rate at the reader's exact amount and answers with JSON directly.",
             "format": "uri"
            }
           }
          },
          "generated_at": {
           "type": "string",
           "description": "When this index was written, UTC, YYYY-MM-DDTHH:MM:SSZ.",
           "format": "date-time",
           "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
          },
          "fetched_at": {
           "type": "string",
           "description": "When the source was last fetched, UTC, YYYY-MM-DDTHH:MM:SSZ.",
           "format": "date-time",
           "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"
          },
          "data_as_of": {
           "type": "string",
           "description": "How current the data is: a date (YYYY-MM-DD) or a UTC timestamp (YYYY-MM-DDTHH:MM:SSZ); data_as_of_basis says what it means here.",
           "pattern": "^\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2}:\\d{2}Z)?$"
          },
          "data_as_of_basis": {
           "type": "string",
           "description": "One sentence saying what data_as_of means for this dataset."
          },
          "source": {
           "type": "string",
           "description": "Data source statement."
          },
          "licence_note": {
           "type": "string",
           "description": "Terms of reuse and the not-advice note."
          },
          "licences": {
           "type": "array",
           "description": "What may be reused and on what terms, layer by layer: each layer's source, the fields it covers, its licence and the attribution it asks for. The last layer is Deep Almanac's own work (CC BY 4.0), covering every field no other layer names. Reusing a field means meeting the terms of the layer that covers it.",
           "items": {
            "type": "object",
            "required": [
             "layer",
             "covers",
             "licence",
             "licence_url",
             "attribution"
            ],
            "properties": {
             "layer": {
              "type": "string",
              "description": "The source."
             },
             "covers": {
              "type": "string",
              "description": "The fields it covers."
             },
             "licence": {
              "type": "string",
              "description": "Its licence, or why there is none."
             },
             "licence_url": {
              "type": [
               "string",
               "null"
              ],
              "format": "uri",
              "description": "The licence's own page, where it has one."
             },
             "attribution": {
              "type": "string",
              "description": "The credit the layer asks for."
             }
            }
           }
          },
          "questions": {
           "type": "string",
           "description": "This dataset's questions.json: what to ask the reader first and which file answers each.",
           "format": "uri"
          },
          "openapi": {
           "type": "string",
           "description": "This dataset's OpenAPI document.",
           "format": "uri"
          },
          "status": {
           "type": "string",
           "description": "https://deepalmanac.com/status.json: when every dataset was last fetched and when it counts as overdue.",
           "format": "uri"
          },
          "llms": {
           "type": "string",
           "description": "https://deepalmanac.com/llms.txt: the site's guide for language models.",
           "format": "uri"
          },
          "files": {
           "type": "array",
           "description": "Every top-level file this dataset publishes, as absolute URLs.",
           "items": {
            "type": "string",
            "format": "uri"
           }
          },
          "file_guide": {
           "type": "array",
           "description": "What each of those files holds, in the same order.",
           "items": {
            "type": "object",
            "properties": {
             "file": {
              "type": "string"
             },
             "url": {
              "type": "string",
              "format": "uri"
             },
             "description": {
              "type": "string"
             }
            }
           }
          },
          "brands_checked": {
           "type": [
            "string",
            "null"
           ],
           "format": "date",
           "description": "The day the quoted facts were last confirmed by hand (also data_as_of)."
          },
          "segments_dir": {
           "type": "object",
           "description": "The four pages the policies are split across (home, strata, commercial, industrial), each with its types, counts, page and summary/<segment>.json."
          },
          "brands_dir": {
           "type": "object",
           "properties": {
            "url_template": {
             "type": "string"
            },
            "page_template": {
             "type": "string"
            },
            "brands": {
             "type": "array",
             "items": {
              "type": "object",
              "properties": {
               "slug": {
                "type": "string"
               },
               "name": {
                "type": "string"
               },
               "underwriters": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "segments": {
                "type": "array",
                "items": {
                 "type": "string"
                }
               },
               "url": {
                "type": "string",
                "format": "uri"
               },
               "page": {
                "type": "string",
                "format": "uri"
               }
              }
             }
            }
           }
          }
         },
         "required": [
          "dataset",
          "page",
          "start_here",
          "generated_at",
          "fetched_at",
          "data_as_of",
          "data_as_of_basis",
          "source",
          "licence_note",
          "licences",
          "questions",
          "openapi",
          "status",
          "llms",
          "files",
          "brands_dir"
         ]
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    }
   }
  },
  "/au/insurance/building/v1/questions.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceQuestions",
    "summary": "What to ask a reader before answering",
    "description": "The questions readers ask about building insurance, the inputs to collect first (what is being insured comes before anything else), which file and field answers each, the fields most often misread (a null means not stated, not not covered; APRA status values; panels; Lloyd's), and what this dataset cannot answer, starting with premiums, which it does not hold. Read this first.",
    "responses": {
     "200": {
      "description": "What to ask a reader before answering.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    }
   }
  },
  "/au/insurance/building/v1/summary.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceSummary",
    "summary": "Every policy, one row each",
    "description": "One row per brand and building policy: cover basis, flood, accidental damage, and the unoccupied rule as the days before it applies and what it does, with the underwriter, its APRA status and the brand's JSON URL. The file for questions across brands (which home policies include flood, who covers a home left empty for 90 days, which brands one insurer underwrites). A null means not stated.",
    "responses": {
     "200": {
      "description": "Every policy, one row each.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    }
   }
  },
  "/au/insurance/building/v1/summary/{segment}.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceSegmentSummary",
    "summary": "One segment's policies, one row each",
    "description": "The rows of summary.json for one page's policies only: home (home, landlord and prestige home), strata (residential and commercial strata), commercial (business packs and property owners' policies) or industrial (ISR and industrial property).",
    "responses": {
     "200": {
      "description": "One segment's policies, one row each.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    },
    "parameters": [
     {
      "name": "segment",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string",
       "enum": [
        "home",
        "strata",
        "commercial",
        "industrial"
       ]
      },
      "description": "The page the policies are listed on."
     }
    ]
   }
  },
  "/au/insurance/building/v1/building-insurance.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsurance",
    "summary": "Every brand",
    "description": "Every brand with its building policies and what they cover, its underwriter, APRA status and AFS licence, with the quotes they were read from. Over 1 MB; summary.json answers questions across brands in a fraction of it.",
    "responses": {
     "200": {
      "description": "Every brand.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    }
   }
  },
  "/au/insurance/building/v1/underwriters.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceUnderwriters",
    "summary": "Every underwriter",
    "description": "Every insurer that issues the policies, with its APRA status, licence and the brands it stands behind.",
    "responses": {
     "200": {
      "description": "Every underwriter.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    }
   }
  },
  "/au/insurance/building/v1/brands/{slug}.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceBrand",
    "summary": "One brand",
    "description": "One brand's record, as in building-insurance.json.",
    "responses": {
     "200": {
      "description": "One brand.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    },
    "parameters": [
     {
      "name": "slug",
      "in": "path",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Brand slug, as listed in index.json."
     }
    ]
   }
  },
  "/au/insurance/building/v1/openapi.json": {
   "get": {
    "tags": [
     "building-insurance"
    ],
    "operationId": "getBuildingInsuranceOpenApi",
    "summary": "This OpenAPI document",
    "description": "OpenAPI 3.1 description of this dataset (https://deepalmanac.com/openapi.json lists every dataset's document).",
    "responses": {
     "200": {
      "description": "This OpenAPI document.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object"
        }
       }
      }
     },
     "404": {
      "description": "Not published, or the path is wrong; static hosting returns the site's 404 page (HTML)."
     }
    }
   }
  }
 }
}
