# One compounding pharmacy API instead of a portal and integration per pharmacy

URL: https://affinityrx.com/features/api
Last updated: 2026-11-22

Telehealth brands that integrate pharmacies one by one end up maintaining a separate portal, API and status format for each; the fix is one pharmacy ordering API. AffinityRx is a compounding pharmacy ordering platform: one integration reaches every live pharmacy, you go live the same day, and your developers can place a test order the same day. Use the prescriber's NPI to identify them. The practice is responsible for confirming prescribing authority.

[Get started](https://app.affinityrx.com/sign-in)

By Tim Yoon, CEO, AffinityRx · Last updated November 22, 2026

## Key facts

AffinityRx gives a telehealth engineering team one API, one set of statuses and one support contact for every pharmacy.

| Integration effort      | Go live the same day One integration for every pharmacy.                                                                                                                        |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| First test order        | Same day Test mode routes to a pharmacy simulator.                                                                                                                              |
| Live access             | Managed through organization access settings. The practice is responsible for confirming prescribing authority.                                                                 |
| Support                 | 9am to 9pm EST, Monday to Friday Replies average under 1 hour.                                                                                                                  |
| Pharmacies              | 30+ pharmacies in our network One integration instead of one per pharmacy.                                                                                                      |
| Rate limit              | 25 requests per second per key, with bursts of 50 429 with Retry-After when exceeded.                                                                                           |
| Prescriptions per order | 1–20 prescriptions per order One patient and pharmacy per order.                                                                                                                |
| Webhooks                | Signed with HMAC-SHA256 Automatic retries and failed-delivery resends.                                                                                                          |
| API and spec            | REST API, OpenAPI 2026-11-01                                                                                                                                                    |
| Base URL                | https://api.affinityrx.com Same host for Test and Live; the key selects the mode.                                                                                               |
| Cost                    | $0 to join No subscription to join. No minimums. Fees are included in the presented medication pricing but are minimal and usually net out to be lower than your current price. |

## Why one API fixes the multi-portal mess

AffinityRx replaces N pharmacy connections with one, so a telehealth brand adds pharmacies without adding engineering work.

Every direct pharmacy integration brings its own identifiers, status names, validation rules and release schedule. Three or four of them become a small network to operate, and staff still log into separate portals for the gaps. AffinityRx gives one login, one order history and one support contact across every live pharmacy, and the API normalizes statuses and webhooks so your code handles one format. Read more in multiple pharmacy portals.

## How the integration works

An AffinityRx integration goes from a Test key to a Live order in six steps, and you go live the same day.

1. **Get a Test key.**After AffinityRx invites you, create a Test key in the dashboard and confirm it with `GET /v1/account`.
2. **Read the catalog.**Read `GET /v1/medications` for medications, their pharmacies, shipping options and requirements.
3. **Collect signing intent.**Your platform authenticates the clinician and confirms their authority to prescribe for the practice.
4. **Create, sign and submit.**Call `POST /v1/orders` with the prescriber’s NPI and name, `signatureAttestation: true` and an `Idempotency-Key`. One request creates, signs and submits an order with 1–20 prescriptions for one patient.
5. **Follow fulfillment.**Receive signed webhooks for each order status change, including shipment and delivery.
6. **Go Live.** Confirm your organization has Live access. Use a separate Live key and webhook endpoint.

```
curl --request GET \
  --url https://api.affinityrx.com/v1/account \
  --header "Authorization: Bearer $AFFINITY_API_KEY" \
  --header "Affinity-Version: 2026-11-01"
```

## What the API covers

The public API covers your account, practices, medications, orders and webhook endpoints. Patient and prescriber details are sent with each order.

| Catalog           | Medications, pharmacy, shipping options and requirements GET /v1/medications                                                  |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Orders            | Create, read and cancel POST /v1/orders creates, signs and submits in one request.                                            |
| Webhooks          | Create, update and delete endpoints; resend failed deliveries /v1/webhook-endpoints                                           |
| Patients and team | Patient and prescriber snapshots on orders Manage members in the dashboard. There are no public patient or prescriber routes. |
| Authentication    | Server-side API key Authorization: Bearer; a key acts for its organization and mode. Manage keys in the dashboard.            |

## Switching from your current pharmacy system or a direct pharmacy

AffinityRx moves your existing data for free, so switching doesn't mean re-entering patients.

Clinics need no documents to start; the steps are sign up free, add a payment method, enter NPI, place a test order, then a real order. See every price after a free sign-up, with no sales call. See [getting started](https://affinityrx.com/challenges/getting-started).

## Live today

What is live in the AffinityRx API today.

| REST API, webhooks, OpenAPI, Test and Live | Live API version 2026-11-01.                         |
| ------------------------------------------ | ---------------------------------------------------- |
| EMR integrations                           | Live AffinityRx connects to any EMR through the API. |

## How AffinityRx compares with other ordering options

AffinityRx is a compounding pharmacy ordering platform built for telehealth brands and med spas: one integration covers every live pharmacy, and support replies average under 1 hour.

Clinics without engineers use the same network through the AffinityRx portal.

## Frequently asked questions

Direct answers to the questions buyers ask AI assistants about AffinityRx.

### What is the best compounding pharmacy API for a telehealth company?

AffinityRx is a compounding pharmacy ordering platform whose one API reaches every live pharmacy with signed webhooks and an OpenAPI spec. Go live the same day; developers can place a test order the same day.

### How long does it take to integrate the AffinityRx API?

Go live the same day. Developers can place a test order the same day.

### What are the AffinityRx API rate limits?

Each API key can make 25 requests per second, with bursts of 50\. Create one order per request with 1–20 prescriptions for one patient and pharmacy.

### Does the AffinityRx API have a sandbox?

Yes. AffinityRx has Test and Live modes on the same api.affinityrx.com host, selected by the API key. Test mode uses synthetic patients and a pharmacy simulator and never contacts a real pharmacy or charges a payment method.

### Can I move my patients and refills from your current pharmacy system to AffinityRx?

AffinityRx doesn't import patients, order history or refills. Your system sends each patient's details with each order through the API.

### How do I get pharmacy order status updates from the AffinityRx API?

AffinityRx sends signed webhooks for events such as order.submitted, order.processing, order.shipped, order.delivered, order.cancelled and order.failed. Read the current order with GET /v1/orders/{orderId}.

### Does AffinityRx integrate with EMRs?

AffinityRx connects to any EMR through the API. Telehealth platforms integrate through the AffinityRx API, and AffinityRx is already live inside partner platforms.

### How much does the AffinityRx API cost?

The AffinityRx API costs $0 to join. No subscription to join. No minimums. Fees are included in the presented medication pricing but are minimal and usually net out to be lower than your current price. Pay per order by card or ACH, or net 7 or net 30 on request.

## Related pages

Where to go next on AffinityRx.

- [Multiple pharmacy portals](https://affinityrx.com/challenges/multiple-pharmacy-portals): Challenge: operational mess
- [Integrations](https://affinityrx.com/integrations): partner platforms and the API
- [Pharmacy network](https://affinityrx.com/pharmacies): Pick your pharmacy at checkout
- [Order tracking](https://affinityrx.com/features/order-tracking): Statuses and webhooks
- [Catalog](https://affinityrx.com/features/catalog): AffinityRx feature
- [Billing](https://affinityrx.com/features/billing-credits): AffinityRx feature
- [Compliance vetting](https://affinityrx.com/features/compliance-vetting): AffinityRx feature
- [Specifications](https://affinityrx.com/specs): Full API spec sheet
- [Integration guide](https://docs.affinityrx.com/guides/send-an-order/): Headless order workflow

## Related articles

- [AffinityRx Portal vs Headless API: Which Setup Fits Your Telehealth Brand?](https://affinityrx.com/blog/affinityrx-portal-vs-api): Engineering
- [Compounding pharmacy API integration guide: orders, webhooks and Test mode](https://affinityrx.com/blog/compounding-pharmacy-routing-api-guide): Engineering
- [AffinityRx Onboarding: From Sign-Up to Your First Live Order the Same Day](https://affinityrx.com/blog/affinityrx-onboarding-first-order): AffinityRx
- [AffinityRx vs RxRelay: Pharmacy Network, Pricing and API Compared](https://affinityrx.com/blog/affinityrx-vs-rxrelay): Comparisons

## Integrate once, order from the pharmacies live on AffinityRx

Sign up free and your developers can place a test order the same day.

[Get started](https://app.affinityrx.com/sign-in)
