Trace340B

Developer documentation

developer.traceapps.aiv1

Provider Relationship Directory API

Read-only REST endpoints for vendor data administrators. Bearer API keys (prefix dir_) are issued by a programs manager and scoped to their program.

OpenAPI 3.1 spec

Getting started
  1. Request a vendor invitation from a programs manager, or redeem an invite link sent to your email.
  2. After onboarding, copy the one-time API key — it cannot be retrieved later.
  3. Use check-status for 340B eligibility lookups; use the profile and relationship routes for richer context.
  4. All responses respect visibility tiers: API key consumers only see profiles and contacts marked api_public.
Try it
Send a live request against this deployment. Keys stay in your browser session only — they are never stored on our servers from this form.
GET /api/v1/directory/providers/1999999999/check-status

Endpoints

GET/api/v1/directory/providers/{npi}/check-statusRecommended
Check affiliation status
Primary vendor endpoint. Returns whether the NPI is actively affiliated with the program that issued your Bearer key. Unknown NPIs return affiliated=false with HTTP 200. Profiles at private visibility return 404 to API key consumers.

Authentication

Authorization: Bearer dir_…

Scope

directory:read

  • Scoped to managed_by_org_id on the API key (or the session caller's active org).
  • Active affiliation blocks (submitted or acknowledged) set affiliated=false.
  • When multiple practice sites exist under the same program, the primary affiliation wins.

Example response

{
  "version": "v1",
  "npi": "1999999999",
  "affiliated": true,
  "affiliatedType": "affiliate",
  "effectiveDate": "2024-01-15"
}

Response fields

FieldTypeDescription
versionstringAPI version label (v1).
npistringNormalized 10-digit NPI from the path.
affiliatedbooleanTrue when the provider has an active, unblocked affiliation with a practice site owned by the caller's program.
affiliatedTypestring | nullRelationship type when affiliated (primary, secondary, dedicated, affiliate, temporary, historical); null otherwise.
effectiveDatestring | nullISO date when the affiliation became effective; null when not affiliated.

cURL

curl -H "Authorization: Bearer dir_YOUR_KEY" \
  https://developer.traceapps.ai/api/v1/directory/providers/1999999999/check-status

Status codes

  • 200Status payload (including unknown NPI with affiliated=false).
  • 400Invalid NPI format.
  • 401Missing or revoked Bearer key.
  • 404Profile exists but is not visible to the caller.