{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/blackbaud/json-schema/blackbaud-identity-thread-data-enrichment-response-schema.json",
  "title": "IdentityThreadDataEnrichmentResponse",
  "description": "Represents the response from an enrichment request containing enriched records.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/blackbaud-enrichment-api-openapi.yml#/components/schemas/IdentityThreadDataEnrichmentResponse",
  "type": "object",
  "properties": {
    "enriched_records": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "$ref": "#/$defs/IdentityThreadDataEnrichmentResponsePerson"
      },
      "description": "The enriched records returned in the response."
    },
    "annual_contract_usage": {
      "$ref": "#/$defs/AnnualContractUsage"
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AnnualContractUsage": {
      "type": "object",
      "properties": {
        "records_purchased": {
          "type": "integer",
          "description": "The total number of records purchased in the annual contract.",
          "format": "int32"
        },
        "records_used": {
          "type": "integer",
          "description": "The number of records used from the annual contract (including this request).",
          "format": "int32"
        },
        "records_remaining": {
          "type": "integer",
          "description": "The number of records remaining in the annual contract.",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "Represents annual contract usage information for enrichment requests."
    },
    "IdentityThreadData": {
      "type": "object",
      "properties": {
        "individual_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The resolved unique individual ID for the person."
        },
        "individual_key_status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Status of the individual key (Maintained, Derived, or null)."
        },
        "household_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The resolved unique household ID for the person."
        },
        "household_key_status": {
          "type": [
            "string",
            "null"
          ],
          "description": "Status of the individual key (Maintained, Derived, or null)."
        },
        "match_confidence": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The confidence level of the match.",
          "format": "int32"
        }
      },
      "additionalProperties": false,
      "description": "Data that can be appended for Identity Thread."
    },
    "IdentityThreadDataEnrichmentResponsePerson": {
      "type": "object",
      "properties": {
        "appended_data": {
          "$ref": "#/$defs/IdentityThreadData"
        },
        "record_id": {
          "type": [
            "string",
            "null"
          ],
          "description": "The unique identifier for the person record. This field is not used for matching, but can be passed through for reference."
        },
        "first_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's first name."
        },
        "middle_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's middle name."
        },
        "last_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's last name."
        },
        "suffix": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's suffix (e.g., Jr., Sr., III)."
        },
        "address": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's address."
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's city."
        },
        "state": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's state."
        },
        "zip_code": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's zip code."
        },
        "email": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's email address."
        },
        "phone": {
          "type": [
            "string",
            "null"
          ],
          "description": "The person's phone number."
        }
      },
      "additionalProperties": false,
      "description": "Represents a person in the enrichment response with appended data."
    }
  }
}