{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/fis/main/json-schema/fis-get-chart-of-accounts-response-v1-dto-schema.json",
  "title": "GetChartOfAccountsResponseV1Dto",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fis-account-api-openapi.yml#/components/schemas/GetChartOfAccountsResponseV1Dto",
  "type": "object",
  "properties": {
    "pagination": {
      "$ref": "#/$defs/PaginationMetaData"
    },
    "count": {
      "type": "number",
      "readOnly": true,
      "format": "integer"
    },
    "meta": {
      "$ref": "#/$defs/ListReportMetaData"
    },
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GetChartOfAccountsDataV1"
      }
    }
  },
  "required": [
    "pagination",
    "count",
    "meta",
    "data"
  ],
  "$defs": {
    "AccountParentRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "CurrencyRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "symbol": {
          "type": "string"
        }
      },
      "required": [
        "id"
      ]
    },
    "GetChartOfAccountsDataV1": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "nominalCode": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "group": {
          "type": "string"
        },
        "subGroup": {
          "type": "string"
        },
        "classification": {
          "type": "string"
        },
        "fullyQualifiedName": {
          "type": "string"
        },
        "depth": {
          "type": "number"
        },
        "currentBalance": {
          "type": "number",
          "format": "float"
        },
        "subType": {
          "type": "string"
        },
        "isBankAccount": {
          "type": "boolean"
        },
        "isSubAccount": {
          "type": "boolean"
        },
        "isActive": {
          "type": "boolean"
        },
        "subsidiaryRefs": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SubsidiaryRef"
          }
        },
        "parentRef": {
          "$ref": "#/$defs/AccountParentRef"
        },
        "sourceModifiedDate": {
          "format": "date-time",
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "section": {
          "type": "string",
          "enum": [
            "Assets",
            "Expenses",
            "Income",
            "Liabilities",
            "Equity",
            "Non-Posting"
          ]
        },
        "subSection": {
          "type": "string",
          "enum": [
            "Current Assets",
            "Non-Current Assets",
            "Current Liabilities",
            "Non-Current Liabilities",
            "Equity",
            "Income",
            "Other Income",
            "Operating Expenses",
            "Other Expenses",
            "Cost of Goods Sold",
            "Other Assets",
            "Other Liabilities",
            "Expenses",
            "Uncategorized Expenses",
            "Uncategorized Income",
            "Non-Posting"
          ]
        },
        "currencyRef": {
          "$ref": "#/$defs/CurrencyRef"
        }
      },
      "required": [
        "id",
        "isActive",
        "type",
        "section",
        "subSection"
      ]
    },
    "ListReportMetaData": {
      "type": "object",
      "properties": {
        "reportId": {
          "readOnly": true,
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "serviceName": {
          "type": "string",
          "readOnly": true,
          "enum": [
            "freshbooks",
            "quickbooks",
            "quickbooksDesktop",
            "xero",
            "oracleNetsuite",
            "sageBusinessCloud",
            "sageIntacct",
            "dynamicsBusinessCentral",
            "dynamics365Finance",
            "wave",
            "myob",
            "zohoBooks",
            "byod"
          ]
        },
        "businessName": {
          "type": "string",
          "readOnly": true
        },
        "createdAt": {
          "type": "string",
          "readOnly": true,
          "format": "date-time"
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "readOnly": false
        }
      },
      "required": [
        "reportId",
        "serviceName",
        "businessName",
        "createdAt",
        "updatedAt"
      ]
    },
    "PaginationMetaData": {
      "type": "object",
      "properties": {
        "offset": {
          "type": "number",
          "readOnly": true
        },
        "limit": {
          "type": "number",
          "readOnly": true
        },
        "count": {
          "type": "number",
          "readOnly": true
        }
      },
      "required": [
        "offset",
        "limit",
        "count"
      ]
    },
    "SubsidiaryRef": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        }
      }
    }
  }
}