{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-benefit-item-value-schema.json",
  "title": "BenefitItemValue",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-benefititemvalues-api-openapi.yml#/components/schemas/BenefitItemValue",
  "allOf": [
    {
      "$ref": "#/$defs/BenefitItemValueInfo"
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "integer",
          "description": "The unique Zywave identifier for the benefit item value.",
          "format": "int32"
        }
      }
    }
  ],
  "$defs": {
    "BenefitItemValueBaseInfo": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "benefitItemClauseId": {
          "type": "integer",
          "format": "int32"
        },
        "sortOrder": {
          "type": "integer",
          "format": "int32"
        },
        "text": {
          "type": [
            "string",
            "null"
          ],
          "description": "Additional information about the Benefit Item besides its main Value.",
          "maxLength": 255
        },
        "value": {
          "type": [
            "string",
            "null"
          ],
          "description": "Value of the Benefit Item. May contain text or number. Should contain integer valid OptionId if BenefitItemValueType is 'Options'",
          "maxLength": 255
        },
        "benefitItemValueType": {
          "$ref": "#/$defs/BenefitItemValueType"
        }
      }
    },
    "BenefitItemValueInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/BenefitItemValueBaseInfo"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "policyId": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      ]
    },
    "BenefitItemValueType": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Percent",
        "Dollar",
        "DollarOrPercent",
        "Boolean",
        "Numeric",
        "Options",
        "Text"
      ],
      "enum": [
        "Percent",
        "Dollar",
        "DollarOrPercent",
        "Boolean",
        "Numeric",
        "Options",
        "Text"
      ]
    }
  }
}