{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/crunchtime-information-systems/json-schema/crunchtime-information-systems-budget-batch-response-dto-schema.json",
  "title": "BudgetBatchResponseDto",
  "description": "BudgetBatchResponseDto description",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/crunchtime-information-systems-budget-service-api-openapi.yml#/components/schemas/BudgetBatchResponseDto",
  "type": "object",
  "properties": {
    "budgetDetails": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/BudgetDetails"
      }
    },
    "hasNext": {
      "type": "boolean"
    },
    "totalPages": {
      "type": "integer",
      "format": "int32"
    }
  },
  "$defs": {
    "BudgetDetails": {
      "type": "object",
      "properties": {
        "budgetDetailDetails": {
          "type": "array",
          "description": "Budget item details.",
          "items": {
            "$ref": "#/$defs/BudgetDetailsDto"
          }
        },
        "budgetHeaderDetails": {
          "$ref": "#/$defs/BudgetHeaderDto"
        }
      },
      "title": "BudgetDetails",
      "description": "BudgetDetails description"
    },
    "BudgetDetailsDto": {
      "type": "object",
      "required": [
        "glDescription",
        "glNumber",
        "percentOfAccount"
      ],
      "properties": {
        "budgetType": {
          "type": "string",
          "description": "General Ledger budget value type. Must be ‘V’ for currency value or ‘P’ for percentage of another General Ledger account, P&L Substructure or P&L Grouping budget value.",
          "enum": [
            "P",
            "V"
          ]
        },
        "budgetValue": {
          "type": "number",
          "description": "The value budgeted for the General Ledger account."
        },
        "glDescription": {
          "type": "string",
          "description": "General Ledger category name.  Required and referenced only when “GL Number” corresponds to a “GL Number” in more than one Crunchtime General Ledger account."
        },
        "glNumber": {
          "type": "string",
          "description": " General Ledger account number."
        },
        "percentLevel": {
          "type": "string",
          "description": "Percentage level grouping type. \n `1` = General ledger \n `2` = null \n `3` = Profit & Loss Grouping, \n `4` = Profit & Loss Substructure.",
          "enum": [
            "1",
            "2",
            "3",
            "4"
          ]
        },
        "percentOfAccount": {
          "type": "string",
          "description": "General Ledger grouping for the account.  Required and referenced only when Budget Type = ‘P’ (“Percentage of”)."
        }
      },
      "title": "BudgetDetailsDto",
      "description": "BudgetDetailsDto description"
    },
    "BudgetHeaderDto": {
      "type": "object",
      "description": "Budget header item.",
      "required": [
        "postDate"
      ],
      "properties": {
        "postDate": {
          "type": "string",
          "description": "Post Date for the Budget record."
        }
      },
      "title": "Budget Header"
    }
  }
}