{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Retirement Wealth API",
    "version": "2.0",
    "summary": "Selected Australian retirement rules and rates, with official sources and effective dates.",
    "description": "Retirement Wealth provides selected factual information about Australian retirement rules and rates. It does not provide personal or general financial product advice or recommend financial products. Summaries may not cover every condition or exception. Check the linked official sources and obtain advice appropriate to your circumstances before making financial decisions. Static JSON files: no key, no sign-up. Files carry ETags, so conditional requests work. See https://retirementwealth.com.au/data/."
  },
  "servers": [
    {
      "url": "https://retirementwealth.com.au"
    }
  ],
  "externalDocs": {
    "url": "https://retirementwealth.com.au/data/"
  },
  "paths": {
    "/api/v2/index.json": {
      "get": {
        "operationId": "get_index_json",
        "summary": "This list of endpoints, with the latest release and data hash. Also at /api/v2/.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/api_index"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/figures.json": {
      "get": {
        "operationId": "get_figures_json",
        "summary": "The published figures with their current values, units, dates, sources, conditions, exceptions and related figures.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/figure_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/figures/{id}.json": {
      "get": {
        "operationId": "get_figures_id_json",
        "summary": "One figure with its timeline: values set by law for later dates, the current value and earlier values, newest first.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The figure id, for example concessional_cap.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/figure_file"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/figures/{id}/{date}.json": {
      "get": {
        "operationId": "get_figures_id_date_json",
        "summary": "One value of one figure, from the date it applies from. A fixed address to cite.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The figure id.",
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
            }
          },
          {
            "name": "date",
            "in": "path",
            "required": true,
            "description": "The date the value applies from, as in the figure timeline (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/value_file"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/as-at/index.json": {
      "get": {
        "operationId": "get_as_at_index_json",
        "summary": "The dates on which any published value starts, each with a file of each figure's recorded value on that date.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/as_at_index"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/as-at/{date}.json": {
      "get": {
        "operationId": "get_as_at_date_json",
        "summary": "The value of each figure on one of those dates, and the figures with no recorded value on it.",
        "parameters": [
          {
            "name": "date",
            "in": "path",
            "required": true,
            "description": "A date from /api/v2/as-at/index.json (YYYY-MM-DD).",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/as_at_file"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/concepts.json": {
      "get": {
        "operationId": "get_concepts_json",
        "summary": "Each quantity, with the figures that give it for different households, ages or other situations.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/concept_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/categories.json": {
      "get": {
        "operationId": "get_categories_json",
        "summary": "The topics figures are listed under on the site.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/category_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/units.json": {
      "get": {
        "operationId": "get_units_json",
        "summary": "What each unit means, and how to turn a rate into a plain ratio.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/unit_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/sources.json": {
      "get": {
        "operationId": "get_sources_json",
        "summary": "The official pages the daily check reads, and the figures each covers.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/source_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/rules/index.json": {
      "get": {
        "operationId": "get_rules_index_json",
        "summary": "Rule modules: how the law turns figures into results. None is published yet.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rule_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/changes.json": {
      "get": {
        "operationId": "get_changes_json",
        "summary": "Each change to the published data, newest first: when it was published and the date it applies from.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/change_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/releases.json": {
      "get": {
        "operationId": "get_releases_json",
        "summary": "Each release of the published data, newest first.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/release_list"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/releases/latest.json": {
      "get": {
        "operationId": "get_releases_latest_json",
        "summary": "The latest release: a small file to check for new data.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/latest_release"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/releases/{n}.json": {
      "get": {
        "operationId": "get_releases_n_json",
        "summary": "One release and the changes it made.",
        "parameters": [
          {
            "name": "n",
            "in": "path",
            "required": true,
            "description": "The release number.",
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/release_file"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/changes.atom": {
      "get": {
        "operationId": "get_changes_atom",
        "summary": "The releases as an Atom feed.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/openapi.json": {
      "get": {
        "operationId": "get_openapi_json",
        "summary": "An OpenAPI 3.1 description of these endpoints.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/schema/api.json": {
      "get": {
        "operationId": "get_schema_api_json",
        "summary": "The JSON Schema for these files.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    },
    "/api/v2/schema/registry.json": {
      "get": {
        "operationId": "get_schema_registry_json",
        "summary": "The JSON Schema for the registry these files are built from.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "No such file."
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "datetime": {
        "type": "string",
        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z$"
      },
      "url": {
        "type": "string",
        "pattern": "^https://"
      },
      "nullable_url": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/url"
          },
          {
            "type": "null"
          }
        ]
      },
      "nullable_date": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/date"
          },
          {
            "type": "null"
          }
        ]
      },
      "nullable_text": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "null"
          }
        ]
      },
      "data_hash": {
        "type": "string",
        "pattern": "^sha256:[0-9a-f]{64}$"
      },
      "source": {
        "type": "object",
        "required": [
          "title",
          "publisher",
          "url",
          "type"
        ],
        "additionalProperties": false,
        "properties": {
          "title": {
            "type": "string"
          },
          "publisher": {
            "type": "string"
          },
          "url": {
            "$ref": "#/components/schemas/url"
          },
          "type": {
            "enum": [
              "primary",
              "secondary"
            ]
          }
        }
      },
      "verification": {
        "type": "object",
        "required": [
          "status",
          "checked_on"
        ],
        "additionalProperties": false,
        "properties": {
          "status": {
            "enum": [
              "verified_primary",
              "secondary_only"
            ]
          },
          "checked_on": {
            "$ref": "#/components/schemas/date"
          }
        }
      },
      "unit": {
        "description": "A unit spelt out for software. ratio_divisor: divide a value by this to get a plain ratio. per_amount: the amount of assets a rate applies to.",
        "type": "object",
        "required": [
          "code",
          "plain",
          "quantity",
          "currency",
          "per",
          "per_amount",
          "ratio_divisor"
        ],
        "additionalProperties": false,
        "properties": {
          "code": {
            "type": "string"
          },
          "plain": {
            "type": "string"
          },
          "quantity": {
            "enum": [
              "money",
              "ratio",
              "time",
              "year"
            ]
          },
          "currency": {
            "anyOf": [
              {
                "const": "AUD"
              },
              {
                "type": "null"
              }
            ]
          },
          "per": {
            "anyOf": [
              {
                "enum": [
                  "year",
                  "fortnight",
                  "day"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "per_amount": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "ratio_divisor": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "head": {
        "description": "Fields at the top of every file.",
        "type": "object",
        "required": [
          "api_version",
          "url",
          "schema",
          "docs",
          "publisher",
          "scope"
        ],
        "properties": {
          "api_version": {
            "const": "2.0"
          },
          "url": {
            "$ref": "#/components/schemas/url"
          },
          "schema": {
            "$ref": "#/components/schemas/url"
          },
          "docs": {
            "$ref": "#/components/schemas/url"
          },
          "publisher": {
            "type": "string"
          },
          "scope": {
            "type": "string"
          }
        }
      },
      "dataset_head": {
        "description": "Fields at the top of files that describe the whole data set. data_hash changes only when the published data changes.",
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "data_release",
          "data_hash",
          "data_updated"
        ],
        "properties": {
          "data_release": {
            "type": "integer",
            "minimum": 0
          },
          "data_hash": {
            "$ref": "#/components/schemas/data_hash"
          },
          "data_updated": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/datetime"
              },
              {
                "type": "null"
              }
            ]
          }
        }
      },
      "entry": {
        "description": "One value of a figure. effective_to is the day before the next value starts, or null. status: in_force, superseded, or legislated_not_yet_in_force (set by law for a later date).",
        "type": "object",
        "required": [
          "value",
          "display_value",
          "ratio",
          "effective_from",
          "effective_to",
          "basis",
          "status",
          "source",
          "verification",
          "notes",
          "url"
        ],
        "additionalProperties": false,
        "properties": {
          "value": {
            "type": "number"
          },
          "display_value": {
            "type": "string"
          },
          "ratio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from": {
            "$ref": "#/components/schemas/nullable_date"
          },
          "effective_to": {
            "$ref": "#/components/schemas/nullable_date"
          },
          "basis": {
            "enum": [
              "value",
              "provision",
              "as_at"
            ]
          },
          "status": {
            "enum": [
              "in_force",
              "superseded",
              "legislated_not_yet_in_force"
            ]
          },
          "source": {
            "$ref": "#/components/schemas/source"
          },
          "verification": {
            "$ref": "#/components/schemas/verification"
          },
          "notes": {
            "$ref": "#/components/schemas/nullable_text"
          },
          "url": {
            "$ref": "#/components/schemas/nullable_url"
          }
        }
      },
      "release_ref": {
        "anyOf": [
          {
            "type": "object",
            "required": [
              "release",
              "recorded_at"
            ],
            "additionalProperties": false,
            "properties": {
              "release": {
                "type": "integer",
                "minimum": 1
              },
              "recorded_at": {
                "$ref": "#/components/schemas/datetime"
              }
            }
          },
          {
            "type": "null"
          }
        ]
      },
      "figure": {
        "description": "A figure. timeline (every recorded value, newest first, values set by law for later dates first) is in each figure's own file only.",
        "type": "object",
        "required": [
          "id",
          "former_ids",
          "label",
          "category",
          "category_label",
          "concept",
          "kind",
          "dimensions",
          "value",
          "display_value",
          "unit",
          "ratio",
          "effective_from",
          "effective_from_basis",
          "validity",
          "applies_by",
          "resets",
          "review_dates",
          "source",
          "verification",
          "notes",
          "conditions",
          "exceptions",
          "caveats",
          "legal_basis",
          "derivation",
          "related",
          "upcoming",
          "first_published",
          "last_changed",
          "cite_as",
          "links"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "$ref": "#/components/schemas/id"
          },
          "former_ids": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/id"
            }
          },
          "label": {
            "type": "string"
          },
          "category": {
            "$ref": "#/components/schemas/id"
          },
          "category_label": {
            "type": "string"
          },
          "concept": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "amount",
              "threshold",
              "cap",
              "rate",
              "taper",
              "factor",
              "age",
              "duration",
              "increment",
              "year"
            ]
          },
          "dimensions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/dimensions"
              },
              {
                "type": "object",
                "maxProperties": 0
              }
            ]
          },
          "value": {
            "type": "number"
          },
          "display_value": {
            "type": "string"
          },
          "unit": {
            "$ref": "#/components/schemas/unit"
          },
          "ratio": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "effective_from": {
            "$ref": "#/components/schemas/nullable_date"
          },
          "effective_from_basis": {
            "enum": [
              "value",
              "provision",
              "as_at"
            ]
          },
          "validity": {
            "type": "object",
            "required": [
              "from",
              "to",
              "basis",
              "status"
            ],
            "additionalProperties": false,
            "properties": {
              "from": {
                "$ref": "#/components/schemas/nullable_date"
              },
              "to": {
                "$ref": "#/components/schemas/nullable_date"
              },
              "basis": {
                "enum": [
                  "value",
                  "provision",
                  "as_at"
                ]
              },
              "status": {
                "const": "in_force"
              }
            }
          },
          "applies_by": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/applies_by"
              },
              {
                "type": "null"
              }
            ]
          },
          "resets": {
            "type": "string"
          },
          "review_dates": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[0-9]{2}-[0-9]{2}$"
            }
          },
          "source": {
            "$ref": "#/components/schemas/source"
          },
          "verification": {
            "$ref": "#/components/schemas/verification"
          },
          "notes": {
            "$ref": "#/components/schemas/nullable_text"
          },
          "conditions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/statement"
            }
          },
          "exceptions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/exception"
            }
          },
          "caveats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/caveat"
            }
          },
          "legal_basis": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/legal_basis"
            }
          },
          "derivation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/derivation"
              },
              {
                "type": "null"
              }
            ]
          },
          "related": {
            "type": "object",
            "required": [
              "same_concept",
              "inputs",
              "used_by"
            ],
            "additionalProperties": false,
            "properties": {
              "same_concept": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/id"
                }
              },
              "inputs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/id"
                }
              },
              "used_by": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/id"
                }
              }
            }
          },
          "upcoming": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/entry"
            }
          },
          "first_published": {
            "$ref": "#/components/schemas/release_ref"
          },
          "last_changed": {
            "$ref": "#/components/schemas/release_ref"
          },
          "cite_as": {
            "type": "string"
          },
          "links": {
            "type": "object",
            "required": [
              "self",
              "page",
              "current_value"
            ],
            "additionalProperties": false,
            "properties": {
              "self": {
                "$ref": "#/components/schemas/url"
              },
              "page": {
                "$ref": "#/components/schemas/url"
              },
              "current_value": {
                "$ref": "#/components/schemas/nullable_url"
              }
            }
          },
          "timeline": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/entry"
            }
          }
        }
      },
      "api_index": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "name",
          "description",
          "endpoints",
          "openapi",
          "schemas",
          "atom",
          "llms_txt",
          "api_catalog"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "path",
                "description"
              ],
              "additionalProperties": false,
              "properties": {
                "path": {
                  "type": "string"
                },
                "url": {
                  "$ref": "#/components/schemas/url"
                },
                "description": {
                  "type": "string"
                },
                "schema": {
                  "$ref": "#/components/schemas/url"
                },
                "content_type": {
                  "type": "string"
                }
              }
            }
          },
          "openapi": {
            "$ref": "#/components/schemas/url"
          },
          "schemas": {
            "type": "object",
            "required": [
              "api",
              "registry"
            ],
            "additionalProperties": false,
            "properties": {
              "api": {
                "$ref": "#/components/schemas/url"
              },
              "registry": {
                "$ref": "#/components/schemas/url"
              }
            }
          },
          "atom": {
            "$ref": "#/components/schemas/url"
          },
          "llms_txt": {
            "$ref": "#/components/schemas/url"
          },
          "api_catalog": {
            "$ref": "#/components/schemas/url"
          }
        }
      },
      "figure_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "name",
          "last_verified",
          "oldest_verified",
          "count",
          "figures"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "last_verified": {
            "$ref": "#/components/schemas/date"
          },
          "oldest_verified": {
            "$ref": "#/components/schemas/date"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "figures": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/figure"
            }
          }
        }
      },
      "figure_file": {
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "figure"
        ],
        "properties": {
          "figure": {
            "allOf": [
              {
                "$ref": "#/components/schemas/figure"
              },
              {
                "type": "object",
                "required": [
                  "timeline"
                ],
                "properties": {
                  "timeline": {
                    "type": "array"
                  }
                }
              }
            ]
          }
        }
      },
      "value_file": {
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "figure",
          "value"
        ],
        "properties": {
          "figure": {
            "type": "object",
            "required": [
              "id",
              "label",
              "concept",
              "kind",
              "dimensions",
              "unit",
              "url",
              "page"
            ],
            "additionalProperties": false,
            "properties": {
              "id": {
                "$ref": "#/components/schemas/id"
              },
              "label": {
                "type": "string"
              },
              "concept": {
                "type": "string"
              },
              "kind": {
                "type": "string"
              },
              "dimensions": {
                "type": "object"
              },
              "unit": {
                "type": "string"
              },
              "url": {
                "$ref": "#/components/schemas/url"
              },
              "page": {
                "$ref": "#/components/schemas/url"
              }
            }
          },
          "value": {
            "$ref": "#/components/schemas/entry"
          }
        }
      },
      "as_at_index": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "note",
          "count",
          "dates"
        ],
        "properties": {
          "note": {
            "type": "string"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "dates": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "date",
                "url",
                "figures_with_values"
              ],
              "additionalProperties": false,
              "properties": {
                "date": {
                  "$ref": "#/components/schemas/date"
                },
                "url": {
                  "$ref": "#/components/schemas/url"
                },
                "figures_with_values": {
                  "type": "integer",
                  "minimum": 0
                }
              }
            }
          }
        }
      },
      "as_at_file": {
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "as_at",
          "count",
          "values",
          "not_recorded"
        ],
        "properties": {
          "as_at": {
            "$ref": "#/components/schemas/date"
          },
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "values": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "label",
                "concept",
                "dimensions",
                "value",
                "display_value",
                "unit",
                "effective_from",
                "basis",
                "status",
                "url"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/id"
                },
                "label": {
                  "type": "string"
                },
                "concept": {
                  "type": "string"
                },
                "dimensions": {
                  "type": "object"
                },
                "value": {
                  "type": "number"
                },
                "display_value": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "effective_from": {
                  "$ref": "#/components/schemas/date"
                },
                "basis": {
                  "enum": [
                    "value",
                    "provision",
                    "as_at"
                  ]
                },
                "status": {
                  "enum": [
                    "in_force",
                    "superseded",
                    "legislated_not_yet_in_force"
                  ]
                },
                "url": {
                  "$ref": "#/components/schemas/url"
                }
              }
            }
          },
          "not_recorded": {
            "description": "Figures with no recorded value on this date.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/id"
            }
          }
        }
      },
      "concept_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "count",
          "concepts"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "concepts": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "concept",
                "kind",
                "unit",
                "figures"
              ],
              "additionalProperties": false,
              "properties": {
                "concept": {
                  "type": "string"
                },
                "kind": {
                  "type": "string"
                },
                "unit": {
                  "type": "string"
                },
                "figures": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "id",
                      "label",
                      "dimensions",
                      "url"
                    ],
                    "additionalProperties": false,
                    "properties": {
                      "id": {
                        "$ref": "#/components/schemas/id"
                      },
                      "label": {
                        "type": "string"
                      },
                      "dimensions": {
                        "type": "object"
                      },
                      "url": {
                        "$ref": "#/components/schemas/url"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "category_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "count",
          "categories"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "label",
                "description",
                "count",
                "figures",
                "page"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "$ref": "#/components/schemas/id"
                },
                "label": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "count": {
                  "type": "integer",
                  "minimum": 0
                },
                "figures": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/id"
                  }
                },
                "page": {
                  "$ref": "#/components/schemas/url"
                }
              }
            }
          }
        }
      },
      "unit_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "note",
          "units"
        ],
        "properties": {
          "note": {
            "type": "string"
          },
          "units": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/unit"
            }
          }
        }
      },
      "source_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "count",
          "sources"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "publisher",
                "url",
                "covers",
                "checked_on"
              ],
              "additionalProperties": false,
              "properties": {
                "id": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "url": {
                  "$ref": "#/components/schemas/url"
                },
                "covers": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/id"
                  }
                },
                "checked_on": {
                  "$ref": "#/components/schemas/date"
                }
              }
            }
          }
        }
      },
      "rule_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "count",
          "rules"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "rules": {
            "type": "array"
          }
        }
      },
      "event": {
        "description": "One change to the published data. recorded_at: when the change reached main, from which the site is built. effective_from: the date the value applies from, where there is one. Types: figure_added, figure_renamed, figure_removed, value_changed, correction, history_added, future_value_added, future_value_changed, future_value_removed, source_changed, verification_changed, rechecked, details_changed. preview: true only on preview builds, for changes not yet on main.",
        "type": "object",
        "required": [
          "id",
          "release",
          "recorded_at",
          "recorded_on",
          "type",
          "figure_id",
          "figure_id_then",
          "label",
          "category",
          "unit",
          "from",
          "to",
          "display_from",
          "display_to",
          "effective_from",
          "field",
          "fields",
          "former_id",
          "checked_on",
          "removed",
          "source",
          "figure",
          "preview"
        ],
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^r[0-9]+\\.e[0-9]+$"
          },
          "release": {
            "type": "integer",
            "minimum": 1
          },
          "recorded_at": {
            "$ref": "#/components/schemas/datetime"
          },
          "recorded_on": {
            "$ref": "#/components/schemas/date"
          },
          "type": {
            "enum": [
              "figure_added",
              "figure_renamed",
              "figure_removed",
              "value_changed",
              "correction",
              "history_added",
              "future_value_added",
              "future_value_changed",
              "future_value_removed",
              "source_changed",
              "verification_changed",
              "rechecked",
              "details_changed"
            ]
          },
          "figure_id": {
            "$ref": "#/components/schemas/id"
          },
          "figure_id_then": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/id"
              },
              {
                "type": "null"
              }
            ]
          },
          "label": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "unit": {
            "type": "string"
          },
          "from": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "to": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "display_from": {
            "$ref": "#/components/schemas/nullable_text"
          },
          "display_to": {
            "$ref": "#/components/schemas/nullable_text"
          },
          "effective_from": {
            "$ref": "#/components/schemas/nullable_date"
          },
          "field": {
            "$ref": "#/components/schemas/nullable_text"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "former_id": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/id"
              },
              {
                "type": "null"
              }
            ]
          },
          "checked_on": {
            "$ref": "#/components/schemas/nullable_date"
          },
          "removed": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "value",
                "effective_from"
              ],
              "additionalProperties": false,
              "properties": {
                "value": {
                  "type": "number"
                },
                "effective_from": {
                  "$ref": "#/components/schemas/nullable_date"
                }
              }
            }
          },
          "source": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/source"
              },
              {
                "type": "null"
              }
            ]
          },
          "figure": {
            "$ref": "#/components/schemas/nullable_url"
          },
          "preview": {
            "type": "boolean"
          }
        }
      },
      "change_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "count",
          "events"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/event"
            }
          }
        }
      },
      "release_summary": {
        "type": "object",
        "required": [
          "release",
          "recorded_at",
          "recorded_on",
          "data_hash",
          "event_count",
          "counts",
          "url",
          "preview"
        ],
        "additionalProperties": false,
        "properties": {
          "release": {
            "type": "integer",
            "minimum": 1
          },
          "recorded_at": {
            "$ref": "#/components/schemas/datetime"
          },
          "recorded_on": {
            "$ref": "#/components/schemas/date"
          },
          "data_hash": {
            "$ref": "#/components/schemas/data_hash"
          },
          "event_count": {
            "type": "integer",
            "minimum": 0
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 1
            }
          },
          "url": {
            "$ref": "#/components/schemas/url"
          },
          "preview": {
            "type": "boolean"
          }
        }
      },
      "release_list": {
        "allOf": [
          {
            "$ref": "#/components/schemas/dataset_head"
          }
        ],
        "type": "object",
        "required": [
          "count",
          "releases"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "releases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/release_summary"
            }
          }
        }
      },
      "release_file": {
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "release",
          "recorded_at",
          "recorded_on",
          "data_hash",
          "event_count",
          "counts",
          "url",
          "preview",
          "events"
        ],
        "properties": {
          "release": {
            "type": "integer",
            "minimum": 1
          },
          "recorded_at": {
            "$ref": "#/components/schemas/datetime"
          },
          "recorded_on": {
            "$ref": "#/components/schemas/date"
          },
          "data_hash": {
            "$ref": "#/components/schemas/data_hash"
          },
          "event_count": {
            "type": "integer",
            "minimum": 0
          },
          "counts": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "minimum": 1
            }
          },
          "url": {
            "$ref": "#/components/schemas/url"
          },
          "preview": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/event"
            }
          }
        }
      },
      "latest_release": {
        "allOf": [
          {
            "$ref": "#/components/schemas/head"
          }
        ],
        "type": "object",
        "required": [
          "data_hash",
          "release",
          "changes"
        ],
        "properties": {
          "data_hash": {
            "$ref": "#/components/schemas/data_hash"
          },
          "release": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/release_summary"
              },
              {
                "type": "null"
              }
            ]
          },
          "changes": {
            "$ref": "#/components/schemas/url"
          }
        }
      },
      "id": {
        "description": "A permanent identifier in snake_case. Never reused or changed once published; a figure that must be renamed keeps its old id in former_ids.",
        "type": "string",
        "pattern": "^[a-z0-9]+(_[a-z0-9]+)*$"
      },
      "date": {
        "description": "A calendar date, YYYY-MM-DD.",
        "type": "string",
        "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}$"
      },
      "text": {
        "type": "string",
        "minLength": 1
      },
      "dimensions": {
        "description": "What tells this figure apart from the other figures with the same concept.",
        "type": "object",
        "additionalProperties": false,
        "minProperties": 1,
        "properties": {
          "household": {
            "description": "single; couple; couple_illness_separated (a couple living apart because of illness); couple_separated (a couple living apart because of illness, respite care or prison, as the Commonwealth Seniors Health Card income test describes it).",
            "enum": [
              "single",
              "couple",
              "couple_illness_separated",
              "couple_separated"
            ]
          },
          "basis": {
            "description": "For couples: combined (both partners together) or each (for each partner).",
            "enum": [
              "combined",
              "each"
            ]
          },
          "homeowner": {
            "type": "boolean"
          },
          "age_band": {
            "description": "Ages in whole years, inclusive. null means no lower or no upper limit.",
            "type": "object",
            "required": [
              "min",
              "max"
            ],
            "additionalProperties": false,
            "properties": {
              "min": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "max": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          },
          "tier": {
            "description": "The position of a threshold in a numbered series: 1 for the first threshold.",
            "type": "integer",
            "minimum": 1
          },
          "cohort": {
            "description": "The group of people a figure applies to, as the source names it.",
            "enum": [
              "fee_arrangements_2014_07_01",
              "fee_arrangements_2025_11_01",
              "first_entered_residential_care_from_2025_11_01"
            ]
          },
          "service_category": {
            "enum": [
              "clinical",
              "independence",
              "everyday_living"
            ]
          },
          "means_status": {
            "enum": [
              "full_pensioner",
              "not_eligible_for_pension_or_cshc"
            ]
          },
          "bring_forward_period_years": {
            "enum": [
              2,
              3
            ]
          },
          "balance_threshold": {
            "description": "Division 296: large or very large super balance threshold.",
            "enum": [
              "large",
              "very_large"
            ]
          },
          "deeming_band": {
            "enum": [
              "lower",
              "upper"
            ]
          }
        }
      },
      "applies_by": {
        "description": "Which value applies, when that is not simply the value in force on the date in question. text is copied from the figure's notes.",
        "type": "object",
        "required": [
          "selector",
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "selector": {
            "description": "date_of_birth: the value depends on the person's date of birth. financial_year: the value for the financial year, measured as the text says. event_date: the value in force on the date of an event, such as when a contribution is made. fixed_at_event: the value in force at an event stays fixed for that person.",
            "enum": [
              "date_of_birth",
              "financial_year",
              "event_date",
              "fixed_at_event"
            ]
          },
          "text": {
            "$ref": "#/components/schemas/text"
          }
        }
      },
      "statement": {
        "description": "A sentence copied word for word from the figure's notes.",
        "type": "object",
        "required": [
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "text": {
            "$ref": "#/components/schemas/text"
          }
        }
      },
      "exception": {
        "description": "A case where the figure differs or does not apply, copied word for word from the figure's notes. modelled is false while no rule module in this registry covers the case.",
        "type": "object",
        "required": [
          "text",
          "modelled"
        ],
        "additionalProperties": false,
        "properties": {
          "text": {
            "$ref": "#/components/schemas/text"
          },
          "modelled": {
            "type": "boolean"
          }
        }
      },
      "caveat": {
        "description": "Something to know about the source of the figure, copied word for word from its notes.",
        "type": "object",
        "required": [
          "type",
          "text"
        ],
        "additionalProperties": false,
        "properties": {
          "type": {
            "description": "source_conflict: two official sources differ. indicative_source: the source describes its own figures as indicative. use_not_stated: the source does not say how the figure is used. source_scope: the figure is stated on a related page. derived_effective_date: the effective date is worked out, not stated.",
            "enum": [
              "source_conflict",
              "indicative_source",
              "use_not_stated",
              "source_scope",
              "derived_effective_date"
            ]
          },
          "text": {
            "$ref": "#/components/schemas/text"
          }
        }
      },
      "legal_basis": {
        "description": "A law the figure's notes or source cite. role: sets_value (the provision that sets the figure), indexation (the provision that indexes it) or effective_date (the law the effective date comes from).",
        "type": "object",
        "required": [
          "instrument",
          "role"
        ],
        "additionalProperties": false,
        "properties": {
          "instrument": {
            "$ref": "#/components/schemas/text"
          },
          "provision": {
            "$ref": "#/components/schemas/text"
          },
          "role": {
            "enum": [
              "sets_value",
              "indexation",
              "effective_date"
            ]
          }
        }
      },
      "derivation": {
        "description": "How the value can be worked out from other figures. Each variable takes the input figure's value in its own unit (for example 12 for 12%). The validator checks the published value against this calculation. basis: stated (the figure's notes, or the source given here, describe the calculation), implied (it follows from the inputs' own rules, with no rounding) or observed (it matches the published values; the calculation is not taken from an official source).",
        "type": "object",
        "required": [
          "expression",
          "inputs",
          "basis",
          "description"
        ],
        "additionalProperties": false,
        "properties": {
          "expression": {
            "$ref": "#/components/schemas/logic"
          },
          "inputs": {
            "type": "object",
            "minProperties": 1,
            "additionalProperties": {
              "$ref": "#/components/schemas/id"
            }
          },
          "basis": {
            "enum": [
              "stated",
              "implied",
              "observed"
            ]
          },
          "valid_from": {
            "$ref": "#/components/schemas/date"
          },
          "description": {
            "$ref": "#/components/schemas/text"
          },
          "source": {
            "$ref": "#/components/schemas/source"
          }
        }
      },
      "logic": {
        "description": "A JSON Logic expression. Supported operations: var, +, -, *, /, min, max, round_up_to, round_down_to. round_up_to and round_down_to take [number, multiple].",
        "anyOf": [
          {
            "type": "number"
          },
          {
            "type": "object"
          }
        ]
      }
    }
  }
}
