{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/africacompliancedata-com/json-schema/africacompliancedata-com-payroll-tax-period-schema.json",
  "title": "PayrollTaxPeriod",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/africacompliancedata-com-openapi.json#/components/schemas/PayrollTaxPeriod",
  "type": "object",
  "properties": {
    "from": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "to": {
      "type": [
        "string",
        "null"
      ],
      "format": "date"
    },
    "from_note": {
      "type": "string"
    },
    "basis": {
      "type": "string",
      "enum": [
        "monthly",
        "annual"
      ],
      "description": "The period the band amounts refer to"
    },
    "bands": {
      "type": "array",
      "description": "Income above 'from' up to and including 'to' is taxed at 'rate' (percent); the last band has to: null",
      "items": {
        "type": "object",
        "properties": {
          "from": {
            "type": "number"
          },
          "to": {
            "type": [
              "number",
              "null"
            ]
          },
          "rate": {
            "type": "number"
          },
          "fixed": {
            "type": "number",
            "description": "Only where the law's table gives a fixed amount per band that does not follow from the bands below: tax in this band = fixed + rate% x (income - from)"
          }
        }
      }
    },
    "reliefs": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "tax_credit",
              "deduction",
              "exempt_amount",
              "rebate",
              "family_quotient",
              "other"
            ]
          },
          "amount": {
            "type": [
              "number",
              "null"
            ]
          },
          "basis": {
            "type": [
              "string",
              "null"
            ]
          },
          "rate": {
            "type": [
              "number",
              "null"
            ]
          },
          "cap": {
            "type": [
              "number",
              "null"
            ]
          },
          "notes": {
            "type": "string"
          }
        }
      }
    },
    "legal_basis": {
      "type": "string"
    },
    "source_url": {
      "type": [
        "string",
        "null"
      ]
    },
    "source_note": {
      "type": "string",
      "description": "Present when no official link can be given"
    },
    "source_type": {
      "type": "string"
    },
    "confidence": {
      "type": "string",
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "notes": {
      "type": "string"
    }
  }
}