{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-fee-schema.json",
  "title": "Fee",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-fees-api-openapi.yml#/components/schemas/Fee",
  "allOf": [
    {
      "$ref": "#/$defs/FeeInfo"
    },
    {
      "type": "object",
      "description": "A fee record",
      "additionalProperties": false,
      "required": [
        "id"
      ],
      "properties": {
        "id": {
          "type": "integer",
          "description": "The unique Zywave identifier for the fee",
          "format": "int32",
          "maximum": 2147483647.0,
          "minimum": 1.0
        }
      }
    }
  ],
  "$defs": {
    "FeeInfo": {
      "type": "object",
      "description": "Fee info",
      "additionalProperties": false,
      "required": [
        "feeTypeId",
        "frequency"
      ],
      "properties": {
        "amount": {
          "type": [
            "number",
            "null"
          ],
          "description": "The amount",
          "format": "decimal",
          "maximum": 999999999.99,
          "minimum": 0.0,
          "pattern": "^\\d+\\.?\\d{0,2}$"
        },
        "count": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The count",
          "format": "int32",
          "maximum": 999999.0,
          "minimum": 0.0
        },
        "feeTypeId": {
          "type": "integer",
          "description": "The unique identifier of the FeeType",
          "format": "int32",
          "maximum": 2147483647.0,
          "minimum": 1.0
        },
        "frequency": {
          "description": "The FrequencyOption",
          "default": "Annually",
          "oneOf": [
            {
              "$ref": "#/$defs/FrequencyOption"
            }
          ]
        },
        "policyId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Gets or sets the policy id",
          "format": "int32"
        }
      }
    },
    "FrequencyOption": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "None",
        "Annually",
        "Monthly"
      ],
      "enum": [
        "None",
        "Annually",
        "Monthly"
      ]
    }
  }
}