{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fis/main/json-schema/fis-get-budget-response-v2-dto-schema.json",
  "title": "GetBudgetResponseV2Dto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fis-budget-api-openapi.yml#/components/schemas/GetBudgetResponseV2Dto",
  "type": "object",
  "properties": {
    "pagination": {
      "$ref": "#/$defs/PaginationMetaData"
    },
    "meta": {
      "$ref": "#/$defs/BudgetReportMetaDataV2"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GetBudgetData"
      }
    }
  },
  "required": [
    "pagination",
    "meta",
    "data"
  ],
  "$defs": {
    "AccountRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "Balance": {
      "type": "object",
      "properties": {
        "amount": {
          "type": "string",
          "format": "float"
        },
        "date": {
          "format": "date-time",
          "type": "string"
        }
      }
    },
    "BudgetReportMetaDataV2": {
      "type": "object",
      "properties": {
        "connectionUuid": {
          "type": "string",
          "readOnly": true
        },
        "businessName": {
          "type": "string",
          "readOnly": true
        },
        "serviceName": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "freshbooks",
            "quickbooks",
            "quickbooksDesktop",
            "xero",
            "oracleNetsuite",
            "sageBusinessCloud",
            "sageIntacct",
            "dynamicsBusinessCentral",
            "dynamics365Finance",
            "wave",
            "myob",
            "zohoBooks",
            "byod"
          ]
        },
        "reportId": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": false
        },
        "startDate": {
          "type": "string",
          "format": "date-time"
        },
        "endDate": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "connectionUuid",
        "businessName",
        "serviceName",
        "reportId",
        "createdAt",
        "updatedAt"
      ]
    },
    "GetBudgetData": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "startDate": {
          "format": "date-time",
          "type": "string"
        },
        "endDate": {
          "format": "date-time",
          "type": "string"
        },
        "lines": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Lines"
          }
        },
        "status": {
          "type": "string",
          "enum": [
            "unknown",
            "active",
            "archived"
          ]
        },
        "createdDate": {
          "format": "date-time",
          "type": "string"
        },
        "sourceModifiedDate": {
          "format": "date-time",
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "Lines": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "balances": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Balance"
          }
        },
        "accountRef": {
          "$ref": "#/$defs/AccountRef"
        },
        "customerRef": {
          "$ref": "#/$defs/AccountRef"
        },
        "trackingCategoryRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TrackingCategoryResponse"
          }
        }
      }
    },
    "PaginationMetaData": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "number",
          "readOnly": true
        },
        "limit": {
          "type": "number",
          "readOnly": true
        },
        "count": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "offset",
        "limit",
        "count"
      ]
    },
    "TrackingCategoryResponse": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "readOnly": false
        },
        "name": {
          "type": "string",
          "readOnly": false
        },
        "type": {
          "type": "string",
          "enum": [
            "class",
            "department",
            "location",
            "unknown"
          ]
        }
      }
    }
  }
}