Skip to main content

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

integer
default:"0"
Page number (0-indexed)
integer
default:"50"
Number of orders per page
integer
Filter orders created at or after this Unix timestamp
integer
Filter orders created at or before this Unix timestamp
integer
Filter orders updated at or after this Unix timestamp
integer
Filter orders updated at or before this Unix timestamp
string
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.
string
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.
Required permission: order:read

Example Request

Look Up a Specific Shop Order

Combine shop_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

string
required
The order UID
Required permission: 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 the prescription:read permission. Without it:
  • The prescriptions array is returned as []
  • The prescription_uid field 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

string
required
The order UID
The order must be in status completed or cancelled. Any other status returns 400 Bad Request without publishing an event.

Example request

No request body is required.

Example response (202 Accepted)

Route pharmacy order split payment

string
required
The pharmacy order UID
The pharmacy order must be completed, and its parent order must not be cancelled. Otherwise the API returns 400 Bad Request without publishing an event.

Example request

No request body is required.

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 under pharmacy_orders in the order responses above. A pharmacy order carries two different status fields:

Refetch the Status from the Pharmacy

string
required
The pharmacy order UID
Required permission: 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

string
required
The pharmacy order UID
string
required
The raw pharmacy status string, at most 255 characters. Send an empty string (or null) to clear it.
Required permission: pharmacy_order:write Records the pharmacy-side status yourself, which is useful when RxScale has no direct connection to the pharmacy’s system.
This only records the string. It never moves the pharmacy order’s own status and never triggers webhooks. To complete or cancel a pharmacy order, use the appropriate pharmacy-facing endpoint instead.
For pharmacies that RxScale polls directly, a later automatic status check can overwrite a value you set here.
A cleared external_status is returned as null.

Example Request

Example Response

Errors