Look up a prescriber or pharmacy in the Surescripts directory to validate routing addresses before transmitting an NCPDP SCRIPT message

domain: surescripts.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Use the Surescripts Directory Service API; send a DirectoryLookup request with the provider NPI or pharmacy NCPDP provider ID (NPI) to retrieve their Surescripts Provider Identifier (SPI)
  2. Confirm the routing record includes ServiceLevel (indicating which SCRIPT transactions the endpoint supports, e.g., NewRx, CancelRx, RxFill), and MailboxID for message delivery
  3. For pharmacy lookups, validate the pharmacy's NCPDP pharmacy NPI and confirm it is listed as 'Active' and enabled for the transaction type you intend to send
  4. Cache directory results with a TTL aligned to Surescripts guidance (check current documentation; directory data changes frequently during provider onboarding and address changes)
  5. Re-query the directory in real time for new patient encounters or when a prior message to that SPI returned a routing error
  6. For prescriber searches, also cross-reference the NPI Registry (nppes.cms.hhs.gov) to confirm the NPI is active and taxonomy code matches expected provider type

Known gotchas

Related routes

Transmit an NCPDP SCRIPT 2017071 NewRx e-prescription from an EHR to a Surescripts-connected pharmacy
ncpdp.org · 6 steps · unrated
Implement an NCPDP SCRIPT 2017071 RxFill transaction flow to receive dispense status confirmations back at the prescriber's EHR from the pharmacy
ncpdp.org · 6 steps · unrated
Integrate NCPDP SCRIPT NewRx e-prescribing into an EHR workflow, transmitting a structured electronic prescription to a pharmacy and handling the RxFill status update response
ncpdp.org · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans