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
Test your key with a health check:

Step 2: Sync Your SKUs

Retrieve your pharmacy’s SKU catalog and sync it with your internal product system.
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
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.
Store the webhook_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: 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:
Group-wide API keys append ?pharmacy_uid=<pharmacy uid> to every order URL in this step. A key tied to a single pharmacy leaves the parameter off.
Omitting pharmacy_uid on a group-wide key returns 400:
A pharmacy_uid outside the key’s pharmacy group also returns 400, with "Pharmacy not found in the API key's pharmacy group.".

4a. View Order Details

This returns the full order including patient data, doctor data, prescription files, and line items. doctor_data and prescription_file are null for over-the-counter (OTC) orders that have no prescription attached.

4b. Update Order Status

As you process the order, update its status:
When a pickup order (delivery_type identifier pickup) is packed and waiting for the patient, set ready_for_pickup:
ready_for_pickup is for pickup orders only. Any other delivery type returns 400 with code delivery_type_must_be_pickup. If the order has no delivery type, the code is delivery_type_required.
Shipped orders skip ready_for_pickup. Complete them directly from in-progress and include the tracking link, so RxScale can reduce stock and publish shipment and order update events:
Pickup orders use the same complete_order endpoint after ready_for_pickup. tracking_links is optional. 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 and ship orders
  • Completing orders through the dedicated complete_order endpoint
  • Handling edge cases (cancellations, stock issues)