{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/taxcompass-it/json-schema/taxcompass-it-deadline-calendar-schema.json",
  "title": "DeadlineCalendar",
  "description": "``GET /api/autopilot/deadlines?year=`` — when the year's tax falls due.\n\n``year`` is the **tax year**, as everywhere else in this router; its payments\nfall in ``payment_year`` (``year + 1``), which is reported rather than left to\nthe client to add. The amounts come from ``app.tax.it_annual`` over the\n``incassi`` ledger, so this endpoint and ``/estimate`` cannot drift: both read\nthe cash that was actually collected.\n\n``caveats`` is not decoration. Every statement in it names an input the\nproduct does not have yet or a rule the sources do not settle, and each one is\na reason a figure here is an **upper bound** rather than a bill — which is why\nthe list travels with the numbers instead of living in a design doc. No F24\nrow is emitted on *this* response — the payment fields for these instalments\nare ``GET /api/autopilot/f24``'s, composed by ``app.services.f24_store`` from\nthe codici tributo in ``app.tax.it_params`` — and neither endpoint pays\nanything: the F24 is a compilation guide the user files themselves.\n\n``bollo_quarters`` and ``redditi_window`` (AP-061d) are the two dates on this\ncalendar that are **not** the substitute tax: the quarterly stamp on the\nuser's own e-invoices, and the window the return is filed in. They are\nseparate fields rather than more ``instalments`` because neither is an\ninstalment of the year's tax — one is a different tax and the other is not a\npayment at all — and a client that summed the list would otherwise report a\nbill nobody owes.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/taxcompass-it-openapi.json#/components/schemas/DeadlineCalendar",
  "properties": {
    "year": {
      "type": "integer",
      "title": "Year"
    },
    "payment_year": {
      "type": "integer",
      "title": "Payment Year"
    },
    "cash_received": {
      "type": "string",
      "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      "title": "Cash Received",
      "default": "0.00"
    },
    "imposta_sostitutiva": {
      "type": "string",
      "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      "title": "Imposta Sostitutiva",
      "default": "0.00"
    },
    "acconto_due_in_year": {
      "type": "string",
      "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      "title": "Acconto Due In Year",
      "default": "0.00"
    },
    "saldo": {
      "type": "string",
      "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      "title": "Saldo",
      "default": "0.00"
    },
    "acconto_total": {
      "type": "string",
      "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
      "title": "Acconto Total",
      "default": "0.00"
    },
    "instalments": {
      "items": {
        "$ref": "#/$defs/DeadlineInstalment"
      },
      "type": "array",
      "title": "Instalments"
    },
    "bollo_quarters": {
      "items": {
        "$ref": "#/$defs/BolloQuarterDue"
      },
      "type": "array",
      "title": "Bollo Quarters"
    },
    "redditi_window": {
      "anyOf": [
        {
          "$ref": "#/$defs/RedditiWindow"
        },
        {
          "type": "null"
        }
      ]
    },
    "caveats": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Caveats"
    },
    "contributions": {
      "anyOf": [
        {
          "$ref": "#/$defs/DeadlineContributions"
        },
        {
          "type": "null"
        }
      ]
    },
    "set_aside": {
      "anyOf": [
        {
          "$ref": "#/$defs/SetAside"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "type": "object",
  "required": [
    "year",
    "payment_year"
  ],
  "$defs": {
    "BolloQuarterDue": {
      "properties": {
        "quarter": {
          "type": "integer",
          "title": "Quarter"
        },
        "invoices": {
          "type": "integer",
          "title": "Invoices"
        },
        "amount": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Amount"
        },
        "due_date": {
          "type": "string",
          "format": "date",
          "title": "Due Date"
        },
        "deferred_due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deferred Due Date"
        }
      },
      "type": "object",
      "required": [
        "quarter",
        "invoices",
        "amount",
        "due_date"
      ],
      "title": "BolloQuarterDue",
      "description": "One solar quarter's imposta di bollo on e-invoices (AP-061d).\n\n``invoices`` is how many stamped documents fell in the quarter and ``amount``\nis that count times the cited stamp — both travel because the count is what\na user checks the figure against, and a number they cannot check is a number\nthey have to trust.\n\n``deferred_due_date`` is D.L. 124/2019 art. 17 c. 1-bis's **option**: below\nthe threshold, the first quarter (and the first two together) may be paid on\na later quarter's deadline without interest or penalty. It is an alternative\nto ``due_date``, never a replacement — the ordinary date stays valid, which\nis why both are here and neither is a \"final\" answer the client can show\nalone."
    },
    "DeadlineContributions": {
      "properties": {
        "scheme": {
          "type": "string",
          "const": "gestione_separata",
          "title": "Scheme",
          "default": "gestione_separata"
        },
        "base": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Base"
        },
        "amount": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Amount"
        },
        "saldo": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Saldo"
        },
        "acconto_total": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Acconto Total"
        },
        "instalments": {
          "items": {
            "$ref": "#/$defs/DeadlineInstalment"
          },
          "type": "array",
          "title": "Instalments"
        }
      },
      "type": "object",
      "required": [
        "base",
        "amount",
        "saldo",
        "acconto_total"
      ],
      "title": "DeadlineContributions",
      "description": "A professionista's Gestione Separata year, as the calendar states it.\n\n``base`` is the reddito the contribution is charged on (the forfettario\nreddito, before the tax-side deduction of the same comma), capped at the\nyear's massimale; ``amount`` is the year's contribution; ``instalments`` are\nits saldo and acconti, dated like the tax's. No F24 row is composed for these\nyet — they are paid in the INPS section, whose causali the parameter table\ndoes not carry — and the calendar says so rather than printing a code."
    },
    "DeadlineInstalment": {
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "saldo",
            "acconto_1",
            "acconto_2",
            "acconto_unico"
          ],
          "title": "Kind"
        },
        "amount": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Amount"
        },
        "due_year": {
          "type": "integer",
          "title": "Due Year"
        },
        "due_month": {
          "type": "integer",
          "title": "Due Month"
        },
        "due_day": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Due Day"
        },
        "due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Due Date"
        },
        "deferrable": {
          "type": "boolean",
          "title": "Deferrable",
          "default": false
        },
        "deferred_due_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deferred Due Date"
        },
        "deferred_amount": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
            },
            {
              "type": "null"
            }
          ],
          "title": "Deferred Amount"
        }
      },
      "type": "object",
      "required": [
        "kind",
        "amount",
        "due_year",
        "due_month"
      ],
      "title": "DeadlineInstalment",
      "description": "One payment on the imposta-sostitutiva calendar (AP-061, deadlines half).\n\nA direct rendering of ``app.tax.it_annual.Instalment``, and it keeps that\nmodule's one deliberate gap rather than closing it: ``due_day`` — and with it\n``due_date`` — is ``None`` for the November instalment, because DPR 435/2001\nart. 17 c. 3 lett. b) names «il mese di novembre» and no day for persone\nfisiche. A client must render the month, not guess the 30th.\n\n``deferred_due_date`` / ``deferred_amount`` are art. 17 c. 2's option: thirty\ndays later against a 0,40% surcharge. They are populated only where the\narticle applies (``deferrable``), which is the saldo alone — the first acconto\nrate merely shares its deadline."
    },
    "RedditiWindow": {
      "properties": {
        "tax_year": {
          "type": "integer",
          "title": "Tax Year"
        },
        "filing_year": {
          "type": "integer",
          "title": "Filing Year"
        },
        "opens_on": {
          "type": "string",
          "format": "date",
          "title": "Opens On"
        },
        "telematic_deadline": {
          "type": "string",
          "format": "date",
          "title": "Telematic Deadline"
        },
        "valid_until": {
          "type": "string",
          "format": "date",
          "title": "Valid Until"
        }
      },
      "type": "object",
      "required": [
        "tax_year",
        "filing_year",
        "opens_on",
        "telematic_deadline",
        "valid_until"
      ],
      "title": "RedditiWindow",
      "description": "When the year's Redditi PF return may be filed (DPR 322/1998 art. 2).\n\nA window, not a deadline: ``opens_on`` is the first day the return can be\nsent and ``telematic_deadline`` the last day it is on time. ``valid_until``\nis comma 7's ninetieth day — a return filed by then is late and sanctioned\nbut *valid*, and after it the return counts as omessa. It is reported so a\nclient can say what a missed deadline actually costs, and must never be\nrendered as the date to aim for."
    },
    "SetAside": {
      "properties": {
        "tax": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Tax"
        },
        "contributions": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Contributions"
        },
        "total": {
          "type": "string",
          "pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
          "title": "Total"
        },
        "contributions_scheme": {
          "type": "string",
          "const": "gestione_separata",
          "title": "Contributions Scheme",
          "default": "gestione_separata"
        }
      },
      "type": "object",
      "required": [
        "tax",
        "contributions",
        "total"
      ],
      "title": "SetAside",
      "description": "What to put aside for one tax year's income: the tax **and** the contributions.\n\nOne figure, computed once (``services.deadline_calendar.set_aside_for``) and\nread by both screens that state it. The home screen and \"The year\" used to\ndisagree by several thousand euro on the same income, for two reasons that\nare each fine alone and wrong together: the estimate deducted INPS from the\ntax base as if it had already been paid, and the calendar — correctly —\nrefused to, but then left the contributions off entirely. A freelancer\nreading the calendar was told they owed the substitute tax and nothing else,\nand would have under-saved by the whole INPS bill.\n\n``tax`` is the imposta sostitutiva with no contribution deducted, because the\nproduct records no contribution *payment* (L. 190/2014 art. 1 c. 64 deducts\ncontributions *versati*): an upper bound, which is the right direction for a\nnumber whose purpose is to be put aside. ``contributions`` is the Gestione\nSeparata contribution charged on the same reddito. ``total`` is their sum."
    }
  }
}