Skip to main content

Order Lifecycle

Every order in RxScale moves through a series of statuses as it progresses from creation to completion. Understanding these statuses is essential for building a reliable integration.

Status Flow

Status Descriptions

Transitions

Group-wide API keys append ?pharmacy_uid=<pharmacy uid> to every URL below. 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.".

Waiting for Pharmacy to Pending Review

When your pharmacy receives a new order (status: waiting for pharmacy), acknowledge that review has started:

Pending Review to In Progress

Once stock availability is confirmed and preparation begins, update the status to in-progress:

In Progress to Ready for Pickup (pickup only)

Once a pickup order is packed and waiting for the patient, set ready_for_pickup. The order’s delivery type identifier must be pickup.
Any other delivery type returns 400 with code delivery_type_must_be_pickup and the message Cannot set status to 'ready_for_pickup': delivery type must be 'pickup'. If the order has no delivery type, the code is delivery_type_required. Complete shipped orders from in-progress with complete_order.

Completing the Order

Call complete_order when the order is fulfilled. This step reduces stock and publishes shipment and order update events. Pickup orders are completed after ready_for_pickup. Shipped orders — every delivery type other than pickup — skip ready_for_pickup and are completed directly from in-progress. Include the tracking link when you ship:
Do not set completed through the generic status endpoint. Use complete_order so RxScale can reduce stock and emit shipment and order update events consistently.

Cancellation

An order can be cancelled before completion:

Webhook Notifications

You will receive webhook notifications for status changes and for shipment updates if you have subscribed to the pharmacy_order_updated event type. Each notification includes the full order data with the current status and data.shipments (parcels the pharmacy has recorded, including tracking URLs when available). See Webhook Events for payload details, including the shipment field reference.

Best Practices

Move orders from waiting for pharmacy to pending review as soon as your team begins reviewing them. This provides visibility to all stakeholders.
Keep the status current. Accurate status tracking helps with customer communication, reporting, and issue resolution.
Listen for pharmacy_order_updated webhooks with cancelled status. If a cancellation arrives while you are preparing an order, stop processing and update your internal systems accordingly.
Follow waiting for pharmacy to pending review to in-progress. Pickup orders then go to ready_for_pickup before complete_order. Every other delivery type skips ready_for_pickup and calls complete_order from in-progress.