{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/asap-cool/json-schema/asap-cool-fiscal-summary-view-schema.json",
  "title": "FiscalSummaryView",
  "description": "Response body of `GET /v1/fiscal/summary`.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/asap-cool-fiscal-api-openapi.yml#/components/schemas/FiscalSummaryView",
  "type": "object",
  "required": [
    "period",
    "config",
    "collected_cents",
    "franchise_tva",
    "micro_ceiling_cents",
    "next_declaration_deadline",
    "estimate"
  ],
  "properties": {
    "collected_cents": {
      "type": "integer",
      "format": "int64",
      "description": "Cash collected over the window (centimes)."
    },
    "config": {
      "$ref": "#/$defs/FiscalConfigView",
      "description": "The configuration the figures were computed with."
    },
    "estimate": {
      "type": "boolean",
      "description": "Always `true`: an estimate, never an official declaration."
    },
    "franchise_tva": {
      "$ref": "#/$defs/FranchiseTvaView",
      "description": "VAT-franchise thresholds."
    },
    "micro_ceiling_cents": {
      "type": "integer",
      "format": "int64",
      "description": "Micro-entreprise revenue ceiling (centimes)."
    },
    "net_after_charges_cents": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "description": "Collected minus provision (centimes); `None` when the rate is unknown."
    },
    "next_declaration_deadline": {
      "type": "string",
      "description": "Next URSSAF declaration deadline (`YYYY-MM-DD`)."
    },
    "period": {
      "$ref": "#/$defs/FiscalPeriodView",
      "description": "The window."
    },
    "provision_cents": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int64",
      "description": "Social charges to set aside (centimes); `None` when the rate is unknown,\nnever a silent zero."
    }
  },
  "$defs": {
    "FiscalConfigView": {
      "type": "object",
      "description": "The fiscal configuration the estimate was computed with.",
      "required": [
        "rate_source",
        "acre_applied",
        "versement_liberatoire",
        "declaration_frequency"
      ],
      "properties": {
        "acre_applied": {
          "type": "boolean",
          "description": "Whether the ACRE abatement applies today."
        },
        "activity_category": {
          "type": [
            "string",
            "null"
          ],
          "description": "Activity category token, `None` when not set on the profile."
        },
        "declaration_frequency": {
          "type": "string",
          "description": "URSSAF declaration cadence (`monthly` / `quarterly`)."
        },
        "rate_source": {
          "$ref": "#/$defs/RateSourceView",
          "description": "Where the rate comes from."
        },
        "social_rate_bps": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Effective total rate in basis points (ACRE and versement libératoire\napplied), `None` when `rate_source` is `unknown`."
        },
        "versement_liberatoire": {
          "type": "boolean",
          "description": "Option \"versement libératoire\" of income tax."
        }
      }
    },
    "FiscalPeriodView": {
      "type": "object",
      "description": "The window the collected cash is summed over.",
      "required": [
        "from",
        "to"
      ],
      "properties": {
        "from": {
          "type": "string",
          "description": "Inclusive lower bound (`YYYY-MM-DD`)."
        },
        "to": {
          "type": "string",
          "description": "Inclusive upper bound (`YYYY-MM-DD`)."
        }
      }
    },
    "FranchiseTvaView": {
      "type": "object",
      "description": "VAT-franchise thresholds of the activity.",
      "required": [
        "base_cents",
        "tolerance_cents"
      ],
      "properties": {
        "base_cents": {
          "type": "integer",
          "format": "int64",
          "description": "Base threshold (centimes): VAT is due from the next year."
        },
        "tolerance_cents": {
          "type": "integer",
          "format": "int64",
          "description": "Tolerance threshold (centimes): VAT is due immediately."
        }
      }
    },
    "RateSourceView": {
      "type": "string",
      "description": "Where the effective social rate comes from.",
      "enum": [
        "override",
        "category",
        "unknown"
      ]
    }
  }
}