Skip to main content

Pharmacy Integration Guide

This guide walks you through the steps to integrate your pharmacy or pharmacy management system with RxScale, from receiving your API key to processing your first order.

Step 1: Get Your API Key

Contact your RxScale account manager to receive your API credentials. You will get:
  • An API key for authentication
  • A pharmacy UID (or group-level access if you manage multiple pharmacies)
  • Access to the development environment for testing
EnvironmentBase URL
Developmenthttps://api.rxscale-dev.com
Productionhttps://api.rxscale.com
Test your key with a health check:
curl -X GET "https://api.rxscale-dev.com/v1/external-pharmacy-api-v1/health/" \
  -H "X-API-Key: your-api-key-here"

Step 2: Sync Your SKUs

Retrieve your pharmacy’s SKU catalog and sync it with your internal product system.
curl -X GET "https://api.rxscale.com/v1/external-pharmacy-api-v1/pharmacy_skus/" \
  -H "X-API-Key: your-api-key-here"
For each SKU, you can:
  • Set your price (in euro cents)
  • Update stock levels to reflect your current inventory
  • Link an external ID from your pharmacy management system
curl -X PATCH "https://api.rxscale.com/v1/external-pharmacy-api-v1/pharmacy_skus/psku-abc123" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "price": 1299,
    "stock": 100,
    "external_id": "YOUR-PMS-ID-001"
  }'
See Pharmacy SKUs for full documentation.

Step 3: Register Webhooks

Set up webhooks so your system receives real-time notifications when new orders come in or stock levels change.
curl -X POST "https://api.rxscale.com/v1/external-pharmacy-api-v1/webhooks/" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "target": "https://your-pharmacy.com/webhooks/rxscale",
    "notification_type": "pharmacy_order_created"
  }'
Store the signing_secret returned in the response. You will need it to verify webhook signatures. It is only shown once.
We recommend subscribing to these event types:
Event TypeWhy
pharmacy_order_createdGet notified immediately when a new order is assigned to your pharmacy
pharmacy_order_updatedTrack status changes (e.g. cancellations)
pharmacy_sku_stock_updatedStay in sync if stock is adjusted externally
See Webhook Security for how to verify webhook signatures.

Step 4: Process Orders

When you receive a pharmacy_order_created webhook (or poll the orders endpoint), process the order through your pharmacy workflow:

4a. View Order Details

curl -X GET "https://api.rxscale.com/v1/external-pharmacy-api-v1/pharmacy_orders/po-abc123" \
  -H "X-API-Key: your-api-key-here"
This returns the full order including patient data, doctor data, prescription files, and line items.

4b. Update Order Status

As you process the order, update its status:
curl -X PATCH "https://api.rxscale.com/v1/external-pharmacy-api-v1/pharmacy_orders/po-abc123/status" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"status": "processing"}'
And when shipped:
curl -X PATCH "https://api.rxscale.com/v1/external-pharmacy-api-v1/pharmacy_orders/po-abc123/status" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"status": "shipped"}'
See Order Lifecycle for the full status flow.

Integration Checklist

  • Received API key from RxScale
  • Verified connectivity with health check endpoint
  • Tested on development environment before production
  • Fetched full SKU catalog
  • Mapped external IDs to your pharmacy management system
  • Set initial prices and stock levels
  • Scheduled regular stock sync (or use webhooks)
  • Registered webhooks for pharmacy_order_created and pharmacy_order_updated
  • Stored signing secrets securely
  • Implemented signature verification
  • Endpoint responds with 2xx within 5 seconds
  • Handling incoming orders (via webhook or polling)
  • Updating order status as you process, ship, and complete orders
  • Handling edge cases (cancellations, stock issues)