{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lynx/json-schema/lynx-get-related-person-details-response-doc-schema.json",
  "title": "GetRelatedPersonDetailsResponseDoc",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lynx-relatedpersons-api-openapi.yml#/components/schemas/GetRelatedPersonDetailsResponseDoc",
  "type": "object",
  "properties": {
    "data": {
      "$ref": "#/$defs/GetRelatedPersonDetailResponse"
    },
    "exceptions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResponseException"
      }
    }
  },
  "$defs": {
    "AddressDto": {
      "type": "object",
      "properties": {
        "line1": {
          "type": "string",
          "description": "The first line of the address"
        },
        "line2": {
          "type": "string",
          "description": "The (optional) second line of the address"
        },
        "city": {
          "type": "string",
          "description": "Address city"
        },
        "stateProvince": {
          "type": "string",
          "description": "2-Character address state or province"
        },
        "country": {
          "type": "string",
          "description": "Address country"
        },
        "postalCode": {
          "type": "string",
          "description": "Address zip code"
        },
        "postalCodeExtension": {
          "type": "string",
          "description": "Address zip code extension"
        },
        "type": {
          "type": "string",
          "description": "Auto-generated type for the address"
        },
        "typeDescription": {
          "type": "string",
          "description": "Client-defined description for the address"
        },
        "name": {
          "type": "string",
          "description": "Name of person"
        },
        "attentionCareOf": {
          "type": "string",
          "description": "If the address is 'in-care-of' someone else"
        },
        "line3": {
          "type": "string",
          "description": "The (optional) third line of the address"
        },
        "line4": {
          "type": "string",
          "description": "The (optional) fourth line of the address"
        },
        "pobox": {
          "type": "string",
          "description": "P.O. Box number"
        },
        "county": {
          "type": "string",
          "description": "Address county"
        },
        "primaryIndicator": {
          "type": "boolean",
          "description": "Determines whether this is a primary address"
        },
        "returnMailIndicator": {
          "type": "boolean",
          "description": "Indicated whether the member’s address has had mail returned"
        },
        "returnMailDate": {
          "type": "string",
          "format": "date-time",
          "description": "Date returned mail was received"
        },
        "returnMailReason": {
          "type": "string",
          "description": "Reason for mail being returned"
        }
      },
      "required": [
        "city",
        "country",
        "line1",
        "postalCode",
        "stateProvince"
      ]
    },
    "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"
      ]
    },
    "EmailDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Auto-generated type for the email address"
        },
        "typeDescription": {
          "type": "string",
          "description": "Client-defined description for the email address"
        },
        "emailAddress": {
          "type": "string",
          "description": "Email address - any notifications will be sent to this email address"
        },
        "primaryIndicator": {
          "type": "boolean",
          "description": "Determines whether this is a primary email address"
        }
      },
      "required": [
        "emailAddress"
      ]
    },
    "GetRelatedPersonDetailResponse": {
      "type": "object",
      "properties": {
        "clientOrg": {
          "$ref": "#/$defs/ClientOrgDto",
          "description": "The name of the client organization"
        },
        "member": {
          "$ref": "#/$defs/BaseMember"
        },
        "relatedPerson": {
          "$ref": "#/$defs/RelatedPersonDto"
        }
      },
      "required": [
        "clientOrg"
      ]
    },
    "PhoneDto": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Auto-generated type for the phone number"
        },
        "typeDescription": {
          "type": "string",
          "description": "Client-defined description for the phone number"
        },
        "countryCode": {
          "type": "string",
          "default": "1",
          "description": "Phone country code"
        },
        "phoneNumber": {
          "type": "string",
          "description": "10-Digit phone number"
        },
        "phoneExtension": {
          "type": "integer",
          "format": "int32",
          "description": "Optional extension"
        },
        "primaryIndicator": {
          "type": "boolean",
          "description": "Determines whether this is a primary phone"
        }
      },
      "required": [
        "countryCode",
        "phoneNumber"
      ]
    },
    "RelatedPersonDto": {
      "type": "object",
      "properties": {
        "firstName": {
          "type": "string",
          "description": "First name"
        },
        "lastName": {
          "type": "string",
          "description": "Last name"
        },
        "middleName": {
          "type": "string",
          "description": "Middle name"
        },
        "namePrefix": {
          "type": "string",
          "description": "Prefix for the name"
        },
        "nameSuffix": {
          "type": "string",
          "description": "Suffix for the name"
        },
        "type": {
          "type": "string",
          "description": "The type of related person"
        },
        "beneficiaryType": {
          "type": "string",
          "description": "The type of beneficiary"
        },
        "allocationPercentage": {
          "type": "number",
          "description": "The percentage allocated to the beneficiary"
        },
        "relationshipType": {
          "type": "string",
          "description": "Relationship type to member"
        },
        "dateOfBirth": {
          "type": "string",
          "format": "date-time",
          "description": "Date of birth"
        },
        "ssn": {
          "type": "string",
          "description": "Social Security Number"
        },
        "addresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AddressDto"
          }
        },
        "emails": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/EmailDto"
          }
        },
        "phones": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/PhoneDto"
          }
        }
      },
      "required": [
        "dateOfBirth",
        "firstName",
        "lastName",
        "relationshipType",
        "ssn",
        "type"
      ]
    },
    "ResponseException": {
      "type": "object",
      "properties": {
        "errorCode": {
          "type": "string",
          "description": "The GBL error code that is populated when the exceptionSource is SYSTEM"
        },
        "exceptionSource": {
          "type": "string",
          "description": "Characterizes the type of exception (JSON, SYSTEM, PARAMETER)"
        },
        "exceptionMessage": {
          "type": "string",
          "description": "Additional information about the exception"
        }
      }
    }
  }
}