Skip to main content
Partner Integrations is currently in early access and is only available to a select number of partners.
This guide is for Elation Integration Partners: third-party companies in Elation’s partner program that build a product many Elation practices connect to. It is not for Elation customers. If you are a practice building your own integration, see Core Developer instead. If you would like to enquire about joining our partner program, submit the partnership request form and choose I’m a prospective Integration Partner and want to join Partner Hub, or email partnerships@elationhealth.com. To see the partners already in the program, visit the Elation Partner Hub. This guide covers how partners let a practice connect to their product from inside Elation, without a support ticket. You build three HTTP endpoints. Elation drives the rest. At the end of a successful connection, your server holds an Elation API client_id and client_secret scoped to one practice. Elation delivers them to you in a server-to-server call that you authenticate.
Current limitations. Elation retries credential delivery only briefly, while the practice admin waits on the redirect (Retries). Elation does not notify you when a practice disconnects (After connection). Work on both is under way. Until it ships, build your callback to be fast and reliable, and treat Elation API authentication failures as a disconnect.

1. How the connection works

There are three parties: the practice admin’s browser, Elation, and you. Steps 2 to 9 are a standard OAuth 2.0 authorization code grant (RFC 6749 §4.1), with Elation as the client and you as the authorization server. The access token you issue has exactly one job: it proves to your credential callback that the delivery belongs to the account that consented. Elation does not call any other API of yours with it. Steps 10 to 12 are specific to Elation. Everything from step 8 onwards happens inside the single browser request in step 7, so the admin is waiting on your token and callback endpoints.

2. Onboarding: what you exchange with Elation

All three of your URLs must be absolute https URLs on a hostname (no IP literals, no localhost), served with a certificate from a publicly trusted CA. Register the final URL: Elation does not follow redirects on server-to-server calls, so a 301 that adds a trailing slash fails the connection.

3. Endpoint 1: Authorization (browser)

GET {authorize_url}

Request

Elation sends the admin’s browser here with these query parameters, all percent-encoded: practice_id and practice_name let your consent page show which Elation practice is being connected, and let you turn away a connection you will not accept (for example, a practice already linked to a different account) with error=access_denied before any credential exists. They are informational: they are not signed, so do not use them to decide which of your accounts receives the credential. The access token does that (Endpoint 3). Elation does not send scope, code_challenge (PKCE), nonce, or prompt. Do not require them. The access being granted is fixed at onboarding.

What you must do

  1. Reject an unknown client_id and any redirect_uri that is not an exact match for the one registered to that client. Show an error page; do not redirect to an unregistered URI.
  2. Reject a response_type other than code (redirect with error=unsupported_response_type once the redirect URI is validated).
  3. Sign the user in if needed. Preserve every original query parameter across your login flow, including state byte-for-byte.
  4. Show a consent page naming Elation and the practice-data access.
  5. On approval, issue an authorization code and redirect the browser.

Response: approved

  • Put code and state in the query string. Not the fragment, and not response_mode=form_post.
  • Return state exactly as received. Elation verifies its signature; one changed character fails the connection.
  • If your consent page submits a POST form, redirect with 302 or 303. A 307 or 308 makes the browser re-POST to Elation’s callback, which only accepts GET.
  • Percent-encode both values.

Response: denied or failed

Always include state so Elation can attribute the outcome to the right attempt. Elation records only these error values verbatim and maps anything else to unknown_error: invalid_request, unauthorized_client, access_denied, unsupported_response_type, invalid_scope, server_error, temporarily_unavailable. error_description is ignored.

Timing

The state value expires 10 minutes after the admin clicks Connect. If they take longer at your consent page, Elation rejects the redirect and they start over from Elation.

4. Endpoint 2: Token

POST {token_url}

Request

Elation authenticates with HTTP Basic (client_secret_basic). The client id and secret are never in the body.

4.1 What you must validate

  1. The Basic credentials match the client. Otherwise 401 with {"error": "invalid_client"}.
  2. grant_type is authorization_code. Otherwise 400 with {"error": "unsupported_grant_type"}.
  3. code exists, was issued to this client, has not expired, and has not been used. Otherwise 400 with {"error": "invalid_grant"}.
  4. redirect_uri equals the one the code was issued for. Otherwise 400 with {"error": "invalid_grant"}.
  5. Mark the code used atomically before responding.
Authorization codes should be single-use and short-lived. Elation redeems the code within a second or two of the redirect, so a 60-second lifetime is ample.

4.2 Client secret encoding

As RFC 6749 §2.3.1 requires, Elation form-urlencodes the client id and secret before base64-encoding client_id:client_secret. URL-decode each half after splitting on the first :. If your server compares the raw decoded values, a secret containing +, %, / or other reserved characters will not match. Issue a secret made only of unreserved characters (A-Z a-z 0-9 - . _ ~) and the two encodings are identical, so either server behavior works.

Response

  • The status must be exactly 200. A 201 fails the connection.
  • access_token must be a non-empty string. Every other field is ignored, including refresh_token.
  • The token must remain valid for at least 5 minutes. Between issuing it and presenting it at your callback, Elation mints the credential, which can take over a minute in the worst case.
  • Bind the token to the partner-side account that consented. Your credential callback uses it to decide where the credential belongs.
  • Respond within 10 seconds, including connection setup.

5. Endpoint 3: Credential callback

POST {credential_callback_url}

Request

A practice_id is only meaningful within its environment. If you integrate with more than one Elation environment, key stored credentials by (environment, practice_id). Elation may add fields. Ignore ones you do not recognize.

What you must do

  1. Authenticate the bearer token: it must be one you issued from the token endpoint and unexpired. Otherwise 401. Elation may present the same token more than once for the same request_id (see Retries), so do not consume it on a failed delivery, and answer 2xx to a repeat of a delivery you already stored.
  2. Attach the credential to the account the token belongs to. Do not use practice_id to find the account: it is informational, and the token is what proves the delivery is for that user.
  3. Store client_secret encrypted. Never log it, and never echo it in a response body.
  4. If the account already holds a credential for the same environment and practice_id, replace it. A practice that disconnects and reconnects gets a new credential; the old one has been revoked.
  5. Respond 2xx within 10 seconds. The body is ignored. Do any slow follow-up work (first sync, emails) after responding.

Retries

Elation makes up to three delivery attempts, a second or two apart, while the practice admin waits on the redirect. It retries only when your endpoint is unreachable, takes longer than 10 seconds, or answers 408, 425, 429, 500, 502, 503 or 504. Elation sets the retry timing and ignores Retry-After. Every attempt carries the same request_id, credential and bearer token. Treat request_id as an idempotency key: if you already stored that delivery, answer 2xx again. Any other status, a redirect, or a third failure is final. Elation records the connection as failed, and Elation Support has to clean up the credential before the practice can try again. Your callback is the reliability-critical endpoint in this integration. If your handler stores the credential after Elation has stopped waiting on the last attempt, you hold a credential that Elation has already recorded as failed. Elation Support revokes it during cleanup, and the practice sees the connection as failed. Store the credential and respond first; do everything else afterwards.

6. After connection

  • Using the credential. The client_id and client_secret are Elation API client credentials for the API at api_base_url. Exchange them for an access token with the client credentials grant; no username or password is needed. See Authentication and Get Token.
  • Disconnects. A practice admin or Elation Support can disconnect at any time. Elation revokes the credential. You are not notified. Treat an authentication failure from the Elation API as a disconnect and stop syncing for that practice.
  • Reconnects. After a disconnect or a declined attempt, the admin can connect again. You receive a new delivery with a new request_id and a new credential.
  • One connection per practice. Elation allows a single active connection between a practice and your product. While a connection is active, or a failed delivery is waiting on Elation Support, Elation refuses a new Connect and the existing credential is untouched.

7. What Elation records for each outcome

Practice admins see these on Elation’s status page. Use the table to reason about what your endpoints’ behavior does to the practice. DECLINED means no credential was created. DELIVERY_FAILED means a credential may exist that nobody holds, which is why it needs a person to resolve it.

Testing your integration

While you build against a sandbox practice, ask Elation to turn on debug mode for it. With debug mode on, the practice admin:
  • Can Disconnect from DELIVERY_FAILED, and from an attempt stuck connecting, not only from ACTIVE, once Elation has recorded the attempt’s credential. Elation revokes that credential, so you can reconnect without waiting for Elation Support. An attempt that failed before a credential was recorded still needs Elation Support.
  • Sees the recorded failure reason on the integration card: a short description and a status code, never your response body.
Only disconnect a stuck attempt after its callback has finished or timed out. If your callback is still running, it can still mark the connection ACTIVE, leaving you holding a credential that has already been revoked.

8. Checklist

  • Exact-match client_id and redirect_uri on the authorize request.
  • Do not require scope or PKCE.
  • Preserve state byte-for-byte through login and consent.
  • Redirect with 302 or 303, with code and state in the query string.
  • Include state on error redirects, and use standard error codes.
  • Token endpoint: Basic auth, single-use codes, redirect_uri match, 200 JSON with access_token.
  • The client secret uses only unreserved characters.
  • The access token is valid for at least 5 minutes and bound to the consenting account.
  • Callback: authenticate the bearer token, bind by token not practice_id, store the secret encrypted, never log or echo it.
  • Callback replaces an existing credential for the same environment and practice.
  • Callback treats a repeated request_id as already stored and answers 2xx; a failed delivery does not consume the bearer token.
  • Every endpoint answers within 10 seconds, with no redirects on server-to-server URLs.
  • Treat Elation API authentication failures as a disconnect.

Appendix A: Linking a practice to your card

To send a practice admin straight to your integration, for example from your own onboarding flow or an email, link to Elation’s partner integrations settings page with your partner_id as vendor_id:
The page opens scrolled to your card, where the admin clicks Connect. Your partner_id is the identifier Elation assigns at onboarding; ask Elation if you do not have it. It is case-sensitive.
  • The link only scrolls. It does not start a connection: the admin still clicks Connect and confirms the access shown in the Connect dialog.
  • If the practice cannot see your card, for example because your integration is not yet available to it, the page opens at the top with no error.

Change history