{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/tenjin-sh/json-schema/tenjin-sh-phone-lookup-result-schema.json",
  "title": "PhoneLookupResult",
  "description": "A successful lookup, and the only 200 this endpoint returns: a product that produced nothing answers 404 for free instead. `callerName` is present ONLY on the \"name\" product — the carrier tier omits the key even when a name exists.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/tenjin-sh-openapi.json#/components/schemas/PhoneLookupResult",
  "type": "object",
  "required": [
    "product",
    "phoneNumber",
    "valid"
  ],
  "properties": {
    "product": {
      "type": "string",
      "enum": [
        "name",
        "carrier"
      ]
    },
    "phoneNumber": {
      "type": "string",
      "description": "The E.164 number you asked about, echoed back."
    },
    "valid": {
      "type": "boolean",
      "description": "Whether the number resolves to real carrier data."
    },
    "callerName": {
      "type": "string",
      "description": "The name on record in the US CNAM database. Present only on the \"name\" product."
    },
    "carrier": {
      "type": [
        "string",
        "null"
      ]
    },
    "lineType": {
      "type": [
        "string",
        "null"
      ],
      "description": "For example `mobile`, `voip`, `fixed line`, or `toll free`."
    },
    "mobileNetwork": {
      "type": [
        "object",
        "null"
      ],
      "required": [
        "mcc",
        "mnc"
      ],
      "description": "Mobile country and network codes. Null for a landline, toll-free or VoIP number, and never half-populated.",
      "properties": {
        "mcc": {
          "type": "string"
        },
        "mnc": {
          "type": "string"
        }
      }
    },
    "countryCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "Two-letter region code."
    },
    "nationalFormat": {
      "type": [
        "string",
        "null"
      ]
    },
    "location": {
      "type": "object",
      "description": "Rate-center origin, not the subscriber address. Either field is null when the number has no LERG locality.",
      "properties": {
        "city": {
          "type": [
            "string",
            "null"
          ]
        },
        "state": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "portedCarrier": {
      "type": [
        "string",
        "null"
      ],
      "description": "The underlying carrier for a ported number, where `carrier` is the number block’s original owner."
    }
  }
}