{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/zyphe-com/json-schema/zyphe-com-tin-check-response-schema.json",
  "title": "TinCheckResponse",
  "description": "One TIN check and its results.",
  "x-generated": "2026-11-29",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/zyphe-com-openapi.json#/components/schemas/TinCheckResponse",
  "type": "object",
  "required": [
    "id",
    "name",
    "tinMasked",
    "outcome",
    "deathMasterFile",
    "einNameMatch",
    "watchlistStatus",
    "watchlists",
    "chargedCredits",
    "createdAt"
  ],
  "properties": {
    "address": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/TinCheckSubmittedLookup",
          "description": "The USPS address validation. Absent when no address was submitted."
        }
      ]
    },
    "chargedCredits": {
      "type": "integer",
      "format": "int32",
      "description": "What this check cost, in credits. Zero in the sandbox."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "createdByEmail": {
      "type": [
        "string",
        "null"
      ],
      "description": "The email of the member who ran the check. Absent when it was not run by a person, or the\nperson is no longer known."
    },
    "deathMasterFile": {
      "$ref": "#/$defs/TinCheckLookupStatus",
      "description": "Whether the subject resembles an entry on the Social Security Death Master File."
    },
    "einNameMatch": {
      "$ref": "#/$defs/TinCheckLookupStatus",
      "description": "Whether the lookup service has the EIN on record under a name other than the one checked.\nFor reference only: its records come from earlier matches and may be out of date."
    },
    "einNameMatchData": {
      "type": [
        "string",
        "null"
      ],
      "description": "The name on record, as the lookup service reports it: an XML document. Absent without a\nmatch."
    },
    "giin": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/TinCheckSubmittedLookup",
          "description": "The FATCA GIIN lookup. Absent when no GIIN was submitted."
        }
      ]
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string",
      "description": "The name that was checked, as submitted."
    },
    "outcome": {
      "$ref": "#/$defs/TinCheckOutcome",
      "description": "Whether the TIN and name combination matches IRS records."
    },
    "tinMasked": {
      "type": "string",
      "description": "The TIN with everything but its last four digits hidden, for example `XXXXX6789`. The full\nTIN is not stored."
    },
    "tinType": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/TinCheckTinType",
          "description": "Whether the matching record is an SSN, an EIN or both. Absent unless the IRS says."
        }
      ]
    },
    "verificationRequestId": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "description": "The KYB anchor's verification request, for a check run when an applicant submitted a KYB's\nbusiness information. Absent for a check run from the dashboard or with an API key."
    },
    "watchlistStatus": {
      "$ref": "#/$defs/TinCheckLookupStatus",
      "description": "Whether the name resembles an entry on any of the screened watchlists."
    },
    "watchlists": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TinCheckWatchlist"
      },
      "description": "Every watchlist the name was screened against, with how many entries resemble it. A\nresemblance is a similarity on the name, to be reviewed: not a confirmed hit."
    }
  },
  "$defs": {
    "TinCheckLookupStatus": {
      "type": "string",
      "description": "The answer of one of the lookups that run alongside the IRS match.",
      "enum": [
        "NOT_PROCESSED",
        "NO_MATCH",
        "POSSIBLE_MATCH"
      ]
    },
    "TinCheckOutcome": {
      "type": "string",
      "description": "The verdict of a TIN check: whether the TIN and name combination matches IRS records.",
      "enum": [
        "MATCH",
        "MISMATCH",
        "NOT_ISSUED"
      ]
    },
    "TinCheckSubmittedLookup": {
      "type": "object",
      "description": "An optional lookup that ran because a value was submitted for it: what was submitted, and the\nlookup service's answer.",
      "required": [
        "submitted"
      ],
      "properties": {
        "result": {
          "type": [
            "string",
            "null"
          ],
          "description": "The lookup service's answer, in its own words (English). Absent when it gave none."
        },
        "submitted": {
          "type": "string",
          "description": "The value that was submitted."
        }
      }
    },
    "TinCheckTinType": {
      "type": "string",
      "description": "Which kind of IRS record a matching TIN belongs to, when the IRS says.",
      "enum": [
        "SSN",
        "EIN",
        "SSN_AND_EIN"
      ]
    },
    "TinCheckWatchlist": {
      "type": "object",
      "description": "One watchlist the name was screened against, and how many of its entries resemble the name.",
      "required": [
        "list",
        "flagged",
        "possibleMatches"
      ],
      "properties": {
        "flagged": {
          "type": "boolean",
          "description": "Whether the list has entries that resemble the name."
        },
        "list": {
          "type": "string",
          "description": "The list's short name, for example `OFAC` or `PEP`."
        },
        "matchData": {
          "type": [
            "string",
            "null"
          ],
          "description": "The resembling entries, as the lookup service reports them: an XML document whose layout\nvaries by list. Absent when the list is clear."
        },
        "possibleMatches": {
          "type": "integer",
          "format": "int32",
          "description": "How many entries on the list resemble the name. Zero on a clear list, and on a flagged\none whose entries the lookup service did not count."
        }
      }
    }
  }
}