{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ai2fin-com/json-schema/ai2fin-com-category-set-schema.json",
  "title": "CategorySet",
  "description": "A category set for organizing categories into groups (e.g., Business Expenses, Tax Deductible, Personal). Elite+ feature.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ai2fin-com-openapi.json#/components/schemas/CategorySet",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "color": {
      "type": "string"
    },
    "icon": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "isDefault": {
      "type": "boolean",
      "description": "Whether this is the default category set (cannot be deleted)"
    },
    "isActive": {
      "type": "boolean",
      "description": "Whether this is the currently active category set"
    },
    "categoryCount": {
      "type": "integer",
      "description": "Number of categories in this set"
    },
    "categories": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Category"
      }
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "Category": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "icon": {
          "type": "string"
        },
        "color": {
          "type": "string"
        },
        "isTaxDeductible": {
          "type": "boolean"
        },
        "taxCategory": {
          "type": "string"
        },
        "defaultGstRate": {
          "type": "number"
        }
      }
    }
  }
}