{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lynx/json-schema/lynx-patch-beneficiaries-allocation-percentage-request-schema.json",
  "title": "PatchBeneficiariesAllocationPercentageRequest",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lynx-relatedpersons-api-openapi.yml#/components/schemas/PatchBeneficiariesAllocationPercentageRequest",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/PatchBeneficiariesAllocationPercentageRequestData"
    },
    "idempotency": {
      "$ref": "#/$defs/Idempotency",
      "description": "Unique identifier that represents the operation"
    }
  },
  "required": [
    "data",
    "idempotency"
  ],
  "$defs": {
    "BaseMember": {
      "type": "object",
      "properties": {
        "clientMemberId": {
          "type": "string",
          "description": "Unique client-side identifier for the member"
        }
      },
      "required": [
        "clientMemberId"
      ]
    },
    "ClientOrgDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the client organization"
        }
      },
      "required": [
        "name"
      ]
    },
    "Idempotency": {
      "type": "object",
      "properties": {
        "idempotencyKey": {
          "type": "string",
          "description": "Unique identifier that represents the operation"
        }
      }
    },
    "PatchBeneficiariesAllocationPercentageRequestData": {
      "type": "object",
      "properties": {
        "clientOrg": {
          "$ref": "#/$defs/ClientOrgDto",
          "description": "The name of the client organization"
        },
        "member": {
          "$ref": "#/$defs/BaseMember",
          "description": "Unique client-side identifier for the member"
        },
        "beneficiaryType": {
          "type": "string",
          "default": "Primary",
          "description": "The type of beneficiary",
          "enum": [
            "Primary",
            "Contingent"
          ]
        },
        "relatedPersons": {
          "type": "array",
          "description": "List of related persons of the given beneficiary type of a member",
          "items": {
            "$ref": "#/$defs/RelatedPersonWithAllocationPercentage"
          }
        }
      },
      "required": [
        "beneficiaryType",
        "clientOrg",
        "member",
        "relatedPersons"
      ]
    },
    "RelatedPersonWithAllocationPercentage": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the related person"
        },
        "allocationPercentage": {
          "type": "number",
          "description": "The percentage allocated to the beneficiary"
        }
      },
      "required": [
        "allocationPercentage",
        "id"
      ]
    }
  }
}