{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/assetlab-ca/json-schema/assetlab-ca-budget-create-schema.json",
  "title": "BudgetCreate",
  "description": "One row per year, funding source and module. A second row for the same slot answers 409.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/assetlab-ca-budgets-api-openapi.yml#/components/schemas/BudgetCreate",
  "type": "object",
  "required": [
    "year",
    "funding_source"
  ],
  "properties": {
    "year": {
      "type": "integer"
    },
    "site_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "building_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "funding_source": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "O&M",
        "Capital"
      ],
      "description": "The Budget tab reads one row per year, funding source and module"
    },
    "module": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "facilities",
        "infrastructure"
      ],
      "description": "Workspace; null is organization-wide"
    },
    "allocated_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    },
    "budgeted_amount": {
      "type": [
        "number",
        "null"
      ],
      "description": "Money in the organization's currency - GET /v1/organization-settings for currency_code"
    }
  }
}