Webhook Events
RxScale sends webhooks for the following event types:| Event Type | Description |
|---|---|
pharmacy_order_created | A new pharmacy order was created and assigned to your pharmacy |
pharmacy_order_updated | An existing pharmacy order’s status changed |
pharmacy_sku_stock_updated | A pharmacy SKU’s stock level changed |
HTTP Headers
Every webhook request includes the following HTTP headers:| Header | Description |
|---|---|
Content-Type | Always application/json |
X-Webhook-Event | The event type (e.g. pharmacy_order_created) |
X-Webhook-Signature | HMAC-SHA256 signature of the request body (see Security) |
pharmacy_order_created
Sent when a new pharmacy order is created and assigned to your pharmacy. Possiblestatus values: init, waiting for pharmacy, pending review, in-progress, ready_for_pickup, completed
Payload Example
Field Reference
| Field | Type | Description |
|---|---|---|
data.uid | string | Pharmacy order UID |
data.status | string | Current order status |
data.name | string or null | Human-readable order name (e.g. #1001) |
data.data | object | Custom data attached to the order |
data.external_status | string | External status identifier |
data.created_at | integer | Unix timestamp of creation |
data.updated_at | integer | Unix timestamp of last update |
data.deleted_at | integer or null | Unix timestamp of soft-deletion, or null |
data.pharmacy | object | Pharmacy summary with uid and display_name |
data.order | object | Parent order with uid, delivery_address, and invoice_address |
data.delivery_type | object or null | Delivery type with uid, display_name, and identifier |
data.order_items | array | Items in the order |
data.order_items[].sku | object | SKU info including pzn, product_uid, product_display_name, product_handle |
data.order_items[].pharmacy_sku | object or null | Pharmacy-specific SKU data with uid, external_id, price (cents), stock |
data.patient_data | object or null | Patient info with uid, display_name, email, date_of_birth, phone_number |
data.doctor_data | object or null | Doctor who signed the prescription, with uid and display_name |
data.prescription_file | object or null | Signed prescription PDF with filename and content_base64 |
pharmacy_order_updated
Sent when an existing pharmacy order’s status changes. The payload structure is identical topharmacy_order_created. The status field reflects the new status.
Payload Example
Organisation-Level Webhooks
When the webhook subscription was created via the Management API (organisation-level), order events include an additionalfulfillment object:
| Field | Type | Description |
|---|---|---|
data.fulfillment.uid | string | Fulfillment order UID |
data.fulfillment.external_id | string or null | External identifier for the fulfillment order |
data.fulfillment.order.uid | string | Parent order UID |
data.fulfillment.order.shop_order.uid | string | Shop order UID |
data.fulfillment.order.shop_order.external_id | string or null | External shop order identifier |
The
fulfillment field is only present in organisation-level webhook deliveries. Pharmacy-level webhooks do not include this field.pharmacy_sku_stock_updated
Sent when a pharmacy SKU’s stock level changes.Payload Example
Field Reference
| Field | Type | Description |
|---|---|---|
data.uid | string | Pharmacy SKU UID |
data.pharmacy_uid | string | Pharmacy UID |
data.sku_uid | string | SKU UID |
data.external_id | string or null | External identifier in your own system |
data.price | integer | Price in cents |
data.stock | integer | Current stock level |
data.markup | integer | Markup value |
data.priority | integer | Priority level |
data.type | string | Pharmacy SKU type |
data.created_at | integer | Unix timestamp of creation |
data.updated_at | integer | Unix timestamp of last update |
data.deleted_at | integer or null | Unix timestamp of soft-deletion, or null |
data.sku | object | Nested SKU and product information |
data.sku.uid | string | SKU UID |
data.sku.display_name | string | SKU display name |
data.sku.pzn | string | Pharmazentralnummer (PZN) |
data.sku.product_uid | string | Parent product UID |
data.sku.product_display_name | string or null | Display name of the parent product |
data.sku.product_handle | string or null | URL handle/slug of the parent product |