{
  "schema_version": "1.0",
  "name": "code-dictionary",
  "display_name": "Medical & Industry Code Dictionary",
  "description": "Looks up human-readable descriptions for industry classification codes: ICD-10-CM medical diagnosis codes, NAICS industry codes (2–6 digit), FIPS state codes, NPI provider records (live NPPES lookup), and NUCC healthcare taxonomy codes. All public domain government data.",
  "endpoint": "https://bacapi-code-dictionary-api.workers.dev/codes",
  "method": "GET",
  "payment": {
    "protocol": "x402",
    "network":  "base",
    "currency": "USDC",
    "amount":   "0.05"
  },
  "parameters": {
    "type": {
      "type":        "string",
      "required":    true,
      "description": "Code type: icd10 | naics | fips | npi | taxonomy",
      "in":          "path — /codes/{type}"
    },
    "code": {
      "type":        "string",
      "required":    true,
      "description": "The code to look up",
      "examples": {
        "icd10":    "E11.9",
        "naics":    "112511",
        "fips":     "06",
        "npi":      "1234567893",
        "taxonomy": "207Q00000X"
      }
    }
  },
  "response_shape": {
    "icd10": {
      "type":        "icd10",
      "code":        "string",
      "description": "string — e.g. 'Type 2 diabetes mellitus without complications'",
      "chapter":     "string"
    },
    "naics": {
      "type":        "naics",
      "code":        "string",
      "title":       "string",
      "sector":      "string"
    },
    "fips": {
      "type":  "fips",
      "code":  "string",
      "state": "string",
      "level": "state"
    },
    "npi": {
      "type":         "npi",
      "npi":          "string",
      "entity_type":  "Individual | Organization",
      "name":         "string",
      "credential":   "string | null",
      "specialty":    "string | null",
      "taxonomy_code":"string | null",
      "address":      "{ street, city, state, zip }",
      "phone":        "string | null",
      "status":       "string | null"
    },
    "taxonomy": {
      "type":        "taxonomy",
      "code":        "string",
      "description": "string"
    }
  },
  "example_request": "GET /codes/icd10?code=E11.9",
  "example_response": {
    "data": {
      "type":        "icd10",
      "code":        "E11.9",
      "description": "Type 2 diabetes mellitus without complications",
      "chapter":     "Endocrine, nutritional and metabolic diseases"
    },
    "meta": { "source": "ICD-10-CM (CMS, public domain)", "priced_at": "0.05 USDC" }
  },
  "tags": ["icd10","naics","fips","npi","taxonomy","medical-codes","industry-codes","healthcare","billing"],
  "category": "reference"
}
