Orders
Retrieve order information including items, fulfillment orders, and shop data.This page covers reading order data. If your organisation sells through a channel other than
Shopify and needs to push orders into RxScale, see Order Intake.
List Orders
Filter by the shop’s identifier (the string you configured when the shop
was set up). Only orders whose linked shop belongs to your organisation
and has this identifier are returned.
Filter by the external order id assigned by the shop or e-commerce
platform (for example, the Shopify order number). Combine with
shop_identifier to look up a specific shop order.Free-text search across the shop order name (a Shopify name such as
#1001,
or a storefront order number such as RXS-1001), the pharmacy order name
(e.g. PO-XXXX-XXXX-XXXX), and the patient’s full name. The same value
is also matched as an exact UID against the order, its prescriptions,
and its pharmacy orders, so you can paste an identifier directly. A
leading # is stripped before the UID lookup so values copied from the
admin interface (e.g. #ord_…) resolve as expected.order:read
Example Request
Look Up a Specific Shop Order
Combineshop_identifier and shop_order_external_id to fetch the single
order that matches both. The response shape is unchanged (a paginated
list), but the result contains at most one order.
Response
Response Fields
Get Order Details
order:read
Returns the same structure as a single entry in the list response.
Example Request
Prescription Data
Prescription data is only included when your API key also has theprescription:read permission. Without it:
- The
prescriptionsarray is returned as[] - The
prescription_uidfield is removed from order items
If you need prescription details, ensure your API key has both
order:read and prescription:read permissions. Contact your RxScale account manager to adjust permissions.Split payment routing
Enqueue on-demand split-payment routing for a completed or cancelled order, or for an individual completed pharmacy order. These endpoints only accept the request and publish an event; money movement runs asynchronously in the split-payment handler. Routing can take about a minute to finish. Sending the same POST again enqueues another routing run (the handler remains additive and idempotent). Required permission:split_payment:route (not implied by order:write)
Route order split payment
completed or cancelled. Any other status returns 400 Bad Request without publishing an event.
Example request
Example response (202 Accepted)
Route pharmacy order split payment
completed, and its parent order must not be cancelled. Otherwise the API returns 400 Bad Request without publishing an event.
Example request
Example response (202 Accepted)
Errors
Pharmacy Orders
Each order can have one or more pharmacy orders — the part of the order that a specific pharmacy fulfills. They appear underpharmacy_orders in the order
responses above.
A pharmacy order carries two different status fields:
Refetch the Status from the Pharmacy
pharmacy_order:write
Asks RxScale to check this pharmacy order’s status at the pharmacy right away,
instead of waiting for the next scheduled check.
The check runs asynchronously. This endpoint queues it and responds immediately
with 202 Accepted and the pharmacy order as it stands before the check runs
— so the external_status in the response is the old value, not the refetched
one. When the pharmacy answers, external_status is updated, and if the
pharmacy reports the order as shipped, completed or cancelled, the pharmacy
order transitions and the usual webhooks fire.
To observe the result, either poll GET /v1/management/orders/{order_uid} or
subscribe to the pharmacy order webhooks.
Example Request
Example Response
Errors
Set the External Status
The raw pharmacy status string, at most 255 characters. Send an empty string
(or
null) to clear it.pharmacy_order:write
Records the pharmacy-side status yourself, which is useful when RxScale has no
direct connection to the pharmacy’s system.
For pharmacies that RxScale polls directly, a later automatic status check can
overwrite a value you set here.
external_status is returned as null.