What the key determines
Your key is bound to a single group. That binding decides:- Which pharmacies you can act for. Naming an NPI outside your group is rejected.
- Which environment you’re in. Keys don’t cross between sandbox and production.
GET /api/v1/pharmacies/search. It takes no
parameters and returns the group’s pharmacies.
Failure responses
401 — missing or invalid key
401 — missing or invalid key
403 — key not permitted here
403 — key not permitted here
Most often the pharmacy NPI you named isn’t in your group.It also covers a key that is well-formed but belongs to no group at all. That distinction
started to matter in the 1 September release:
GET /api/v1/ndc-transaction-statistic
previously accepted any value shaped like a GUID, because the endpoint has no pharmacy to
scope the key against and so never resolved it. It now resolves the key and returns 403
when nothing owns it. A real key is unaffected; a placeholder that appeared to work will
stop.400 — when it's really an auth problem
400 — when it's really an auth problem
Request validation runs before authentication. A request that is both malformed and
unauthenticated returns Fix the body first. If a well-formed request then returns
400 with field-level validation errors, not 401:401, the problem is the key.Rotating a key
Sandbox: the owner of your organization presses Regenerate on the API keys tab of the sandbox Home page. The old key stops working within 60 seconds, so tell your teammates first. See Sandbox onboarding. Production: email us at the address on Production access. If you believe a key has been exposed, say so in the subject line and we’ll prioritise it.v1 has no key-scoping — a key can do everything the API offers for every pharmacy in its
group. Scoped keys, which restrict a credential to specific operations, arrive with v2.