{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/licenseground-com/json-schema/licenseground-com-license-verification-query-schema.json",
  "title": "LicenseVerificationQuery",
  "description": "Input payload for verifying a trade contractor license.",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/licenseground-com-openapi.yml#/components/schemas/LicenseVerificationQuery",
  "properties": {
    "entity_name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Entity Name",
      "description": "The business name or DBA to verify (e.g. 'Apex Roofing LLC'). At least entity_name or license_number must be provided."
    },
    "state": {
      "$ref": "#/$defs/StateCode",
      "description": "Two-letter US state code. Supported in Option 1: CA, FL, TX."
    },
    "license_number": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "License Number",
      "description": "State license or certificate registration number (e.g., 'CCC1330999', '1058291', 'TACLA12345C')."
    },
    "trade": {
      "$ref": "#/$defs/TradeCategory",
      "description": "Primary trade category to filter or validate against: roofing, hvac, electrical, plumbing, general_contractor, or any.",
      "default": "any"
    },
    "city": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "City",
      "description": "Optional city to filter geographic disambiguation."
    }
  },
  "type": "object",
  "required": [
    "state"
  ],
  "$defs": {
    "StateCode": {
      "type": "string",
      "enum": [
        "CA",
        "FL",
        "TX",
        "NY",
        "MA",
        "IL",
        "AZ",
        "US"
      ],
      "title": "StateCode"
    },
    "TradeCategory": {
      "type": "string",
      "enum": [
        "roofing",
        "hvac",
        "electrical",
        "plumbing",
        "general_contractor",
        "any"
      ],
      "title": "TradeCategory"
    }
  }
}