Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.rxscale.com/llms.txt

Use this file to discover all available pages before exploring further.

Pharmacy Orders

Manage pharmacy orders — view incoming prescription orders and update their status as you process them.

List Orders

page
integer
default:"0"
Page number (0-indexed)
limit
integer
default:"50"
Number of items per page (max 200)
status
string
Filter by status (e.g., waiting for pharmacy, in-progress, completed)
Search orders by pharmacy order name (e.g. PO-MPEW-HIQ7-RNSG, substring match), patient name (substring match), or pharmacy order UID (exact match)
pharmacy_uid
string
Required for group-wide API keys
GET /v1/external-pharmacy-api-v1/pharmacy_orders/

Response

{
  "data": [
    {
      "uid": "po-abc123",
      "status": "waiting for pharmacy",
      "name": "#1001",
      "external_status": "OPEN",
      "pharmacy": {
        "uid": "ph-xyz",
        "display_name": "City Pharmacy"
      },
      "order": {
        "uid": "ord-123",
        "delivery_address": { ... },
        "invoice_address": { ... }
      },
      "order_items": [
        {
          "uid": "oi-789",
          "amount": 1,
          "sku": {
            "uid": "sku-456",
            "display_name": "Medication X 100mg",
            "pzn": "12345678"
          },
          "total_paid_amount": 1299
        }
      ]
    }
  ],
  "totalRegistries": 42,
  "totalPages": 1
}

Get Order Details

GET /v1/external-pharmacy-api-v1/pharmacy_orders/{pharmacy_order_uid}
Returns the full order including patient data, doctor data, and prescription file (if available).

Response (additional fields)

{
  "uid": "po-abc123",
  "patient_data": {
    "uid": "pat-123",
    "display_name": "Max Mustermann",
    "email": "max@example.com",
    "date_of_birth": "1990-01-15"
  },
  "doctor_data": {
    "uid": "doc-456",
    "display_name": "Dr. Schmidt"
  },
  "prescription_file": {
    "filename": "prescription_001.pdf",
    "content_base64": "JVBERi0xLjQK..."
  },
  "prepaid": 1
}

Update Order Status

PATCH /v1/external-pharmacy-api-v1/pharmacy_orders/{pharmacy_order_uid}/status

Request Body

{
  "status": "in-progress"
}

Allowed Status Values

StatusDescription
waiting for pharmacyOrder is in your queue, waiting to be processed
pending reviewOrder is being reviewed
in-progressOrder is being prepared
ready_for_pickupOrder is packed and ready for pickup or shipping
cancelledOrder was cancelled
Do not set completed through this endpoint. Use the dedicated complete order endpoint below so RxScale can finalize the order, reduce stock, and publish the related events.

Complete Order

PATCH /v1/external-pharmacy-api-v1/pharmacy_orders/{pharmacy_order_uid}/complete_order
Completes the pharmacy order, reduces stock for the pharmacy SKUs on the order, and publishes order update notifications. Requires the orders_write permission.
pharmacy_uid
string
Required for group-wide API keys

Request Body

{
  "tracking_links": [
    {
      "tracking_link": "https://tracking.example.com/parcel/123",
      "carrier": "DHL"
    }
  ]
}
tracking_links is optional. If provided, the first tracking link is forwarded with the shipment update.
curl -X PATCH "https://api.rxscale.com/v1/external-pharmacy-api-v1/pharmacy_orders/po-abc123/complete_order" \
  -H "X-API-Key: your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "tracking_links": [
      {
        "tracking_link": "https://tracking.example.com/parcel/123",
        "carrier": "DHL"
      }
    ]
  }'

Response

{
  "uid": "po-abc123",
  "status": "completed",
  "name": "#1001",
  "external_status": "OPEN",
  "order_items": [
    {
      "uid": "oi-789",
      "amount": 1,
      "sku": {
        "uid": "sku-456",
        "display_name": "Medication X 100mg",
        "pzn": "12345678"
      }
    }
  ]
}