{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fis/main/json-schema/fis-cashflow-statements-response-dto-schema.json",
  "title": "CashflowStatementsResponseDto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fis-financialstatement-api-openapi.yml#/components/schemas/CashflowStatementsResponseDto",
  "type": "object",
  "properties": {
    "pagination": {
      "$ref": "#/$defs/PaginationMetaData"
    },
    "count": {
      "type": "number",
      "readOnly": true,
      "format": "integer"
    },
    "reports": {
      "readOnly": true,
      "type": "array",
      "items": {
        "$ref": "#/$defs/CashflowStatementsReport"
      }
    }
  },
  "required": [
    "pagination",
    "count",
    "reports"
  ],
  "$defs": {
    "CashflowStatementsData": {
      "type": "object",
      "properties": {
        "section": {
          "type": "string",
          "enum": [
            "Operating Activities",
            "Financing Activities",
            "Investing Activities",
            "Cash"
          ]
        },
        "subSection": {
          "type": "string",
          "enum": [
            "Payments",
            "Adjustments",
            "Changes",
            "Proceeds",
            "Stock",
            "Intangibles",
            "Property Plant And Equipment",
            "Cash"
          ]
        },
        "group": {
          "type": "string"
        },
        "subGroup": {
          "type": "string"
        },
        "accountId": {
          "type": "string"
        },
        "subAccountId": {
          "type": "string"
        },
        "account": {
          "type": "string",
          "readOnly": true
        },
        "subAccount": {
          "type": "string"
        },
        "value": {
          "type": "number",
          "readOnly": true,
          "format": "float"
        },
        "fullyQualifiedName": {
          "type": "string",
          "description": "Full name of the account and parent account(s), colon separated."
        },
        "depth": {
          "type": "number",
          "description": "The sub account depth, based on it's account hierarchy level. E.g. top parent account would have a depth of 1."
        }
      },
      "required": [
        "section",
        "subSection",
        "account",
        "value",
        "fullyQualifiedName",
        "depth"
      ]
    },
    "CashflowStatementsReport": {
      "type": "object",
      "properties": {
        "meta": {
          "$ref": "#/$defs/FinancialStatementReportMetaData"
        },
        "data": {
          "readOnly": true,
          "type": "array",
          "items": {
            "$ref": "#/$defs/CashflowStatementsData"
          }
        }
      },
      "required": [
        "meta",
        "data"
      ]
    },
    "FinancialStatementReportMetaData": {
      "type": "object",
      "properties": {
        "reportId": {
          "type": "string",
          "readOnly": true
        },
        "status": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "success",
            "failed",
            "pending",
            "empty"
          ]
        },
        "reportFrequency": {
          "type": "string",
          "readOnly": true
        },
        "currency": {
          "type": "string"
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "startDate": {
          "type": "string",
          "readOnly": true
        },
        "endDate": {
          "type": "string",
          "readOnly": true
        },
        "serviceName": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "freshbooks",
            "quickbooks",
            "quickbooksDesktop",
            "xero",
            "oracleNetsuite",
            "sageBusinessCloud",
            "sageIntacct",
            "dynamicsBusinessCentral",
            "dynamics365Finance",
            "wave",
            "myob",
            "zohoBooks",
            "byod"
          ]
        },
        "businessName": {
          "type": "string",
          "readOnly": true
        },
        "accountingMethod": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "cash",
            "accrual"
          ]
        }
      },
      "required": [
        "reportId",
        "status",
        "reportFrequency",
        "createdAt",
        "updatedAt",
        "startDate",
        "endDate",
        "serviceName",
        "businessName",
        "accountingMethod"
      ]
    },
    "PaginationMetaData": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "number",
          "readOnly": true
        },
        "limit": {
          "type": "number",
          "readOnly": true
        },
        "count": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "offset",
        "limit",
        "count"
      ]
    }
  }
}