NPI Data Services logo NPI Registry API
RCM & Billing Guide

Medicare Enrollment Verification — Check PECOS Status Before Claims

Updated June 9, 2026 · VBC Risk Analytics

Medicare claims for services provided by unenrolled providers are denied at adjudication — not flagged for review, but denied outright. For RCM teams and billing platforms, discovering an enrollment gap after claim submission means rework, appeals, and delayed payment. The NPI Registry API returns Medicare PECOS enrollment status — including the in_pecos flag, enrollment ID, PAC ID, and Medicare provider type — in every provider lookup, making pre-submission enrollment verification a straightforward API call rather than a manual PECOS portal check.

Why Medicare enrollment matters for billing

CMS requires all providers billing Medicare to be actively enrolled in PECOS. Enrollment is specific to the provider, the Medicare Administrative Contractor (MAC) jurisdiction, and the enrollment type (Part A, Part B, DMEPOS, etc.). A provider may have an active NPI but no active PECOS enrollment — and their Medicare claims will be denied.

Common enrollment scenarios that cause claim denials:

Medicare enrollment fields returned by the API

FieldAPI pathWhat it tells you
PECOS enrolled? entity_type[0].in_pecos "Y" = active Medicare enrollment; "N" = no active enrollment found
Enrollment ID medicare_enrlmt[0].enrlmt_id Unique PECOS enrollment record identifier — use for payer enrollment audits
PAC ID medicare_enrlmt[0].pac_id Provider Associate-level Control ID — links provider across multiple enrollments
Medicare provider type medicare_enrlmt[0].provider_type_dec Billing type (e.g., "Part B — Physician", "Part A — Home Health Agency") — determines CMS program eligibility
Enrollment state medicare_enrlmt[0].state_cd State of the enrollment record — relevant for multi-state billing
OIG excluded? entity_type[0].in_leie "Y" = on OIG exclusion list — billing is prohibited regardless of enrollment status

Pre-submission enrollment verification (Python)

Call this before submitting a Medicare claim to confirm the billing provider is enrolled and not excluded:

import requests

API_KEY  = "YOUR_API_KEY"
BASE_URL = "https://restapi.npidataservices.com/api/v1/findbyNPIId"

def verify_medicare_billing(npi):
    """Returns a billing eligibility result for the given NPI."""
    r = requests.get(BASE_URL,
                     params={"NPIId": npi},
                     headers={"ApiKey": API_KEY},
                     timeout=5)

    if r.status_code == 404:
        return {
            "npi": npi, "eligible": False,
            "reason": "NPI not found in registry — cannot bill Medicare"
        }

    r.raise_for_status()
    d = r.json()

    entity = (d.get("entity_type")     or [{}])[0]
    enrlmt = (d.get("medicare_enrlmt") or [{}])[0]

    in_leie = entity.get("in_leie") == "Y"
    in_pecos = entity.get("in_pecos") == "Y"

    if in_leie:
        return {
            "npi": npi, "eligible": False,
            "reason": "Provider is on OIG LEIE exclusion list — billing prohibited"
        }

    if not in_pecos:
        return {
            "npi": npi, "eligible": False,
            "reason": "No active PECOS enrollment found — claim will be denied"
        }

    return {
        "npi":           npi,
        "eligible":      True,
        "enrlmt_id":     enrlmt.get("enrlmt_id", ""),
        "pac_id":        enrlmt.get("pac_id", ""),
        "provider_type": enrlmt.get("provider_type_dec", ""),
        "state":         enrlmt.get("state_cd", ""),
    }

# Check before claim submission
result = verify_medicare_billing("1053500652")
if not result["eligible"]:
    print(f"BLOCKED: {result['reason']}")
else:
    print(f"ELIGIBLE: enrlmt_id={result['enrlmt_id']}, type={result['provider_type']}")

Enrollment verification flow

Billing NPI findbyNPIId in_leie + in_pecos Submit claim or Block + alert

Pre-submission check completes in < 500ms. Prevents denials before they reach the MAC.

Batch enrollment validation for RCM teams

For monthly roster validation or pre-billing batch checks, run all billing providers through a batch verification loop:

import time, csv

# Your billing provider NPI list
billing_providers = ["1053500652", "1184713042", "1023374782"]
results = []

for npi in billing_providers:
    result = verify_medicare_billing(npi)
    results.append(result)
    if not result["eligible"]:
        print(f"ALERT — NPI {npi}: {result['reason']}")
    time.sleep(0.1)

ineligible = [r for r in results if not r["eligible"]]
print(f"\n{len(ineligible)} of {len(results)} providers require enrollment review.")

with open("enrollment_verification.csv", "w", newline="") as f:
    writer = csv.DictWriter(f, fieldnames=results[0].keys())
    writer.writeheader()
    writer.writerows(results)

Multiple enrollment records and multi-state billing

A provider may have multiple PECOS enrollment records — one per MAC jurisdiction, provider type, or practice location. The medicare_enrlmt array in the API response can contain multiple entries. For multi-state billing validation, check whether an enrollment record exists for the relevant state:

def has_enrollment_in_state(npi, state):
    r = requests.get(BASE_URL,
                     params={"NPIId": npi},
                     headers={"ApiKey": API_KEY},
                     timeout=5)
    r.raise_for_status()
    d = r.json()
    enrollments = d.get("medicare_enrlmt") or []
    return any(e.get("state_cd") == state for e in enrollments)

# Check if the provider has a California enrollment record
enrolled_in_ca = has_enrollment_in_state("1053500652", "CA")
print(f"Enrolled in CA: {enrolled_in_ca}")

Related guides

Need to verify Medicare enrollment before billing?

The NPI Registry API returns PECOS enrollment status, enrollment ID, PAC ID, and provider type in every lookup — the complete pre-submission enrollment check in a single REST call. Start a free trial to test against your billing provider list.

Explore the API & start a free trial →

Frequently asked questions

What is Medicare enrollment verification?
Confirming that a provider is actively enrolled in Medicare PECOS before billing. Unenrolled providers' claims are denied at adjudication. The API returns the in_pecos flag, enrollment ID, PAC ID, and Medicare provider type in every lookup.

What does in_pecos mean?
in_pecos: "Y" indicates an active Medicare enrollment record in PECOS. "N" indicates no active enrollment. The field is returned in every findbyNPIId response alongside the NPI and taxonomy data.

Why do Medicare claims get rejected for unenrolled providers?
CMS requires PECOS enrollment for all Medicare billing. Unenrolled provider claims are denied outright (not flagged for review). Pre-claim verification prevents denials and eliminates the cost of rework and appeals.

How do I verify Medicare enrollment for a large provider roster?
Batch-query findbyNPIId for each provider at 100ms pacing. At that rate, 5,000 providers complete in ~8 minutes. The Starter plan (12,500 req/month) covers monthly verification for most networks. See NPI Bulk Lookup API for quota planning.

Written by Chin Ramamoorthi

CEO, NPI Data Services — a VBC Risk Analytics company — 20+ years in healthcare data, provider data management, and risk analytics.