Skip to main content

Prescriptions

Retrieve prescription information including doctor data and status.

Get Prescription Details

string
required
The prescription UID
Required permission: prescription:read

Example Request

Response

Response Fields

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 becomes available as prescription.file.
  2. POST /v1/management/prescriptions/{prescription_uid}/external-sign – once the PDF is available, mark the prescription as EXTERNALLY_SIGNED, copy the PDF into the signed bucket, and dispatch 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.

Render Prescription PDF

string
required
The prescription UID
Required permission: prescription:external_sign Triggers asynchronous rendering of the unsigned prescription PDF. The endpoint publishes a prescription.render event and returns 202 Accepted. Poll GET /v1/management/prescriptions/{prescription_uid} (or wait for a webhook) until file is populated before calling external-sign.

Example Request

Response (202 Accepted)

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, and the rendered file is present.
  2. Copies the PDF from the unsigned bucket to the signed-prescription bucket.
  3. Updates the prescription status to EXTERNALLY_SIGNED and writes a PrescriptionLog entry attributed to the calling API key.
  4. Publishes a pharmacy_manager.send_prescription event so the prescription is dispatched to the pharmacy.

Example Request

Response (200 OK)

Error Responses