{"openapi":"3.0.0","paths":{"/v1/usage":{"get":{"description":"Credit consumption for the current billing period, with a per-endpoint breakdown of where it went. Metered responses carry the same figures in their `X-Credit-*` headers and in `meta.credits`. Once the allowance is spent, metered requests return 402 until `period.resetsAt` — this endpoint stays readable throughout. Only successful requests are charged.\n\n**Cost:** free.","operationId":"UsageController_usage_v1","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/UsageDto"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"401":{"description":"Missing, revoked, expired, or invalid access token"},"403":{"description":"API access is not enabled for the organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"Get Credit Usage","tags":["Usage"]}},"/v1/payers":{"get":{"description":"All payers with data in PriceMedic, each with its available networks and their most recent data month. Use the payer and network `slug` values as identifiers everywhere else in the API.\n\n**Cost:** 1 credit.","operationId":"PayersController_listPayers_v1","parameters":[{"name":"search","required":false,"in":"query","description":"Filter payers by name or slug (case-insensitive substring)","schema":{"type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PayerDto"}},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"List Payers + Networks","tags":["Payers"]}},"/v1/practitioners/{id}":{"get":{"description":"NPPES registry record (individual/type-1 NPIs) with primary specialty and current provider-organization memberships. Organizational NPIs 404 with a pointer to /v1/organizations.\n\n**Cost:** 1 credit.","operationId":"PractitionersController_get_v1","parameters":[{"name":"id","required":true,"in":"path","description":"`npi1:{10 digits}` — an individual NPI","schema":{"example":"npi1:1689832941","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/PractitionerDto"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Malformed identifier"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown NPI, or the NPI belongs to an organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"Get Practitioner","tags":["Practitioners"]}},"/v1/organizations/search":{"get":{"description":"Find provider organizations by name (fuzzy — tolerates typos and word order), DBA/billing alias, EIN, or NPI, with optional taxonomy/state/CBSA filters. Results are relevance-ranked; `matchedOn` explains each hit (e.g. an acquired practice billing under the parent EIN matches as `alias`). Results carry `ein` — address them as GET /v1/organizations/ein:{ein}.\n\n**Cost:** 2 credits.","operationId":"OrganizationsController_search_v1","parameters":[{"name":"q","required":false,"in":"query","description":"Organization name (fuzzy — tolerates typos and word order), DBA/billing alias, or an identifier: a 9-digit EIN or 10-digit organizational NPI matches exactly.","schema":{"example":"crystal run","type":"string"}},{"name":"geography","required":false,"in":"query","description":"Where the organization operates. One of: a two-letter state (`NY` or `state:NY`), a CBSA (`cbsa:26420` — prefixed because a bare five-digit value is ambiguous between a CBSA and a ZIP), or a ZIP with an optional radius in miles (`zip:77030`, `zip:77030,50`; ZIP+4 is accepted and truncated; radius defaults to 25, max 150). On its own this matches organization-level presence, so facilities without a practitioner roster still surface. Combined with `taxonomy`, both must be satisfied by the SAME practitioner.","schema":{"example":"zip:77030,25","type":"string"}},{"name":"taxonomy","required":false,"in":"query","description":"NUCC taxonomy codes (comma-separated) — matches organizations with current practitioners in any. Combined with `geography`, both must be satisfied by the SAME practitioner, so an organization qualifies only where it has a matching practitioner practising in the requested market.","schema":{"example":"207X00000X,207XS0114X","type":"string"}},{"name":"minPractitioners","required":false,"in":"query","description":"Minimum practitioner count (facilities such as ASCs have 0)","schema":{"example":10,"type":"number"}},{"name":"limit","required":false,"in":"query","description":"Page size (default 25, max 100)","schema":{"default":25,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Offset for pagination","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/OrganizationSearchResultDto"}},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"Search Organizations","tags":["Organizations"]}},"/v1/organizations/{id}":{"get":{"description":"Addressed by typed identifier. `ein:{ein}` returns the organization profile — names, specialties, footprint, practitioner counts. `npi2:{npi}` returns the NPPES registry record for that organizational NPI; practitioner NPIs 404 with a pointer to /v1/practitioners. Page through the roster with GET /v1/organizations/{id}/roster.\n\n**Cost:** 1 credit.","operationId":"OrganizationsController_get_v1","parameters":[{"name":"id","required":true,"in":"path","description":"`ein:{9 digits}` or `npi2:{10 digits}`","schema":{"example":"ein:133843560","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"oneOf":[{"$ref":"#/components/schemas/OrganizationDto"},{"$ref":"#/components/schemas/OrganizationNpiDto"}]},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Malformed identifier"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown EIN or NPI, or the NPI belongs to a practitioner"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"Get Organization","tags":["Organizations"]}},"/v1/organizations/{id}/locations":{"get":{"description":"Practice locations with addresses, coordinates, CBSAs, and per-location practitioner counts. Validated locations (identifier-verified practitioner presence) rank first; filter with `validated=true`.\n\n**Cost:** 1 credit.","operationId":"OrganizationsController_locations_v1","parameters":[{"name":"id","required":true,"in":"path","description":"`ein:{9 digits}` or `npi2:{10 digits}`","schema":{"example":"ein:133843560","type":"string"}},{"name":"validated","required":false,"in":"query","description":"Only validated clinic locations (identifier-verified practitioner presence)","schema":{"example":true,"type":"boolean"}},{"name":"limit","required":false,"in":"query","description":"Page size (default 50, max 200)","schema":{"default":50,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Offset for pagination","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/LocationsPageDto"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Malformed identifier or pagination params"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"List Organization Locations","tags":["Organizations"]}},"/v1/organizations/{id}/networks":{"get":{"description":"In-network payers and networks from the organization's schedule participation in payer price-transparency data — a network is listed only when the organization appears in its latest data month. `slug` values plug into rate lookups as payer_slug/network_slug.\n\n**Cost:** 3 credits.","operationId":"OrganizationsController_networks_v1","parameters":[{"name":"id","required":true,"in":"path","description":"`ein:{9 digits}` or `npi2:{10 digits}`","schema":{"example":"ein:133843560","type":"string"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/InNetworkPayerDto"}},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Malformed EIN"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"List Organization Networks","tags":["Organizations"]}},"/v1/organizations/{id}/roster":{"get":{"description":"Current practitioners ordered by name. `total` is the full roster size.\n\n**Cost:** 1 credit.","operationId":"OrganizationsController_roster_v1","parameters":[{"name":"id","required":true,"in":"path","description":"`ein:{9 digits}` or `npi2:{10 digits}`","schema":{"example":"ein:133843560","type":"string"}},{"name":"limit","required":false,"in":"query","description":"Page size (default 50, max 200)","schema":{"default":50,"type":"number"}},{"name":"offset","required":false,"in":"query","description":"Offset for pagination","schema":{"default":0,"type":"number"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RosterPageDto"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Malformed identifier or pagination params"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown organization"},"429":{"description":"Rate limit exceeded — see the Retry-After header"}},"security":[{"accessToken":[]}],"summary":"List Organization Roster","tags":["Organizations"]}},"/v1/rates":{"post":{"description":"Negotiated rates for up to 100 organizations × 500 billing codes, read directly from payer price-transparency data (latest month). Each organization returns one rate object per billing code: the canonical rate line, shaped like a TiC in-network record, with `scheduleLineId` as its primary key and a `selection` stating how it was chosen (the modal price, or the maximum when the payer’s fee-schedule rule says so). Set `includeVariations` to also get every other observed rate as a delta against the canonical line, annotated with the roster drivers (taxonomy, state, practitioner) explaining who the variant applies to; it is off by default because that tail dominates the payload. Modifier combinations are separate rate rows, never variations. Filter with `billingClass`, `modifiers` ('none' = unmodified), `posCode` (CMS place-of-service — catchalls like CSTM-00 match; unreported POS falls back to its care setting), and `negotiatedTypes`. Each organization carries its `name` and a `schedules` map naming every fee schedule that contributed rates — the organization’s roster on it (`npiList`) plus that roster’s composition (practitioner/organization counts, modal taxonomy, state and CBSA) — for reconciling discrepancies.\n\n**Cost:** 20 credits. Flat whatever the request size, so batch organizations and codes into one call.","operationId":"RatesController_rates_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RatesRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RatesResponseDto"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Malformed request (EIN/code formats, batch limits)"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown payer or network"},"429":{"description":"Rate limit exceeded — see the Retry-After header"},"503":{"description":"Fee-schedule index not yet built for the payer"}},"security":[{"accessToken":[]}],"summary":"Get Rates","tags":["Rates"]}},"/v1/rates/distributions":{"post":{"description":"EIN-weighted rate distributions for a market instead of named organizations: provide a `geography` (state `TX`, `cbsa:26420`, or `zip:77030,25` for a radius in miles) and/or NUCC `taxonomy` codes, and the API resolves the market from the payer’s own schedule rosters — every organization with a provider whose practice address and taxonomy match, no sampling — computes one canonical rate per organization per code and setting, and returns min/p25/median/p75/p90/max across organizations. Geography and taxonomy must be satisfied by the SAME provider, and only schedules carrying a matching provider contribute, so a national system contributes its in-market rate or nothing at all. `cohort.matched` reports the population size and `includeCohort` lists it with each organization’s matching-provider count. Distributions default to unmodified, dollar, professional lines.\n\n**Cost:** 20 credits. Flat whatever the breadth of the market.","operationId":"DistributionsController_rateDistributions_v1","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateDistributionsRequestDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/RateDistributionsResponseDto"},"meta":{"type":"object","properties":{"requestId":{"type":"string","example":"nx7OO6OYxHJe8V2k","description":"Correlation id for this request — include it when contacting support"},"credits":{"type":"object","description":"What this request cost and what is left of the monthly allowance. Mirrors the X-Credit-* response headers; absent on the free endpoints.","properties":{"cost":{"type":"number","example":20,"description":"Credits charged for this request"},"limit":{"type":"number","nullable":true,"example":10000,"description":"Credits per calendar month — null when uncapped"},"remaining":{"type":"number","nullable":true,"example":8760,"description":"Credits left this period — null when uncapped"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z"}}}}}}}}}},"400":{"description":"Missing market criteria (geography or taxonomy) or malformed request"},"401":{"description":"Missing, revoked, expired, or invalid access token"},"402":{"description":"Monthly credit allowance exhausted — see GET /v1/usage"},"403":{"description":"API access is not enabled for the organization"},"404":{"description":"Unknown payer or network"},"429":{"description":"Rate limit exceeded — see the Retry-After header"},"503":{"description":"Rate index not yet built for the payer"}},"security":[{"accessToken":[]}],"summary":"Get Rate Distributions","tags":["Rates"]}}},"info":{"title":"PriceMedic API","description":"Public API for payer, network, provider, and negotiated-rate data. All endpoints serve the latest available data month per payer/network; responses echo it as `meta.data_month`. Authenticate with an organization access token (`Authorization: Bearer pm_…`), created in the API Tokens section after signing in.\n\n## Usage credits\n\nRequests are metered in credits against a monthly allowance per organization — each operation lists its own cost, and the header shows what is left. Only successful requests are charged; metered responses carry `X-Credit-*` headers and a `meta.credits` object, and requests return **402 Payment Required** once the allowance is spent. `GET /v1/usage` reports the balance and is free.","version":"0.2.0","contact":{}},"tags":[],"servers":[{"url":"https://api.pricemedic.com"},{"url":"http://localhost:5000","description":"Local development"}],"components":{"securitySchemes":{"accessToken":{"scheme":"bearer","bearerFormat":"JWT","type":"http","description":"Organization access token (pm_…)"}},"schemas":{"UsagePeriodDto":{"type":"object","properties":{"start":{"type":"string","example":"2026-08-01","description":"First day of the current billing period (UTC calendar month)"},"resetsAt":{"type":"string","example":"2026-09-01T00:00:00.000Z","description":"When the allowance resets"}},"required":["start","resetsAt"]},"EndpointUsageDto":{"type":"object","properties":{"endpoint":{"type":"string","example":"POST /v1/rates/distributions","description":"Route pattern the credits were spent on"},"credits":{"type":"number","example":420,"description":"Credits spent on this route in the period"},"requests":{"type":"number","example":21,"description":"Billed requests to this route in the period"}},"required":["endpoint","credits","requests"]},"UsageDto":{"type":"object","properties":{"period":{"$ref":"#/components/schemas/UsagePeriodDto"},"limit":{"type":"object","example":10000,"nullable":true,"description":"Credits available this period. `null` means the organization is uncapped."},"used":{"type":"number","example":1240,"description":"Credits spent this period"},"remaining":{"type":"object","example":8760,"nullable":true,"description":"Credits left this period — `null` when uncapped. Requests costing more than this are refused with 402."},"byEndpoint":{"description":"Where the credits went, most expensive route first","type":"array","items":{"$ref":"#/components/schemas/EndpointUsageDto"}}},"required":["period","limit","used","remaining","byEndpoint"]},"NetworkDto":{"type":"object","properties":{"slug":{"type":"string","example":"aetna_hmo_ga","description":"Stable network identifier used across the API"},"name":{"type":"string","example":"Aetna HMO (GA)","description":"Network display name"},"latestMonth":{"type":"string","example":"2026-05-01","description":"Most recent data month available for this network (first of month)"}},"required":["slug","name","latestMonth"]},"PayerDto":{"type":"object","properties":{"slug":{"type":"string","example":"aetna","description":"Stable payer identifier used across the API"},"name":{"type":"string","example":"Aetna","description":"Payer display name"},"networks":{"description":"Networks with available data for this payer","type":"array","items":{"$ref":"#/components/schemas/NetworkDto"}}},"required":["slug","name","networks"]},"TaxonomyDto":{"type":"object","properties":{"code":{"type":"string","example":"2085R0202X"},"description":{"type":"object","example":"Diagnostic Radiology","nullable":true},"primary":{"type":"boolean","example":true,"description":"Whether this is the primary taxonomy"}},"required":["code","description","primary"]},"LicenseDto":{"type":"object","properties":{"number":{"type":"object","example":"C178867","nullable":true},"state":{"type":"object","example":"CA","nullable":true}},"required":["number","state"]},"AddressDto":{"type":"object","properties":{"line1":{"type":"object","example":"200 W Arbor Dr","nullable":true},"line2":{"type":"object","example":"Suite 100","nullable":true},"city":{"type":"object","example":"San Diego","nullable":true},"state":{"type":"object","example":"CA","nullable":true},"zip":{"type":"object","example":"92103","nullable":true}},"required":["line1","line2","city","state","zip"]},"OrganizationRefDto":{"type":"object","properties":{"ein":{"type":"string","example":"133843560"},"name":{"type":"string","example":"Crystal Run Healthcare Physicians LLP"}},"required":["ein","name"]},"PractitionerDto":{"type":"object","properties":{"npi":{"type":"string","example":"1689832941"},"name":{"type":"object","example":"Joseph Abrams","nullable":true},"firstName":{"type":"object","example":"Joseph","nullable":true},"middleName":{"type":"object","example":"A","nullable":true},"lastName":{"type":"object","example":"Abrams","nullable":true},"credential":{"type":"object","example":"M.D.","nullable":true},"gender":{"type":"object","example":"M","nullable":true},"specialty":{"type":"object","example":"Diagnostic Radiology","nullable":true,"description":"Primary taxonomy display name"},"taxonomies":{"description":"All NPPES taxonomies, primary first","type":"array","items":{"$ref":"#/components/schemas/TaxonomyDto"}},"license":{"description":"License for the primary taxonomy","allOf":[{"$ref":"#/components/schemas/LicenseDto"}]},"address":{"description":"Practice location from the NPPES registry","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"phone":{"type":"object","example":"8009268273","nullable":true},"enumerationDate":{"type":"object","example":"2008-05-22","nullable":true,"description":"NPPES enumeration date"},"lastUpdated":{"type":"object","example":"2023-08-09","nullable":true,"description":"NPPES last update"},"primaryAffiliation":{"nullable":true,"description":"Most likely current primary organization (ranked by primary history, confidence, tenure)","allOf":[{"$ref":"#/components/schemas/OrganizationRefDto"}]},"organizations":{"description":"All current provider-organization memberships — use ein with GET /v1/organizations/ein:{ein}","type":"array","items":{"$ref":"#/components/schemas/OrganizationRefDto"}}},"required":["npi","name","firstName","middleName","lastName","credential","gender","specialty","taxonomies","license","address","phone","enumerationDate","lastUpdated","primaryAffiliation","organizations"]},"OrganizationLocationDto":{"type":"object","properties":{"street":{"type":"object","example":"100 Crystal Run Rd Ste 107","nullable":true},"city":{"type":"object","example":"Middletown","nullable":true},"state":{"type":"object","example":"NY","nullable":true},"zip":{"type":"object","example":"10941","nullable":true},"latitude":{"type":"object","example":41.4459,"nullable":true},"longitude":{"type":"object","example":-74.3625,"nullable":true},"geocode":{"type":"string","enum":["address","zip"],"nullable":true,"description":"Geocode precision: 'address' = rooftop-level, 'zip' = ZIP centroid fallback, null = no coordinates"},"cbsaCode":{"type":"object","example":"28880","nullable":true,"description":"CBSA of the location"},"cbsaName":{"type":"object","example":"Scranton--Wilkes-Barre, PA","nullable":true},"practitionerCount":{"type":"number","example":12,"description":"Practitioners assigned to this location"},"validated":{"type":"boolean","example":true,"description":"Validated clinic location — practitioner presence verified by identifier match"}},"required":["street","city","state","zip","latitude","longitude","geocode","cbsaCode","cbsaName","practitionerCount","validated"]},"CbsaDto":{"type":"object","properties":{"code":{"type":"string","example":"28880"},"name":{"type":"object","example":"Scranton--Wilkes-Barre, PA","nullable":true},"primary":{"type":"boolean","example":true,"description":"Whether this is the organization's primary CBSA"}},"required":["code","name","primary"]},"OrganizationTaxonomyDto":{"type":"object","properties":{"code":{"type":"string","example":"207R00000X","description":"NUCC taxonomy code"},"description":{"type":"object","example":"Internal Medicine","nullable":true},"practitionerCount":{"type":"object","example":74,"nullable":true,"description":"Current practitioners with this taxonomy in the organization; null for registry taxonomies"},"source":{"type":"string","enum":["roster","registry"],"description":"'roster' = aggregated from the current practitioner roster; 'registry' = the organization's own NPPES (type-2) taxonomy — how facilities without practitioners (ASCs, pharmacies, imaging centers) are classified"}},"required":["code","description","practitionerCount","source"]},"OrganizationSearchResultDto":{"type":"object","properties":{"ein":{"type":"string","example":"133843560","description":"EIN — address it as GET /v1/organizations/ein:{ein}"},"name":{"type":"string","example":"Crystal Run Healthcare Physicians LLP"},"specialty":{"type":"object","example":"Internal Medicine","nullable":true,"description":"Primary specialty grouper"},"state":{"type":"object","example":"NY","nullable":true,"description":"Primary state"},"practitionerCount":{"type":"number","example":711,"description":"Practitioner count (0 for facilities such as ASCs)"},"locationCount":{"type":"number","example":20,"description":"Practice locations — full list on GET /v1/organizations/ein:{ein}/locations"},"locations":{"description":"Validated practice locations with geocoded addresses (largest first, max 5). The full list — including unvalidated locations — pages through GET /v1/organizations/ein:{ein}/locations.","type":"array","items":{"$ref":"#/components/schemas/OrganizationLocationDto"}},"otherNames":{"example":["Crystal Run Healthcare, LLP","Salisbury Medical Practice, P.C."],"description":"DBA and billing aliases associated with the EIN","type":"array","items":{"type":"string"}},"states":{"example":["NY","PA"],"description":"All states with practice locations. `state` is the primary — a state filter matches primary or any location, and this array shows which.","type":"array","items":{"type":"string"}},"cbsas":{"description":"CBSAs with practice locations, primary flagged","type":"array","items":{"$ref":"#/components/schemas/CbsaDto"}},"taxonomies":{"description":"NUCC taxonomy mix of the current roster (largest first, top 5 — full mix on GET /v1/organizations/ein:{ein}). When a `taxonomy` filter is applied, matching codes are always included. Facilities (ASCs) have no roster and return an empty array.","type":"array","items":{"$ref":"#/components/schemas/OrganizationTaxonomyDto"}},"matchedOn":{"type":"string","enum":["name","alias","ein","npi","fuzzy"],"description":"How the query matched: the organization name, a DBA/billing alias, an exact EIN or NPI, or fuzzy similarity. Absent when browsing without `q` (results are then ordered by primary physician count)."},"matchedName":{"type":"object","example":"Salisbury Medical Practice, P.C.","nullable":true,"description":"The DBA/billing alias that matched, when matchedOn is \"alias\""}},"required":["ein","name","specialty","state","practitionerCount","locationCount","locations","otherNames","states","cbsas","taxonomies"]},"OrganizationSpecialtyDto":{"type":"object","properties":{"name":{"type":"string","example":"Internal Medicine"},"category":{"type":"object","example":"Primary Care","nullable":true},"practitionerCount":{"type":"number","example":74},"primary":{"type":"boolean","example":true,"description":"Whether this is the organization's primary specialty"}},"required":["name","category","practitionerCount","primary"]},"OrganizationDto":{"type":"object","properties":{"ein":{"type":"string","example":"133843560","description":"EIN — address it as GET /v1/organizations/ein:{ein}"},"name":{"type":"string","example":"Crystal Run Healthcare Physicians LLP"},"specialty":{"type":"object","example":"Internal Medicine","nullable":true,"description":"Primary specialty grouper"},"state":{"type":"object","example":"NY","nullable":true,"description":"Primary state"},"practitionerCount":{"type":"number","example":711,"description":"Practitioner count (0 for facilities such as ASCs)"},"otherNames":{"description":"Alternate and DBA names","type":"array","items":{"type":"string"}},"specialties":{"description":"Specialty mix with practitioner counts, largest first","type":"array","items":{"$ref":"#/components/schemas/OrganizationSpecialtyDto"}},"taxonomies":{"description":"NUCC taxonomy mix of the current roster, largest first","type":"array","items":{"$ref":"#/components/schemas/OrganizationTaxonomyDto"}},"isMultiSpecialty":{"type":"boolean","example":true},"mdCount":{"type":"number","example":480,"description":"Physician (MD/DO) count"},"appCount":{"type":"number","example":231,"description":"Advanced-practice practitioner count"},"states":{"example":["NY","PA"],"description":"States with locations","type":"array","items":{"type":"string"}},"cbsas":{"description":"CBSAs with locations","type":"array","items":{"$ref":"#/components/schemas/CbsaDto"}},"locationCount":{"type":"number","example":20,"description":"Practice locations — page through GET /v1/organizations/ein:{ein}/locations"},"rosterCount":{"type":"number","example":716,"description":"Total current roster size — page through GET /v1/organizations/ein:{ein}/roster"}},"required":["ein","name","specialty","state","practitionerCount","otherNames","specialties","taxonomies","isMultiSpecialty","mdCount","appCount","states","cbsas","locationCount","rosterCount"]},"OrganizationNpiDto":{"type":"object","properties":{"npi":{"type":"string","example":"1952376410"},"name":{"type":"object","example":"Crystal Run Healthcare Physicians Llp","nullable":true},"taxonomies":{"description":"All NPPES taxonomies, primary first","type":"array","items":{"$ref":"#/components/schemas/TaxonomyDto"}},"address":{"description":"Practice location from the NPPES registry","allOf":[{"$ref":"#/components/schemas/AddressDto"}]},"phone":{"type":"object","example":"8455673000","nullable":true},"enumerationDate":{"type":"object","example":"2006-01-13","nullable":true,"description":"NPPES enumeration date"},"lastUpdated":{"type":"object","example":"2023-08-09","nullable":true,"description":"NPPES last update"},"city":{"type":"object","example":"Middletown","nullable":true},"state":{"type":"object","example":"NY","nullable":true}},"required":["npi","name","taxonomies","address","phone","enumerationDate","lastUpdated","city","state"]},"LocationsPageDto":{"type":"object","properties":{"total":{"type":"number","example":20,"description":"Total locations for the organization (after the validated filter)"},"locations":{"description":"Validated first, then by practitioner count","type":"array","items":{"$ref":"#/components/schemas/OrganizationLocationDto"}}},"required":["total","locations"]},"OrganizationNetworkDto":{"type":"object","properties":{"slug":{"type":"string","example":"aetna_epo","description":"Network identifier — use as network_slug in rate lookups"},"name":{"type":"string","example":"Aetna EPO"},"month":{"type":"string","example":"2026-05-01","description":"Latest data month the organization was observed in-network"},"scheduleCount":{"type":"number","example":2,"description":"Distinct fee-schedule structures the organization appears on"},"npiCount":{"type":"number","example":713,"description":"NPIs tying the organization to the network"}},"required":["slug","name","month","scheduleCount","npiCount"]},"InNetworkPayerDto":{"type":"object","properties":{"slug":{"type":"string","example":"aetna","description":"Payer identifier — use as payer_slug in rate lookups"},"name":{"type":"string","example":"Aetna"},"networks":{"description":"Networks the organization currently participates in","type":"array","items":{"$ref":"#/components/schemas/OrganizationNetworkDto"}}},"required":["slug","name","networks"]},"RosterMemberDto":{"type":"object","properties":{"npi":{"type":"string","example":"1689832941","description":"Use with GET /v1/practitioners/npi1:{npi}"},"name":{"type":"object","example":"Joseph Abrams","nullable":true},"specialty":{"type":"object","example":"Radiology","nullable":true,"description":"Specialty grouper within this organization"}},"required":["npi","name","specialty"]},"RosterPageDto":{"type":"object","properties":{"total":{"type":"number","example":716,"description":"Total current roster size"},"members":{"description":"Ordered by name","type":"array","items":{"$ref":"#/components/schemas/RosterMemberDto"}}},"required":["total","members"]},"ScheduleDiagnosticDto":{"type":"object","properties":{"npiListLength":{"type":"number","example":42,"description":"NPIs in `npiList`"},"practitionerCount":{"type":"number","example":40,"description":"Individual (NPI-1) providers in the roster, per the NPPES registry"},"organizationCount":{"type":"number","example":2,"description":"Organizational (NPI-2) providers in the roster, per the NPPES registry"},"modalPractitionerTaxonomy":{"type":"object","example":"207Q00000X","nullable":true,"description":"Most common NPI-1 primary taxonomy"},"modalPractitionerTaxonomyName":{"type":"object","example":"Family Medicine","nullable":true},"modalPractitionerState":{"type":"object","example":"OR","nullable":true,"description":"Most common NPI-1 practice state"},"modalPractitionerCbsa":{"type":"object","example":"38900","nullable":true,"description":"Most common NPI-1 practice CBSA (zip-derived)"},"modalPractitionerCbsaName":{"type":"object","example":"Portland-Vancouver-Hillsboro, OR-WA","nullable":true},"modalOrganizationTaxonomy":{"type":"object","example":"261QM1300X","nullable":true,"description":"Most common NPI-2 primary taxonomy"},"modalOrganizationTaxonomyName":{"type":"object","example":"Multi-Specialty Clinic","nullable":true},"modalOrganizationState":{"type":"object","example":"OR","nullable":true,"description":"Most common NPI-2 practice state"},"modalOrganizationCbsa":{"type":"object","example":"38900","nullable":true,"description":"Most common NPI-2 practice CBSA (zip-derived)"},"modalOrganizationCbsaName":{"type":"object","example":"Portland-Vancouver-Hillsboro, OR-WA","nullable":true},"npiList":{"example":["1003001234","1013012345"],"description":"NPIs on this fee schedule that belong to the organization (EIN-scoped roster)","type":"array","items":{"type":"string"}}},"required":["npiListLength","practitionerCount","organizationCount","modalPractitionerTaxonomy","modalPractitionerTaxonomyName","modalPractitionerState","modalPractitionerCbsa","modalPractitionerCbsaName","modalOrganizationTaxonomy","modalOrganizationTaxonomyName","modalOrganizationState","modalOrganizationCbsa","modalOrganizationCbsaName","npiList"]},"RateMetaDto":{"type":"object","properties":{"networkSlug":{"type":"string","example":"aetna_epo","description":"network_slug the headline line comes from. Without a `network` filter a request spans all of the payer’s networks, so the headline and its variations can sit on different networks."},"scheduleId":{"type":"string","example":"PM_SCHEDULE_4CX551I9URJK","description":"Fee-schedule structure the headline line comes from"},"scheduleLineId":{"type":"string","example":"PM_SLINE_99214_DMDQ4UDI0D5M","description":"Primary key of the headline rate line"},"scheduleCount":{"type":"number","example":5,"description":"Fee schedules carrying the headline price"},"npiCount":{"type":"number","example":2252,"description":"NPIs across those schedules"},"einMaxRate":{"type":"number","example":342.5,"description":"Highest rate this organization has for this row — its ceiling with the payer. Computed over comparable (dollar) lines only; percentage and per-diem values are not on the same scale."},"isEinMax":{"type":"boolean","example":false,"description":"Whether the headline rate IS the organization’s maximum"},"ratioToMax":{"type":"number","example":0.85,"description":"The rate as a fraction of `einMaxRate`. Clean fractions across an organization’s variants (0.85, 0.75) are the signature of licensure-based rate tiering. Absent for percentage and per-diem rates."},"selectionReason":{"type":"string","enum":["modal","payer-rule-maximum","none"],"description":"How the headline rate was selected: 'modal' = the price carried by the most of the organization's clinicians (ties broken by fee-schedule count, then setting specificity, then the higher rate); 'payer-rule-maximum' = this payer's fee-schedule rule selects the maximum price; 'none' = only one price was observed, no selection was needed"},"selectionNote":{"type":"string","example":"most clinicians are on this price: 2,252 of 3,004 NPIs across 5 of 8 fee schedules"},"sources":{"description":"Source MRF file URLs for the headline line","type":"array","items":{"type":"string"}}},"required":["networkSlug","scheduleId","scheduleLineId","scheduleCount","npiCount","einMaxRate","isEinMax","selectionReason","selectionNote"]},"VariationMetaDto":{"type":"object","properties":{"networkSlug":{"type":"string","example":"aetna_epo","description":"network_slug the representative line comes from"},"scheduleId":{"type":"string","example":"PM_SCHEDULE_UOU4XUWVLNDP","description":"Fee-schedule structure carrying this variant"},"scheduleLineId":{"type":"string","example":"PM_SLINE_99214_8Q1ZD44M","description":"Primary key of the representative rate line"},"scheduleCount":{"type":"number","example":1,"description":"Fee schedules carrying this variant"},"npiCount":{"type":"number","example":2,"description":"NPIs across those schedules"},"isEinMax":{"type":"boolean","example":true,"description":"Whether this variant is the organization’s maximum rate for the row"},"ratioToMax":{"type":"number","example":0.75,"description":"This variant as a fraction of the organization’s maximum (`meta.einMaxRate` on the headline rate). Absent for percentage and per-diem rates."},"drivers":{"type":"object","additionalProperties":{"type":"string"},"example":{"taxonomy":"225100000X","state":"OR"},"description":"Why this cohort differs from the headline rate, keyed by driver (taxonomy, state, practitioner, …). Absent = unattributed carve-out."},"driverNames":{"type":"object","additionalProperties":{"type":"string"},"example":{"taxonomy":"Physical Therapist"},"description":"Display names for driver values, where one exists"},"sources":{"description":"Source MRF file URLs","type":"array","items":{"type":"string"}}},"required":["networkSlug","scheduleId","scheduleLineId","scheduleCount","npiCount","isEinMax"]},"RateVariationDto":{"type":"object","properties":{"negotiatedRate":{"type":"number","example":263.18,"description":"The variant price"},"negotiatedType":{"type":"string","example":"negotiated"},"negotiationArrangement":{"type":"string","example":"ffs"},"serviceCode":{"example":["02","10","11"],"type":"array","items":{"type":"string"}},"expirationDate":{"type":"string","example":"2026-12-31"},"meta":{"description":"PriceMedic metadata: identifiers, support, drivers, provenance","allOf":[{"$ref":"#/components/schemas/VariationMetaDto"}]}},"required":["negotiatedRate","meta"]},"OrganizationRateDto":{"type":"object","properties":{"setting":{"type":"string","enum":["outpatient","inpatient","both"],"description":"Care setting this canonical was selected for. Without a `posCode` filter the API selects per setting — collapsing to 'both' when the same line wins both settings. With `posCode`, the setting the POS belongs to."},"billingCode":{"type":"string","example":"99214"},"billingCodeType":{"type":"string","example":"CPT"},"billingClass":{"type":"object","example":"professional","nullable":true},"billingCodeModifier":{"example":[],"description":"Billing-code modifiers — part of the row grain: each modifier combination is its own rate row, never a variation of the unmodified rate (empty = unmodified)","type":"array","items":{"type":"string"}},"negotiatedType":{"type":"object","example":"fee schedule","nullable":true},"negotiationArrangement":{"type":"object","example":"ffs","nullable":true},"negotiatedRate":{"type":"number","example":291.68},"serviceCode":{"example":["01","02","11","99"],"description":"Place-of-service codes as reported","type":"array","items":{"type":"string"}},"expirationDate":{"type":"object","example":"9999-12-31","nullable":true},"description":{"type":"object","example":"Office/outpatient visit est","nullable":true},"additionalInformation":{"type":"object","nullable":true},"severityOfIllness":{"type":"object","nullable":true},"bundledCodes":{"type":"array","items":{"type":"string"}},"meta":{"description":"PriceMedic metadata: identifiers, support, selection, provenance","allOf":[{"$ref":"#/components/schemas/RateMetaDto"}]},"variations":{"description":"Every other distinct rate observed for this row (same code + modifiers), as deltas against the headline line — most supported first. Present only when `includeVariations` is set, and absent then too when the headline rate is the only one.","type":"array","items":{"$ref":"#/components/schemas/RateVariationDto"}}},"required":["setting","billingCode","billingCodeType","billingClass","billingCodeModifier","negotiatedType","negotiationArrangement","negotiatedRate","serviceCode","expirationDate","meta"]},"OrganizationRatesDto":{"type":"object","properties":{"ein":{"type":"string","example":"020222140"},"name":{"type":"object","example":"Crystal Run Healthcare Physicians LLP","nullable":true,"description":"Organization name for the EIN — null when the EIN resolves to no known organization"},"rates":{"description":"Rate rows: one per billing code × modifier set (× setting)","type":"array","items":{"$ref":"#/components/schemas/OrganizationRateDto"}},"schedules":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/ScheduleDiagnosticDto"},"description":"Diagnostic: every fee schedule contributing rates for this organization, keyed by scheduleId, with the organization’s roster on it. Use it to explain discrepancies between the headline rate and its variations (which schedules were in play, and who is on them). Absent when the roster read is unavailable."},"notFound":{"type":"boolean","example":true,"description":"Present when the EIN has no schedules in scope"}},"required":["ein","name"]},"RatesResponseDto":{"type":"object","properties":{"dataMonth":{"type":"string","example":"2026-05-01","description":"Data month the schedules were read from (latest available)"},"organizations":{"description":"One entry per requested EIN, misses included","type":"array","items":{"$ref":"#/components/schemas/OrganizationRatesDto"}}},"required":["dataMonth","organizations"]},"RateCodeDto":{"type":"object","properties":{"code":{"type":"string","example":"99214","description":"Billing code"},"type":{"type":"string","example":"CPT","description":"Billing code type (CPT, HCPCS, MS-DRG, …); omit to match any"}},"required":["code"]},"RatesRequestDto":{"type":"object","properties":{"payer":{"type":"string","example":"aetna","description":"payer_slug — see GET /v1/payers"},"network":{"type":"string","example":"aetna_epo","description":"network_slug — omit for all of the payer’s networks"},"eins":{"example":["133843560","581728803"],"description":"9-digit EINs (1–100)","type":"array","items":{"type":"string"}},"codes":{"description":"Billing codes (1–500). Responses are capped at 50,000 rate lines — very large code lists across large organizations may need narrowing or the export endpoint (coming).","type":"array","items":{"$ref":"#/components/schemas/RateCodeDto"}},"billingClass":{"type":"string","enum":["professional","institutional"],"example":"professional"},"modifiers":{"example":["none","26","TC"],"description":"Billing-code modifier filter: 'none' matches unmodified lines; a modifier matches lines carrying it. Payer interpretation of modifiers varies — filter values are matched as reported.","type":"array","items":{"type":"string"}},"posCode":{"type":"string","example":"11","description":"CMS place-of-service code filter. Lines reporting the code match, and catchall/unspecified reporting (CSTM-00, CSTM-ALL, empty) matches any POS. If the code isn't reported anywhere for an organization and no catchalls exist, the API classifies the POS into a care setting (outpatient/inpatient) and returns that setting's rate — noted in the selection."},"negotiatedTypes":{"example":["negotiated","fee schedule"],"description":"negotiated_type filter (negotiated, fee schedule, derived, percentage, per diem)","type":"array","items":{"type":"string"}},"includeVariations":{"type":"boolean","example":true,"description":"Include `variations` — every other distinct rate observed for each row, as deltas against the headline line with their roster drivers. Off by default: variations are the long tail of a row and dominate the payload, so they are opt-in for callers reconciling a discrepancy rather than reading the headline rate. `meta.einMaxRate` and `meta.ratioToMax` still report the organization’s ceiling either way."}},"required":["payer","eins","codes"]},"CohortOrganizationDto":{"type":"object","properties":{"ein":{"type":"string","example":"741529484","description":"Use with GET /v1/organizations/ein:{ein}"},"name":{"type":"object","example":"Fondren Orthopedic Group L.L.P.","nullable":true},"marketPractitioners":{"type":"number","example":12,"description":"Providers this organization has on the payer’s schedules who match the requested geography and taxonomy — the evidence for its membership in the market"},"marketLocations":{"type":"number","example":3,"description":"Practice locations the organization has inside the requested market. Present when `geography` was requested. 0 is meaningful rather than disqualifying: the location rollup often carries no in-market address for an organization whose providers are demonstrably on in-market schedules, which is why membership is resolved from the rosters and not from locations."}},"required":["ein","name","marketPractitioners"]},"DistributionCohortDto":{"type":"object","properties":{"matched":{"type":"number","example":443,"description":"Organizations with a matching provider on one of the payer’s schedules — ALL of them feed the distributions (no sampling)"},"organizations":{"description":"The resolved cohort, largest organizations first — present when includeCohort=true","type":"array","items":{"$ref":"#/components/schemas/CohortOrganizationDto"}}},"required":["matched"]},"DistributionStatsDto":{"type":"object","properties":{"min":{"type":"number","example":87.38},"p25":{"type":"number","example":102.55},"median":{"type":"number","example":120.75},"p75":{"type":"number","example":152.1},"p90":{"type":"number","example":210.4},"max":{"type":"number","example":465.74}},"required":["min","p25","median","p75","p90","max"]},"RateDistributionDto":{"type":"object","properties":{"billingCode":{"type":"string","example":"99214"},"billingCodeType":{"type":"string","example":"CPT"},"setting":{"type":"string","enum":["outpatient","inpatient"],"description":"Care setting the distribution was computed for"},"organizationCount":{"type":"number","example":342,"description":"Organizations contributing a rate (one canonical rate each — EIN-weighted)"},"scheduleCount":{"type":"number","example":1874,"description":"Distinct fee schedules behind those rates"},"distribution":{"description":"Distribution across organizations (each counts once)","allOf":[{"$ref":"#/components/schemas/DistributionStatsDto"}]}},"required":["billingCode","billingCodeType","setting","organizationCount","scheduleCount","distribution"]},"RateDistributionsResponseDto":{"type":"object","properties":{"dataMonth":{"type":"string","example":"2026-05-01","description":"Data month the schedules were read from (latest available)"},"cohort":{"$ref":"#/components/schemas/DistributionCohortDto"},"rates":{"description":"One distribution per billing code × setting","type":"array","items":{"$ref":"#/components/schemas/RateDistributionDto"}}},"required":["dataMonth","cohort","rates"]},"RateDistributionsRequestDto":{"type":"object","properties":{"payer":{"type":"string","example":"aetna","description":"payer_slug — see GET /v1/payers"},"network":{"type":"string","example":"aetna_epo","description":"network_slug — omit for all of the payer’s networks"},"codes":{"description":"Billing codes (1–500). Responses are capped at 50,000 rate lines — very large code lists across large organizations may need narrowing or the export endpoint (coming).","type":"array","items":{"$ref":"#/components/schemas/RateCodeDto"}},"billingClass":{"type":"string","enum":["professional","institutional"],"example":"professional"},"modifiers":{"example":["none","26","TC"],"description":"Billing-code modifier filter: 'none' matches unmodified lines; a modifier matches lines carrying it. Payer interpretation of modifiers varies — filter values are matched as reported.","type":"array","items":{"type":"string"}},"posCode":{"type":"string","example":"11","description":"CMS place-of-service code filter. Lines reporting the code match, and catchall/unspecified reporting (CSTM-00, CSTM-ALL, empty) matches any POS. If the code isn't reported anywhere for an organization and no catchalls exist, the API classifies the POS into a care setting (outpatient/inpatient) and returns that setting's rate — noted in the selection."},"negotiatedTypes":{"example":["negotiated","fee schedule"],"description":"negotiated_type filter (negotiated, fee schedule, derived, percentage, per diem)","type":"array","items":{"type":"string"}},"includeVariations":{"type":"boolean","example":true,"description":"Include `variations` — every other distinct rate observed for each row, as deltas against the headline line with their roster drivers. Off by default: variations are the long tail of a row and dominate the payload, so they are opt-in for callers reconciling a discrepancy rather than reading the headline rate. `meta.einMaxRate` and `meta.ratioToMax` still report the organization’s ceiling either way."},"geography":{"type":"string","example":"zip:77030,25","description":"The market’s geography, matched on the practice address of the providers themselves. One of: a two-letter state (`TX` or `state:TX`), a CBSA (`cbsa:26420` — prefixed because a bare five-digit value is ambiguous between a CBSA and a ZIP), or a ZIP with an optional radius in miles (`zip:77030`, `zip:77030,50`; ZIP+4 is accepted and truncated). Radius defaults to 25 miles, max 150."},"taxonomy":{"type":"string","description":"NUCC taxonomy codes (comma-separated). Matched on the same provider as the geography, so an organization qualifies only where one clinician satisfies both.","example":"207X00000X,207XS0114X"},"minPractitioners":{"type":"number","example":10,"description":"Minimum matching providers the organization has IN THIS MARKET (not its total headcount). Off by default: solo and small practices are most of any local market, and filtering on total size removes them while leaving national systems — which are the largest organizations in the data — in place."},"includeCohort":{"type":"boolean","example":true,"description":"Include the resolved cohort (every organization behind the distributions) in the response"}},"required":["payer","codes"]}}}}