{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-aggregate-accounting-metric-response-schema.json",
  "title": "AggregateAccountingMetricResponse",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-accounting-api-openapi.yml#/components/schemas/AggregateAccountingMetricResponse",
  "type": "object",
  "properties": {
    "checkpoint": {
      "type": "string",
      "description": "The [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) timestamp for the date at which the metric was last updated."
    },
    "amortization_expense": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "capital_expenditure": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "cash_flow_to_debt_ratio": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "change_in_working_capital": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "cost_of_goods_sold": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "current_assets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "current_liabilities": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "current_ratio": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "debt_service": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "debt_service_coverage_ratio": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "debt_service_from_income_statement": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "debt_service_from_principal_paid": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "debt_to_income_ratio": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "depreciation_expense": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "ebitda": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "ebitda_margin": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "enterprise_free_cash_flow": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "enterprise_free_cash_flow_formula_two": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "gross_profit_margin": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "interest_expense": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "inventory": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "net_income": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "net_operating_income": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "net_profit_margin": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "prepaid_expenses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "principal_paid": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "quick_ratio": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "rental_expense": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "total_expenses": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "total_income": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "total_revenue": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "unearned_revenues": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "working_capital": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AggregateMetric"
      },
      "description": "The metric value and important metadata that defines the method of calculation."
    },
    "connection": {
      "$ref": "#/$defs/Connection"
    }
  },
  "required": [
    "checkpoint",
    "connection"
  ],
  "$defs": {
    "AggregateMetric": {
      "type": "object",
      "properties": {
        "start_date": {
          "type": "string",
          "description": "The starting date from which we start aggregating activity (revenue, expenses, etc)."
        },
        "end_date": {
          "type": "string",
          "description": "The date at which we stop aggregating activity (revenue, expenses, etc)."
        },
        "currency": {
          "type": "string",
          "description": "If applicable, the currency used for the value returned."
        },
        "value": {
          "type": "string",
          "description": "The value of the requested metric for the time range described by the start and end date."
        }
      },
      "required": [
        "start_date",
        "end_date",
        "currency",
        "value"
      ]
    },
    "Connection": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "description": "The UUID of the connection. Generated by Rutter."
        },
        "orgId": {
          "type": "string",
          "format": "uuid",
          "description": "Your organization id."
        },
        "platform": {
          "$ref": "#/$defs/Platform"
        }
      },
      "required": [
        "id",
        "orgId",
        "platform"
      ]
    },
    "Platform": {
      "type": "string",
      "enum": [
        "AMAZON",
        "EBAY",
        "ETSY",
        "FNAC",
        "WALMART",
        "SHOPEE",
        "LAZADA",
        "MERCADOLIBRE",
        "ALIBABA",
        "WAYFAIR",
        "SHEIN",
        "NOON",
        "SHOPLINE",
        "PRESTASHOP",
        "SHOPIFY",
        "MAGENTO",
        "WOO_COMMERCE",
        "SQUARESPACE",
        "WIX",
        "SHOPER",
        "SHOPLAZZA",
        "BIG_COMMERCE",
        "SALLA",
        "ZID",
        "TIKTOKSHOP",
        "COMMERCELAYER",
        "WEBFLOW",
        "GUMROAD",
        "ECWID",
        "PAYPAL",
        "SQUARE",
        "STRIPE",
        "CLOVER",
        "MOLLIE",
        "PAYNL",
        "AUTHORIZENET",
        "RECHARGE",
        "CHARGIFY",
        "CHARGEBEE",
        "RECURLY",
        "KASHFLOW",
        "SAGE_INTACCT",
        "SAGE_INTACCT_V2",
        "DYNAMICS365",
        "DYNAMICS365FO",
        "ZOHOBOOKS",
        "EXACTONLINE",
        "FREEAGENT",
        "QUICKBOOKS",
        "QUICKBOOKS_DESKTOP",
        "FRESHBOOKS",
        "XERO",
        "SAGE_BUSINESS_CLOUD",
        "SAGE_50",
        "VISTA",
        "NETSUITE",
        "WAVE",
        "DUALENTRY",
        "CAMPFIRE",
        "RILLET",
        "SOFTLEDGER",
        "VISMA",
        "SPIRIS",
        "LEXWARE",
        "MONEYBIRD",
        "SAGE200CLOUD",
        "MX",
        "PLAID",
        "TELLER",
        "RAMP",
        "ODOO",
        "ACUMATICA",
        "FULFIL",
        "TALLY",
        "SAPBUSINESSONE",
        "SAPS4HANA",
        "WORKDAY",
        "ANFIX",
        "ORACLEFUSION",
        "HOLDED",
        "MYOBBUSINESS",
        "FORTNOX",
        "GOOGLE",
        "FACEBOOK",
        "TIKTOK",
        "INTUIT_BANK_FEEDS",
        "PLAID_BANK_FEEDS",
        "SAGE",
        "SAGE_BANK_FEEDS",
        "YODLEE_BANK_FEEDS",
        "QUICKBOOKS_HRIS",
        "BAMBOO_HR",
        "GUSTO",
        "DEEL",
        "RIPPLING"
      ],
      "description": "The underlying platform."
    }
  }
}