{
  "openapi": "3.0.3",
  "info": {
    "title": "ComplianceGrid API",
    "version": "3.2.0",
    "description": "ComplianceGrid provides a unified compliance intelligence platform — sanctions screening, export controls, tariff calculation, risk scoring, HS classification, AES filing, and 50+ regulatory data endpoints. All endpoints use JSON and require Bearer token authentication via OAuth 2.0 client credentials.",
    "contact": {
      "name": "ComplianceGrid Support",
      "url": "https://www.compliancegrid.ai",
      "email": "support@compliancegrid.ai"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://www.compliancegrid.ai/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.compliancegrid.ai",
      "description": "Production"
    },
    {
      "url": "https://sandbox.api.compliancegrid.ai",
      "description": "Sandbox (rate-limited, mock data)"
    }
  ],
  "security": [
    { "BearerAuth": [] }
  ],
  "tags": [
    { "name": "Authentication", "description": "OAuth 2.0 client credentials flow" },
    { "name": "Risk Intelligence", "description": "AI-powered composite risk scoring for businesses and individuals" },
    { "name": "Tariff Calculator", "description": "U.S. import tariff calculation with Section 301/232/122, AD/CVD, MPF, HMF" },
    { "name": "Export Compliance", "description": "Sanctions screening, HS classification, export license determination" },
    { "name": "AES Filing", "description": "Electronic Export Information (EEI) validation and AES submission" },
    { "name": "HS Code Lookup", "description": "Harmonized Tariff Schedule search and AI classification" },
    { "name": "Shipping Documents", "description": "Required document determination for international shipments" },
    { "name": "Firearms & Explosives", "description": "ATF Federal Firearms License lookup and verification" },
    { "name": "Pharma & Controlled Substances", "description": "DEA registration and FDA drug data" },
    { "name": "Financial & Securities", "description": "SEC EDGAR, FDIC, FINRA lookups" },
    { "name": "Aviation & Transport", "description": "FAA aircraft registry, FMCSA carrier data" },
    { "name": "Professional & Business", "description": "SAM.gov entity search" },
    { "name": "Legal & Exclusions", "description": "OIG LEIE exclusion search" },
    { "name": "Maritime & Port Security", "description": "Vessel search, C-TPAT partner lookup" },
    { "name": "FCC Licensing", "description": "FCC Universal Licensing System search" }
  ],
  "paths": {
    "/oauth/token": {
      "post": {
        "tags": ["Authentication"],
        "summary": "Get Access Token",
        "description": "Obtain a Bearer token using OAuth 2.0 client credentials flow.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "required": ["grant_type", "client_id", "client_secret"],
                "properties": {
                  "grant_type": { "type": "string", "enum": ["client_credentials"] },
                  "client_id": { "type": "string", "description": "Your client ID" },
                  "client_secret": { "type": "string", "description": "Your API key (sandbox or production)" }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Token issued",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "access_token": { "type": "string" },
                    "token_type": { "type": "string", "example": "Bearer" },
                    "expires_in": { "type": "integer", "example": 3600 }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/risk/business": {
      "post": {
        "tags": ["Risk Intelligence"],
        "summary": "Business Risk Score",
        "description": "AI-powered composite risk score (0–1000) for a business entity. Aggregates data from sanctions lists, SAM.gov, OIG LEIE, SEC EDGAR, adverse media, and 35+ risk factors with industry-adjusted weights. Includes entity disambiguation — each match is scored for confidence (HIGH/MEDIUM/LOW) and low-confidence matches are suppressed to reduce false positives.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/BusinessRiskRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Risk score computed",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/BusinessRiskResponse" }
              }
            }
          }
        }
      }
    },
    "/v1/risk/individual": {
      "post": {
        "tags": ["Risk Intelligence"],
        "summary": "Individual Risk Score",
        "description": "AI-powered composite risk score (0–1000) for a natural person. Checks sanctions, regulatory actions, court records, professional history, and social media signals across 35+ factors. Entity disambiguation scores each match for confidence and suppresses likely false positives.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/IndividualRiskRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Risk score computed",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/IndividualRiskResponse" }
              }
            }
          }
        }
      }
    },
    "/v1/risk/batch": {
      "post": {
        "tags": ["Risk Intelligence"],
        "summary": "Submit Batch Job",
        "description": "Submit 2–500 entities for async risk scoring. Returns a job ID immediately.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/RiskBatchRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Batch job created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "jobId": { "type": "string" },
                        "status": { "type": "string", "enum": ["PENDING"] },
                        "totalItems": { "type": "integer" },
                        "estimatedCompletionSeconds": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/risk/batch/{jobId}": {
      "get": {
        "tags": ["Risk Intelligence"],
        "summary": "Batch Job Status",
        "description": "Check the status of an async batch risk scoring job.",
        "parameters": [
          { "name": "jobId", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Job status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": { "type": "boolean" },
                    "data": {
                      "type": "object",
                      "properties": {
                        "jobId": { "type": "string" },
                        "status": { "type": "string", "enum": ["PENDING", "PROCESSING", "COMPLETE", "PARTIAL", "FAILED"] },
                        "totalItems": { "type": "integer" },
                        "completedItems": { "type": "integer" },
                        "failedItems": { "type": "integer" },
                        "processingTimeMs": { "type": "integer" }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/risk/batch/{jobId}/results": {
      "get": {
        "tags": ["Risk Intelligence"],
        "summary": "Batch Job Results",
        "description": "Retrieve results for a completed batch job.",
        "parameters": [
          { "name": "jobId", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": {
          "200": {
            "description": "Batch results",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/v1/risk/factors": {
      "get": {
        "tags": ["Risk Intelligence"],
        "summary": "Factor Taxonomy",
        "description": "Returns the complete factor taxonomy — all 70+ scored factors for both business and individual assessments, industry weight profiles, and score band definitions.",
        "responses": {
          "200": {
            "description": "Factor taxonomy",
            "content": { "application/json": { "schema": { "type": "object" } } }
          }
        }
      }
    },
    "/v1/tariffs/calculate": {
      "post": {
        "tags": ["Tariff Calculator"],
        "summary": "Calculate Tariff",
        "description": "Calculate total U.S. import duty and landed cost for a single shipment. Stacks all applicable duty layers.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/TariffCalculateRequest" }
            }
          }
        },
        "responses": {
          "200": { "description": "Tariff calculation result", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      }
    },
    "/v1/tariffs/calculate/smart": {
      "post": {
        "tags": ["Tariff Calculator"],
        "summary": "Smart Calculate (AI)",
        "description": "AI-enhanced tariff calculation with plain-English compliance advisory, risk factors, and sourcing insights.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/TariffCalculateRequest" }
            }
          }
        },
        "responses": {
          "200": { "description": "AI-enhanced tariff result", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      }
    },
    "/v1/tariffs/calculate/bulk": {
      "post": {
        "tags": ["Tariff Calculator"],
        "summary": "Bulk Calculate",
        "description": "Calculate tariffs for up to 100 items in a single request.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["items"],
                "properties": {
                  "items": {
                    "type": "array",
                    "maxItems": 100,
                    "items": { "$ref": "#/components/schemas/TariffCalculateRequest" }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Bulk calculation results", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      }
    },
    "/v1/tariffs/compare": {
      "post": {
        "tags": ["Tariff Calculator"],
        "summary": "Country Comparison",
        "description": "Compare tariff costs for the same product across multiple countries of origin.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["htsCode", "countries", "declaredValue"],
                "properties": {
                  "htsCode": { "type": "string", "description": "10-digit HTS code" },
                  "countries": { "type": "array", "items": { "type": "string" }, "description": "ISO-2 country codes to compare" },
                  "declaredValue": { "type": "number", "description": "Declared value in USD" },
                  "entryDate": { "type": "string", "format": "date", "description": "Entry date (YYYY-MM-DD)" }
                }
              }
            }
          }
        },
        "responses": {
          "200": { "description": "Country comparison results", "content": { "application/json": { "schema": { "type": "object" } } } }
        }
      }
    },
    "/v1/tariffs/provisions": {
      "get": {
        "tags": ["Tariff Calculator"],
        "summary": "List Tariff Provisions",
        "description": "List all active tariff provisions (Section 301, 232, 122, IEEPA, safeguards).",
        "responses": { "200": { "description": "Provisions list", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/tariffs/provisions/{authority}": {
      "get": {
        "tags": ["Tariff Calculator"],
        "summary": "Provisions by Authority",
        "description": "Filter tariff provisions by authority type.",
        "parameters": [
          { "name": "authority", "in": "path", "required": true, "schema": { "type": "string", "enum": ["SECTION_301", "SECTION_232", "SECTION_122", "IEEPA", "SAFEGUARD"] } }
        ],
        "responses": { "200": { "description": "Filtered provisions", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/tariffs/adcvd": {
      "get": {
        "tags": ["Tariff Calculator"],
        "summary": "AD/CVD Orders",
        "description": "List antidumping and countervailing duty orders.",
        "parameters": [
          { "name": "country", "in": "query", "schema": { "type": "string" }, "description": "Filter by ISO-2 country code" },
          { "name": "status", "in": "query", "schema": { "type": "string" }, "description": "Filter by status" }
        ],
        "responses": { "200": { "description": "AD/CVD orders", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/tariffs/programs": {
      "get": {
        "tags": ["Tariff Calculator"],
        "summary": "Trade Programs",
        "description": "List active Free Trade Agreements and preferential trade programs.",
        "responses": { "200": { "description": "Trade programs", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/compliance/prohibited-goods": {
      "post": {
        "tags": ["Export Compliance"],
        "summary": "Prohibited Goods Screening",
        "description": "Screen commodities for import/export prohibitions and restrictions by country.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/ProhibitedGoodsRequest" }
            }
          }
        },
        "responses": { "200": { "description": "Screening result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/compliance/restricted-party-screening": {
      "post": {
        "tags": ["Export Compliance"],
        "summary": "Restricted Party Screening",
        "description": "Screen parties against the trade.gov Consolidated Screening List — 25,000+ entries from OFAC SDN, BIS Entity List, and 12+ other federal watchlists.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/RestrictedPartyRequest" }
            }
          }
        },
        "responses": { "200": { "description": "Screening result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/compliance/hs-classification": {
      "post": {
        "tags": ["Export Compliance"],
        "summary": "HS Code Classification",
        "description": "Classify commodities into HS/tariff codes with duty rates, FTA eligibility, and ECCN determination.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/HsClassificationRequest" }
            }
          }
        },
        "responses": { "200": { "description": "Classification result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/compliance/description-guidance": {
      "post": {
        "tags": ["Export Compliance"],
        "summary": "Description Guidance",
        "description": "Evaluate commodity descriptions for customs compliance quality.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/DescriptionGuidanceRequest" }
            }
          }
        },
        "responses": { "200": { "description": "Evaluation result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/compliance/export-license": {
      "post": {
        "tags": ["Export Compliance"],
        "summary": "Export License Determination",
        "description": "Determine if an export license is required under EAR, ITAR, or OFAC regulations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/ExportLicenseRequest" }
            }
          }
        },
        "responses": { "200": { "description": "License determination", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/compliance/hs-lookup": {
      "post": {
        "tags": ["Export Compliance"],
        "summary": "HS Code Lookup",
        "description": "Look up HS/HTS tariff codes by commodity description or HS code prefix using USITC database with AI-powered classification.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/HsLookupRequest" }
            }
          }
        },
        "responses": { "200": { "description": "Lookup results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/validate": {
      "post": {
        "tags": ["AES Filing"],
        "summary": "Validate EEI Filing",
        "description": "Validate Electronic Export Information data against FTR 30.6 rules.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Validation result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/prepare": {
      "post": {
        "tags": ["AES Filing"],
        "summary": "Prepare AES Filing",
        "description": "Validate and generate an AESTIR-compatible AES-ready payload.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Prepared filing", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/filing-required": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "Check Filing Required",
        "description": "Quick check if EEI filing is required based on destination country, value, and license type.",
        "parameters": [
          { "name": "destination", "in": "query", "schema": { "type": "string" }, "description": "ISO-2 destination country" },
          { "name": "value", "in": "query", "schema": { "type": "number" }, "description": "Shipment value in USD" },
          { "name": "licenseType", "in": "query", "schema": { "type": "string" }, "description": "AES license type code" }
        ],
        "responses": { "200": { "description": "Filing required result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/filing": {
      "post": {
        "tags": ["AES Filing"],
        "summary": "Create Filing",
        "description": "Create a draft EEI filing.",
        "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object" } } } },
        "responses": { "200": { "description": "Filing created", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/filing/{id}/submit": {
      "post": {
        "tags": ["AES Filing"],
        "summary": "Submit Filing to AES",
        "description": "Submit a validated filing to CBP AESDirect via WebLink.",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Filing submitted", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/filing/{id}": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "Get Filing by ID",
        "description": "Retrieve a filing record by its database ID.",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Filing details", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/filings": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List Filings",
        "description": "List all filings with optional filters.",
        "parameters": [
          { "name": "status", "in": "query", "schema": { "type": "string", "enum": ["DRAFT", "VALIDATED", "SUBMITTED", "ACCEPTED", "REJECTED", "CANCELLED"] } },
          { "name": "usppiEin", "in": "query", "schema": { "type": "string" } },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 25 } },
          { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } }
        ],
        "responses": { "200": { "description": "Filing list", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/filing/{id}/cancel": {
      "post": {
        "tags": ["AES Filing"],
        "summary": "Cancel Filing",
        "description": "Cancel a draft or validated filing.",
        "parameters": [
          { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Filing cancelled", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/weblink-info": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "WebLink Configuration",
        "description": "Returns the current AES WebLink environment configuration.",
        "responses": { "200": { "description": "WebLink config", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/reference/transport-modes": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List Transport Modes",
        "description": "List all AES transport mode codes with filing deadlines.",
        "responses": { "200": { "description": "Transport modes", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/reference/license-types": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List License Types",
        "description": "List all AES license type codes.",
        "responses": { "200": { "description": "License types", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/reference/export-info-codes": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List Export Info Codes",
        "description": "List all Export Information Codes for EEI filings.",
        "responses": { "200": { "description": "EIC codes", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/reference/exemption-codes": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List Exemption Codes",
        "description": "List EEI filing exemption codes (FTR 30.36-30.40).",
        "responses": { "200": { "description": "Exemption codes", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/reference/embargoed-countries": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List Embargoed Countries",
        "description": "List countries under comprehensive OFAC sanctions.",
        "responses": { "200": { "description": "Embargoed countries", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aes/reference/ports": {
      "get": {
        "tags": ["AES Filing"],
        "summary": "List Port Codes",
        "description": "List Schedule D port codes for major U.S. export ports.",
        "responses": { "200": { "description": "Port codes", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/hs/search": {
      "post": {
        "tags": ["HS Code Lookup"],
        "summary": "Search HTS by Keyword",
        "description": "Search the official USITC Harmonized Tariff Schedule by keyword.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["query"],
                "properties": {
                  "query": { "type": "string", "description": "Keyword search term" },
                  "limit": { "type": "integer", "default": 25, "minimum": 1, "maximum": 100 }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      },
      "get": {
        "tags": ["HS Code Lookup"],
        "summary": "Search HTS (GET)",
        "description": "Same keyword search via query parameters.",
        "parameters": [
          { "name": "q", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Search keyword" },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 25 } }
        ],
        "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/hs/classify": {
      "post": {
        "tags": ["HS Code Lookup"],
        "summary": "AI Commodity Classification",
        "description": "Classify a commodity into HTS codes using OpenAI with GRI reasoning.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["description"],
                "properties": {
                  "description": { "type": "string", "description": "Commodity description" },
                  "countryOfOrigin": { "type": "string", "description": "ISO-2 country code" },
                  "intendedUse": { "type": "string" },
                  "material": { "type": "string" }
                }
              }
            }
          }
        },
        "responses": { "200": { "description": "Classification result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/hs/lookup/{htsNumber}": {
      "get": {
        "tags": ["HS Code Lookup"],
        "summary": "Look Up HTS Code",
        "description": "Look up a specific HTS number with all matching tariff lines.",
        "parameters": [
          { "name": "htsNumber", "in": "path", "required": true, "schema": { "type": "string" }, "description": "HTS number or prefix (e.g. 8471)" }
        ],
        "responses": { "200": { "description": "Lookup results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/hs/reference/sections": {
      "get": {
        "tags": ["HS Code Lookup"],
        "summary": "HTS Sections",
        "description": "List all 22 sections of the Harmonized Tariff Schedule.",
        "responses": { "200": { "description": "Sections list", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/hs/reference/gri": {
      "get": {
        "tags": ["HS Code Lookup"],
        "summary": "General Rules of Interpretation",
        "description": "Reference for the 9 GRI used in tariff classification.",
        "responses": { "200": { "description": "GRI rules", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/firearms/ffl/search": {
      "get": {
        "tags": ["Firearms & Explosives"],
        "summary": "Search FFLs",
        "description": "Search Federal Firearms License records.",
        "parameters": [
          { "name": "name", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } },
          { "name": "city", "in": "query", "schema": { "type": "string" } },
          { "name": "type", "in": "query", "schema": { "type": "string" } },
          { "name": "limit", "in": "query", "schema": { "type": "integer", "default": 25 } },
          { "name": "offset", "in": "query", "schema": { "type": "integer", "default": 0 } }
        ],
        "responses": { "200": { "description": "FFL search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/firearms/ffl/verify/{fflNumber}": {
      "get": {
        "tags": ["Firearms & Explosives"],
        "summary": "Verify FFL",
        "description": "Verify a specific FFL license number.",
        "parameters": [
          { "name": "fflNumber", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "FFL verification", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/firearms/ffl/parse/{fflNumber}": {
      "get": {
        "tags": ["Firearms & Explosives"],
        "summary": "Parse FFL Number",
        "description": "Parse an FFL number into its component parts.",
        "parameters": [
          { "name": "fflNumber", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Parsed FFL", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/pharma/dea/lookup/{deaNumber}": {
      "get": {
        "tags": ["Pharma & Controlled Substances"],
        "summary": "DEA Lookup",
        "description": "Look up a DEA registration by number.",
        "parameters": [
          { "name": "deaNumber", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "DEA registration", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/pharma/dea/validate/{deaNumber}": {
      "get": {
        "tags": ["Pharma & Controlled Substances"],
        "summary": "Validate DEA Number",
        "description": "Validate a DEA number format and checksum.",
        "parameters": [
          { "name": "deaNumber", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Validation result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/pharma/fda/drug/search": {
      "get": {
        "tags": ["Pharma & Controlled Substances"],
        "summary": "FDA Drug Search",
        "description": "Search the FDA drug database via openFDA.",
        "parameters": [
          { "name": "q", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Brand name, generic name, or manufacturer" }
        ],
        "responses": { "200": { "description": "Drug search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/pharma/fda/recalls": {
      "get": {
        "tags": ["Pharma & Controlled Substances"],
        "summary": "Drug Recalls",
        "description": "Get drug recall enforcement actions from openFDA.",
        "parameters": [
          { "name": "drug", "in": "query", "schema": { "type": "string" } },
          { "name": "classification", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Recall results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/financial/sec/search": {
      "get": {
        "tags": ["Financial & Securities"],
        "summary": "SEC Company Search",
        "description": "Search SEC EDGAR for public companies.",
        "parameters": [
          { "name": "q", "in": "query", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Company search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/financial/sec/filings/{cik}": {
      "get": {
        "tags": ["Financial & Securities"],
        "summary": "SEC Company Filings",
        "description": "Get recent SEC filings for a company by CIK number.",
        "parameters": [
          { "name": "cik", "in": "path", "required": true, "schema": { "type": "string" } },
          { "name": "form", "in": "query", "schema": { "type": "string" }, "description": "Filter by form type (10-K, 10-Q, 8-K, etc.)" }
        ],
        "responses": { "200": { "description": "Filing results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/financial/fdic/search": {
      "get": {
        "tags": ["Financial & Securities"],
        "summary": "FDIC Bank Search",
        "description": "Search FDIC-insured institutions.",
        "parameters": [
          { "name": "q", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Bank search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/financial/finra/brokers": {
      "get": {
        "tags": ["Financial & Securities"],
        "summary": "FINRA Broker Search",
        "description": "Search FINRA BrokerCheck for registered brokers.",
        "parameters": [
          { "name": "name", "in": "query", "schema": { "type": "string" } },
          { "name": "crd", "in": "query", "schema": { "type": "string" } },
          { "name": "firm", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Broker search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aviation/faa/aircraft/search": {
      "get": {
        "tags": ["Aviation & Transport"],
        "summary": "FAA Aircraft Search",
        "description": "Search the FAA Aircraft Registry.",
        "parameters": [
          { "name": "nNumber", "in": "query", "schema": { "type": "string" } },
          { "name": "manufacturer", "in": "query", "schema": { "type": "string" } },
          { "name": "model", "in": "query", "schema": { "type": "string" } },
          { "name": "name", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Aircraft search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aviation/faa/aircraft/{nNumber}": {
      "get": {
        "tags": ["Aviation & Transport"],
        "summary": "N-Number Lookup",
        "description": "Look up a specific aircraft by N-number.",
        "parameters": [
          { "name": "nNumber", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Aircraft details", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/aviation/fmcsa/carrier/{dotNumber}": {
      "get": {
        "tags": ["Aviation & Transport"],
        "summary": "FMCSA Carrier Lookup",
        "description": "Look up a motor carrier by USDOT number.",
        "parameters": [
          { "name": "dotNumber", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Carrier details", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/business/sam/search": {
      "get": {
        "tags": ["Professional & Business"],
        "summary": "SAM.gov Entity Search",
        "description": "Search SAM.gov federal contractor registrations.",
        "parameters": [
          { "name": "q", "in": "query", "schema": { "type": "string" } },
          { "name": "uei", "in": "query", "schema": { "type": "string" } },
          { "name": "cage", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "SAM.gov search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/business/sam/entity/{uei}": {
      "get": {
        "tags": ["Professional & Business"],
        "summary": "Entity Lookup by UEI",
        "description": "Look up a specific SAM.gov entity by UEI.",
        "parameters": [
          { "name": "uei", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Entity details", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/legal/oig/search": {
      "get": {
        "tags": ["Legal & Exclusions"],
        "summary": "LEIE Exclusion Search",
        "description": "Search the OIG List of Excluded Individuals/Entities.",
        "parameters": [
          { "name": "lastName", "in": "query", "schema": { "type": "string" } },
          { "name": "firstName", "in": "query", "schema": { "type": "string" } },
          { "name": "npi", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Exclusion search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/legal/oig/check/{npi}": {
      "get": {
        "tags": ["Legal & Exclusions"],
        "summary": "NPI Exclusion Check",
        "description": "Quick check if a provider NPI is on the OIG exclusion list.",
        "parameters": [
          { "name": "npi", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Exclusion check result", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/maritime/vessels": {
      "get": {
        "tags": ["Maritime & Port Security"],
        "summary": "Vessel Search",
        "description": "Search vessels by name, IMO, MMSI, flag state, or type.",
        "parameters": [
          { "name": "name", "in": "query", "schema": { "type": "string" } },
          { "name": "imo", "in": "query", "schema": { "type": "string" } },
          { "name": "mmsi", "in": "query", "schema": { "type": "string" } },
          { "name": "flag", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Vessel search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/maritime/vessels/imo/{imo}": {
      "get": {
        "tags": ["Maritime & Port Security"],
        "summary": "IMO Lookup",
        "description": "Look up a vessel by IMO number.",
        "parameters": [
          { "name": "imo", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "Vessel details", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/maritime/ctpat": {
      "get": {
        "tags": ["Maritime & Port Security"],
        "summary": "C-TPAT Partner Search",
        "description": "Search C-TPAT certified partners.",
        "parameters": [
          { "name": "name", "in": "query", "schema": { "type": "string" } },
          { "name": "svi", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "C-TPAT search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/fcc/licenses": {
      "get": {
        "tags": ["FCC Licensing"],
        "summary": "FCC License Search",
        "description": "Search the FCC Universal Licensing System.",
        "parameters": [
          { "name": "name", "in": "query", "schema": { "type": "string" } },
          { "name": "callSign", "in": "query", "schema": { "type": "string" } },
          { "name": "frn", "in": "query", "schema": { "type": "string" } },
          { "name": "state", "in": "query", "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "License search results", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    },
    "/v1/fcc/licenses/callsign/{callSign}": {
      "get": {
        "tags": ["FCC Licensing"],
        "summary": "Call Sign Lookup",
        "description": "Look up a specific FCC license by call sign.",
        "parameters": [
          { "name": "callSign", "in": "path", "required": true, "schema": { "type": "string" } }
        ],
        "responses": { "200": { "description": "License details", "content": { "application/json": { "schema": { "type": "object" } } } } }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Obtain a token via POST /oauth/token using client_credentials grant type."
      }
    },
    "schemas": {
      "BusinessRiskRequest": {
        "type": "object",
        "required": ["name"],
        "properties": {
          "name": { "type": "string", "maxLength": 500, "description": "Legal business name" },
          "country": { "type": "string", "maxLength": 3, "description": "ISO-2 country code (e.g. US, GB). Improves entity disambiguation accuracy." },
          "ein": { "type": "string", "maxLength": 20, "description": "Employer Identification Number. Strong identifier for U.S. businesses." },
          "duns": { "type": "string", "maxLength": 20, "description": "D&B DUNS number. Unique 9-digit business identifier." },
          "uei": { "type": "string", "maxLength": 20, "description": "Unique Entity Identifier from SAM.gov." },
          "industry": { "type": "string", "maxLength": 100, "description": "Declared industry (e.g. 'Government Contracting'). Activates industry-specific weight profiles." },
          "industryCode": { "type": "string", "maxLength": 20, "description": "SIC or NAICS code." },
          "website": { "type": "string", "maxLength": 500, "description": "Company website URL." },
          "officers": { "type": "array", "maxItems": 20, "items": { "type": "string", "maxLength": 200 }, "description": "Known officers/directors — each is individually screened." }
        }
      },
      "IndividualRiskRequest": {
        "type": "object",
        "required": ["firstName", "lastName"],
        "properties": {
          "firstName": { "type": "string", "maxLength": 200, "description": "First name (required)" },
          "lastName": { "type": "string", "maxLength": 200, "description": "Last name (required)" },
          "middleName": { "type": "string", "maxLength": 200, "description": "Middle name — helps disambiguate common names" },
          "dateOfBirth": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$", "description": "Date of birth in YYYY-MM-DD format. Key identifier for disambiguation." },
          "country": { "type": "string", "maxLength": 3, "description": "ISO-2 country code. Recommended for accurate entity resolution." },
          "ssn_last4": { "type": "string", "minLength": 4, "maxLength": 4, "description": "Last 4 digits of SSN. Strongest individual identifier. NOT stored — used only for match scoring." },
          "npi": { "type": "string", "maxLength": 20, "description": "National Provider Identifier — for healthcare professionals. Enables OIG LEIE cross-reference." },
          "employer": { "type": "string", "maxLength": 500, "description": "Current employer name." },
          "title": { "type": "string", "maxLength": 200, "description": "Professional title (e.g. CFO, Medical Director)." },
          "industry": { "type": "string", "maxLength": 100, "description": "Industry context. Activates industry-specific weight profiles." }
        }
      },
      "BusinessRiskResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "type": "object",
            "properties": {
              "id": { "type": "string", "description": "Unique assessment ID" },
              "entityType": { "type": "string", "enum": ["BUSINESS"] },
              "entityName": { "type": "string" },
              "score": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Composite risk score" },
              "band": { "type": "string", "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"], "description": "Risk band" },
              "categoryScores": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "category": { "type": "string" },
                    "score": { "type": "integer" },
                    "factorCount": { "type": "integer" }
                  }
                }
              },
              "factors": {
                "type": "array",
                "items": { "$ref": "#/components/schemas/RiskFactor" }
              },
              "summary": { "$ref": "#/components/schemas/RiskSummary" },
              "entityResolution": { "$ref": "#/components/schemas/EntityResolution" },
              "meta": { "$ref": "#/components/schemas/RiskMeta" }
            }
          }
        }
      },
      "IndividualRiskResponse": {
        "type": "object",
        "properties": {
          "success": { "type": "boolean" },
          "data": {
            "type": "object",
            "properties": {
              "id": { "type": "string" },
              "entityType": { "type": "string", "enum": ["INDIVIDUAL"] },
              "entityName": { "type": "string" },
              "score": { "type": "integer", "minimum": 0, "maximum": 1000 },
              "band": { "type": "string", "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"] },
              "factors": {
                "type": "array",
                "items": { "$ref": "#/components/schemas/RiskFactor" }
              },
              "summary": { "$ref": "#/components/schemas/RiskSummary" },
              "entityResolution": { "$ref": "#/components/schemas/EntityResolution" },
              "meta": { "$ref": "#/components/schemas/RiskMeta" }
            }
          }
        }
      },
      "RiskFactor": {
        "type": "object",
        "properties": {
          "factorCode": { "type": "string", "description": "Unique factor identifier (e.g. BIZ_SAM_DEBARMENT)" },
          "factorName": { "type": "string" },
          "category": { "type": "string" },
          "points": { "type": "integer", "description": "Points contributed to score (after confidence adjustment)" },
          "maxPoints": { "type": "integer" },
          "severity": { "type": "string", "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"] },
          "description": { "type": "string" },
          "source": { "type": "string" },
          "sourceUrl": { "type": "string", "nullable": true },
          "accusationOnly": { "type": "boolean", "description": "True if this is an allegation, not a confirmed finding" },
          "matchConfidence": { "type": "string", "enum": ["HIGH", "MEDIUM", "LOW"], "description": "Entity disambiguation confidence for this match" },
          "confidenceScore": { "type": "integer", "minimum": 0, "maximum": 100, "description": "Numeric confidence score (0–100)" },
          "confidenceReasons": { "type": "array", "items": { "type": "string" }, "description": "Reasons for the confidence level" }
        }
      },
      "EntityResolution": {
        "type": "object",
        "description": "Entity disambiguation metadata showing how confidently the API resolved the input to real-world entities.",
        "properties": {
          "confidence": { "type": "string", "enum": ["HIGH", "MEDIUM", "LOW"], "description": "Overall entity resolution confidence based on identifiers provided" },
          "identifierCount": { "type": "integer", "description": "Number of identifying fields provided" },
          "identifiersProvided": { "type": "array", "items": { "type": "string" }, "description": "Which identifiers were supplied (e.g. country, ein, dateOfBirth)" },
          "identifiersMissing": { "type": "array", "items": { "type": "string" }, "description": "Which recommended identifiers were not supplied" },
          "warnings": { "type": "array", "items": { "type": "string" }, "description": "Warnings when input is too thin for reliable resolution" }
        }
      },
      "RiskSummary": {
        "type": "object",
        "properties": {
          "executiveSummary": { "type": "string" },
          "keyFindings": { "type": "array", "items": { "type": "string" } },
          "riskNarrative": { "type": "string" },
          "mitigatingFactors": { "type": "array", "items": { "type": "string" } },
          "recommendedActions": { "type": "array", "items": { "type": "string" } },
          "confidence": { "type": "number" },
          "model": { "type": "string" }
        }
      },
      "RiskMeta": {
        "type": "object",
        "properties": {
          "dataSourcesUsed": { "type": "array", "items": { "type": "string" } },
          "processingTimeMs": { "type": "integer" },
          "scoredAt": { "type": "string", "format": "date-time" },
          "disclaimer": { "type": "string" }
        }
      },
      "RiskBatchRequest": {
        "type": "object",
        "required": ["entityType", "entities"],
        "properties": {
          "entityType": { "type": "string", "enum": ["BUSINESS", "INDIVIDUAL"] },
          "entities": { "type": "array", "minItems": 2, "maxItems": 500, "items": { "type": "object" }, "description": "Array of entity objects matching BusinessRiskRequest or IndividualRiskRequest schema" },
          "deliveryMethod": { "type": "string", "enum": ["WEBHOOK", "CALLBACK_URL", "POLLING", "PDF_EMAIL", "PDF_DOWNLOAD", "S3_PUSH", "ALERT_ONLY"], "default": "POLLING" },
          "webhookUrl": { "type": "string", "format": "uri", "description": "URL to POST results when deliveryMethod is WEBHOOK" },
          "webhookSecret": { "type": "string", "maxLength": 500, "description": "Secret for webhook signature validation" },
          "callbackUrl": { "type": "string", "format": "uri" },
          "emailTo": { "type": "string", "format": "email", "description": "Email for PDF delivery" },
          "s3BucketArn": { "type": "string", "maxLength": 500 },
          "s3RoleArn": { "type": "string", "maxLength": 500 },
          "alertThreshold": { "type": "integer", "minimum": 0, "maximum": 1000, "description": "Only deliver if any entity score exceeds this threshold" }
        }
      },
      "TariffCalculateRequest": {
        "type": "object",
        "required": ["htsCode", "countryOfOrigin", "declaredValue"],
        "properties": {
          "htsCode": { "type": "string", "description": "10-digit HTS code" },
          "countryOfOrigin": { "type": "string", "description": "ISO-2 country code" },
          "declaredValue": { "type": "number", "description": "Declared value in USD" },
          "entryDate": { "type": "string", "format": "date", "description": "Entry date (YYYY-MM-DD), defaults to today" },
          "dateOfLoading": { "type": "string", "format": "date" },
          "modeOfTransport": { "type": "string", "enum": ["OCEAN", "AIR", "GROUND"], "description": "Affects HMF calculation (ocean only)" },
          "quantity": { "type": "number" },
          "quantityUnit": { "type": "string" },
          "steelContentPct": { "type": "number", "description": "Steel content percentage for Section 232" },
          "aluminumContentPct": { "type": "number", "description": "Aluminum content percentage for Section 232" },
          "ftaClaim": { "type": "string", "description": "FTA SPI indicator (e.g. S for USMCA)" }
        }
      },
      "ProhibitedGoodsRequest": {
        "type": "object",
        "required": ["originCountry", "destinationCountry", "commodityDescription"],
        "properties": {
          "originCountry": { "type": "string", "minLength": 2, "maxLength": 3, "description": "ISO-2/3 origin country" },
          "destinationCountry": { "type": "string", "minLength": 2, "maxLength": 3, "description": "ISO-2/3 destination country" },
          "commodityDescription": { "type": "string", "maxLength": 2000 },
          "hsCode": { "type": "string", "description": "Optional HS code for more precise screening" }
        }
      },
      "RestrictedPartyRequest": {
        "type": "object",
        "required": ["parties"],
        "properties": {
          "parties": {
            "type": "array",
            "maxItems": 50,
            "items": {
              "type": "object",
              "required": ["name"],
              "properties": {
                "name": { "type": "string", "maxLength": 500 },
                "country": { "type": "string", "maxLength": 3, "description": "ISO-2/3 country code" },
                "address": { "type": "string", "maxLength": 1000 },
                "type": { "type": "string", "enum": ["CONSIGNEE", "INTERMEDIATE_CONSIGNEE", "END_USER", "PURCHASER", "OTHER"] }
              }
            }
          }
        }
      },
      "HsClassificationRequest": {
        "type": "object",
        "required": ["commodityDescription"],
        "properties": {
          "commodityDescription": { "type": "string", "maxLength": 2000 },
          "originCountry": { "type": "string", "maxLength": 3 },
          "destinationCountry": { "type": "string", "maxLength": 3 },
          "attributes": { "type": "object", "description": "Additional classification attributes" }
        }
      },
      "DescriptionGuidanceRequest": {
        "type": "object",
        "required": ["commodityDescription"],
        "properties": {
          "commodityDescription": { "type": "string", "maxLength": 2000 },
          "destinationCountry": { "type": "string", "maxLength": 3 },
          "hsCode": { "type": "string" }
        }
      },
      "ExportLicenseRequest": {
        "type": "object",
        "required": ["originCountry", "destinationCountry"],
        "properties": {
          "originCountry": { "type": "string", "minLength": 2, "maxLength": 3 },
          "destinationCountry": { "type": "string", "minLength": 2, "maxLength": 3 },
          "commodityDescription": { "type": "string", "maxLength": 2000 },
          "hsCode": { "type": "string" },
          "eccn": { "type": "string", "description": "Export Control Classification Number" },
          "endUse": { "type": "string", "maxLength": 1000 },
          "endUser": { "type": "string", "maxLength": 500 }
        }
      },
      "HsLookupRequest": {
        "type": "object",
        "properties": {
          "commodityDescription": { "type": "string", "maxLength": 2000, "description": "At least one of commodityDescription or hsCode is required" },
          "hsCode": { "type": "string", "maxLength": 20 },
          "country": { "type": "string", "maxLength": 3 },
          "useAI": { "type": "boolean", "default": false, "description": "Enable AI-powered classification" },
          "maxResults": { "type": "integer", "default": 10, "minimum": 1, "maximum": 50 }
        }
      }
    }
  }
}
