Skip to main content
Every call is a POST to one endpoint, with a bearer token:
To browse the schema or generate types, configure your GraphQL client with the endpoint and the same Authorization: Bearer <token> header used for requests. Unauthenticated requests return 401 Unauthorized.

A first call

The Sync patients guide has a small Node.js client that caches the machine token.

Metadata

Every mutation takes a metadata argument that says who is calling. Photon uses it for audit logs and support. source is one of DIRECT_API, WEB_APP, EMBEDDABLE_COMPONENT, MCP_CONNECTOR or LLM_AGENT.
Set client and requestId. When you contact support, they’re the fastest way for us to find your calls.

The result

Each mutation returns a union, so always select __typename and branch on it:
See Errors for the full checklist.

Queries

Besides the three mutations, two queries read without changing anything.

me

Who the token authenticated as, and what it can do. Use it to check a token before you start.
A machine token returns Machine, and a prescriber’s user token returns User. permissions lists its scopes.

orders

Your organization’s orders, newest first, drafts included. It needs read:order, and returns no orders without it.
orders is also the only place an order’s routablePharmacies are filled in.
ping is deprecated and will be removed after January 31, 2027. Use me instead.
Last modified on November 13, 2026