{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zywave/json-schema/zywave-benefit-item-2-schema.json",
  "title": "BenefitItem_2",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zywave-benefititems-api-openapi.yml#/components/schemas/BenefitItem_2",
  "allOf": [
    {
      "$ref": "#/$defs/BenefitItemCreateInfo"
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "integer",
          "description": "The unique Zywave identifier for the benefit item.",
          "format": "int32"
        }
      }
    }
  ],
  "$defs": {
    "BenefitItemCreateInfo": {
      "allOf": [
        {
          "$ref": "#/$defs/BenefitItemInfo"
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "policyCoverageTypeId": {
              "type": "integer",
              "format": "int32"
            }
          }
        }
      ]
    },
    "BenefitItemInfo": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the benefit item.",
          "maxLength": 255,
          "minLength": 1
        },
        "defaultBenefitItemValueType": {
          "$ref": "#/$defs/BenefitItemValueType_2"
        },
        "benefitItemOptionTypeId": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Must be not blank when DefaultBenefitItemValueType is 'Options'. Otherwise must stay blank.",
          "format": "int32"
        },
        "allowsMultipleValues": {
          "type": "boolean"
        },
        "isHeader": {
          "type": "boolean"
        },
        "parentBenefitItemId": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32"
        },
        "sortOrder": {
          "type": "integer",
          "description": "The index in which the benefit item is in the list",
          "format": "int32"
        }
      }
    },
    "BenefitItemValueType_2": {
      "type": "string",
      "description": "",
      "x-enumNames": [
        "Percent",
        "Dollar",
        "DollarOrPercent",
        "Boolean",
        "Numeric",
        "Options",
        "Text"
      ],
      "enum": [
        "Percent",
        "Dollar",
        "DollarOrPercent",
        "Boolean",
        "Numeric",
        "Options",
        "Text"
      ]
    }
  }
}