{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/akahu/main/json-schema/akahu-org-schema.json",
  "title": "Org",
  "x-generated": "2026-10-26",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/akahu-orgs-api-openapi.yml#/components/schemas/Org",
  "type": "object",
  "properties": {
    "_id": {
      "$ref": "#/$defs/OrgId"
    },
    "name": {
      "type": "string"
    },
    "logo": {
      "type": "string",
      "description": "A URL referencing the org's logo in PNG format."
    },
    "default_report_type": {
      "type": "string",
      "enum": [
        "standard",
        "income"
      ],
      "description": "The report type an application uses when it's created without one."
    },
    "report_type_locked": {
      "type": "boolean",
      "description": "When `true`, every application uses `default_report_type`, and an application's `report_type` can't be changed."
    }
  },
  "required": [
    "_id",
    "name",
    "default_report_type",
    "report_type_locked"
  ],
  "$defs": {
    "OrgId": {
      "type": "string",
      "pattern": "^org_[a-z0-9]{24,27}$"
    }
  }
}