{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/upgrowth-dz/json-schema/upgrowth-dz-ifu-estimate-schema.json",
  "title": "IfuEstimate",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/upgrowth-dz-openapi.yml#/components/schemas/IfuEstimate",
  "type": "object",
  "required": [
    "year",
    "inputs"
  ],
  "properties": {
    "year": {
      "type": "integer"
    },
    "inputs": {
      "type": "object",
      "properties": {
        "turnover": {
          "type": "number"
        },
        "regime": {
          "type": "string"
        },
        "activity": {
          "type": [
            "string",
            "null"
          ],
          "description": "The kind of activity, null with the auto-entrepreneur regime (Tunisia: crafts, production, commerce or services)."
        },
        "zone": {
          "type": [
            "string",
            "null"
          ],
          "description": "Tunisia only: communal or other."
        }
      }
    },
    "base": {
      "type": "object",
      "properties": {
        "turnover_dzd": {
          "type": "number"
        }
      }
    },
    "rate_percent": {
      "type": "number",
      "description": "The rate applied to the turnover."
    },
    "computed_before_minimum_dzd": {
      "type": "number",
      "description": "The tax before the minimum."
    },
    "minimum_dzd": {
      "type": "integer",
      "description": "The minimum tax of the regime."
    },
    "minimum_applied": {
      "type": "boolean",
      "description": "True when the minimum is higher than the computed tax and was charged instead."
    },
    "threshold_dzd": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The turnover ceiling of the regime."
    },
    "over_threshold": {
      "type": "boolean",
      "description": "True when the turnover is above that ceiling."
    },
    "ifu_dzd": {
      "type": "object",
      "properties": {
        "annual": {
          "type": "integer"
        },
        "monthly": {
          "type": "integer"
        }
      }
    },
    "contribution_tnd": {
      "type": "object",
      "properties": {
        "income_tax": {
          "type": "number"
        },
        "social": {
          "type": [
            "number",
            "null"
          ],
          "description": "Tunisia, craft activity: 7.5 % of two thirds of the hourly SMIG over 200 hours a month, a year (law 2002-32 article 7, SMIG of décret 2026-67)."
        },
        "total_annual": {
          "type": [
            "number",
            "null"
          ]
        },
        "total_monthly_equivalent": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "income_tax": {
      "type": "object",
      "additionalProperties": true,
      "description": "Tunisia only: the income tax part of the single contribution."
    },
    "social": {
      "type": "object",
      "additionalProperties": true,
      "description": "Tunisia only: the social part, its basis and the CNSS scale period."
    },
    "first_year": {
      "type": "string",
      "description": "Tunisia only: the period the contribution is not due (registration to the end of the quarter in which 12 months expire, article 67 of law 2024-48); see also non_due_period."
    },
    "limitations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  }
}