Skip to main content

Prescriptions

Retrieve prescription information including doctor data and status, and see how many of your prescriptions are in each status.

Get Prescription Details

string
required
The prescription UID
Required permission: prescription:read

Example Request

Response

Response Fields

Error Responses

Get Prescription Statistics

Required permission: prescription:read Returns how many of your organisation’s prescriptions are currently in each status — for example how many are still waiting for a doctor, how many were approved or declined, and how many are signed. Every prescription that belongs to one of your orders is counted once, with its current status. These are the same prescriptions you can retrieve with GET /v1/management/prescriptions/{prescription_uid}. Deleted prescriptions are not counted. The counts reflect the moment of the request; there is no date filter.

Example Request

Response

Response Fields

Prescriptions that still need a doctor’s decision are counted under waiting for doctor and ON_HOLD. approved prescriptions have a decision but are not signed yet. Signed prescriptions are split across signed, NON_QES_SIGNED, and EXTERNALLY_SIGNED. See Prescription Statuses for what each status means.

Error Responses

Externally Signed Prescriptions

Prescriptions whose items were created with _skip_validation (or _rxscale_skip_validation) on the Shopify line item, on that item’s line item group (for bundles), or in the order-level additional details — i.e. items without an attached anamnesis — can be signed outside the rxscale platform and then registered for fulfilment via the Management API. When more than one level is present, RxScale resolves the setting with a three-level fallback: the line item’s own value wins first, then the value on its line item group, then the order-level value. The flow consists of two API calls:
  1. POST /v1/management/prescriptions/{prescription_uid}/render – asks rxscale to render the unsigned prescription PDF. The endpoint returns immediately; the PDF is produced asynchronously, and rendered becomes true in the prescription details once it is available.
  2. POST /v1/management/prescriptions/{prescription_uid}/external-sign – once the PDF is available, mark the prescription as EXTERNALLY_SIGNED and send it to the pharmacy.
Both endpoints require the prescription:external_sign permission.
Only prescriptions where every item lacks an anamnesis_uid can be externally signed. Mixed prescriptions are rejected with 409 Conflict. You can check this beforehand with lines[].anamnesis_uid in the prescription details.

Render Prescription PDF

string
required
The prescription UID
Required permission: prescription:external_sign Requests rendering of the unsigned prescription PDF and returns 202 Accepted right away; the PDF is produced asynchronously. Poll GET /v1/management/prescriptions/{prescription_uid} until rendered is true before calling external-sign. Prescriptions that are already signed cannot be rendered again.

Example Request

Response (202 Accepted)

Response Fields

Error Responses

External-Sign Prescription

string
required
The prescription UID
Required permission: prescription:external_sign Marks an already-rendered prescription as EXTERNALLY_SIGNED. The endpoint:
  1. Verifies the prescription is in waiting for doctor status, all items lack an anamnesis (lines[].anamnesis_uid is null), and a rendered PDF is available (rendered is true).
  2. Stores the rendered PDF as the signed prescription.
  3. Sets the prescription status to EXTERNALLY_SIGNED and records the change in the prescription’s history, attributed to your API key.
  4. Sends the prescription to the pharmacy.

Example Request

Response (200 OK)

Response Fields

Error Responses