Skip to main content

Webhook Events

RxScale sends webhooks for the following event types:
Event TypeDescription
pharmacy_order_createdA new pharmacy order was created and assigned to your pharmacy
pharmacy_order_updatedAn existing pharmacy order’s status changed
pharmacy_sku_stock_updatedA pharmacy SKU’s stock level changed

HTTP Headers

Every webhook request includes the following HTTP headers:
HeaderDescription
Content-TypeAlways application/json
X-Webhook-EventThe event type (e.g. pharmacy_order_created)
X-Webhook-SignatureHMAC-SHA256 signature of the request body (see Security)
If you configured a custom header when creating the subscription, it will also be included.

pharmacy_order_created

Sent when a new pharmacy order is created and assigned to your pharmacy. Possible status values: init, waiting for pharmacy, pending review, in-progress, ready_for_pickup, completed

Payload Example

{
  "event_type": "pharmacy_order_created",
  "timestamp": 1711900000,
  "payload_version": "1",
  "data": {
    "uid": "po-abc123",
    "status": "init",
    "name": "#1001",
    "data": {},
    "external_status": "OPEN",
    "created_at": 1711899000,
    "updated_at": 1711899000,
    "deleted_at": null,
    "pharmacy": {
      "uid": "ph-xyz",
      "display_name": "City Pharmacy"
    },
    "order": {
      "uid": "ord-123",
      "delivery_address": {
        "first_name": "Max",
        "last_name": "Mustermann",
        "street": "Hauptstr.",
        "house_number": "1",
        "zip_code": "10115",
        "city": "Berlin",
        "country": "Germany",
        "additional_address": null
      },
      "invoice_address": {
        "first_name": "Max",
        "last_name": "Mustermann",
        "street": "Hauptstr.",
        "house_number": "1",
        "zip_code": "10115",
        "city": "Berlin",
        "country": "Germany",
        "additional_address": null
      }
    },
    "delivery_type": {
      "uid": "dt-001",
      "display_name": "Standard Shipping",
      "identifier": "standard"
    },
    "order_items": [
      {
        "uid": "oi-789",
        "amount": 1,
        "sku": {
          "uid": "sku-456",
          "display_name": "Medication X 100mg",
          "pzn": "12345678",
          "product_uid": "prod-789",
          "product_display_name": "Medication X",
          "product_handle": "medication-x"
        },
        "pharmacy_sku": {
          "uid": "psku-456",
          "external_id": "EXT-001",
          "price": 1299,
          "stock": 50
        }
      }
    ],
    "patient_data": {
      "uid": "pat-123",
      "display_name": "Max Mustermann",
      "email": "max@example.com",
      "date_of_birth": "15.06.1990",
      "phone_number": "+49 170 1234567"
    },
    "doctor_data": {
      "uid": "doc-456",
      "display_name": "Dr. Schmidt"
    },
    "prescription_file": {
      "filename": "prescription_001.pdf",
      "content_base64": "JVBERi0xLjQK..."
    }
  }
}

Field Reference

FieldTypeDescription
data.uidstringPharmacy order UID
data.statusstringCurrent order status
data.namestring or nullHuman-readable order name (e.g. #1001)
data.dataobjectCustom data attached to the order
data.external_statusstringExternal status identifier
data.created_atintegerUnix timestamp of creation
data.updated_atintegerUnix timestamp of last update
data.deleted_atinteger or nullUnix timestamp of soft-deletion, or null
data.pharmacyobjectPharmacy summary with uid and display_name
data.orderobjectParent order with uid, delivery_address, and invoice_address
data.delivery_typeobject or nullDelivery type with uid, display_name, and identifier
data.order_itemsarrayItems in the order
data.order_items[].skuobjectSKU info including pzn, product_uid, product_display_name, product_handle
data.order_items[].pharmacy_skuobject or nullPharmacy-specific SKU data with uid, external_id, price (cents), stock
data.patient_dataobject or nullPatient info with uid, display_name, email, date_of_birth, phone_number
data.doctor_dataobject or nullDoctor who signed the prescription, with uid and display_name
data.prescription_fileobject or nullSigned prescription PDF with filename and content_base64

pharmacy_order_updated

Sent when an existing pharmacy order’s status changes. The payload structure is identical to pharmacy_order_created. The status field reflects the new status.

Payload Example

{
  "event_type": "pharmacy_order_updated",
  "timestamp": 1711910000,
  "payload_version": "1",
  "data": {
    "uid": "po-abc123",
    "status": "in-progress",
    "name": "#1001",
    "data": {},
    "external_status": "IN_PROGRESS",
    "created_at": 1711899000,
    "updated_at": 1711910000,
    "deleted_at": null,
    "pharmacy": {
      "uid": "ph-xyz",
      "display_name": "City Pharmacy"
    },
    "order": {
      "uid": "ord-123",
      "delivery_address": {
        "first_name": "Max",
        "last_name": "Mustermann",
        "street": "Hauptstr.",
        "house_number": "1",
        "zip_code": "10115",
        "city": "Berlin",
        "country": "Germany",
        "additional_address": null
      },
      "invoice_address": {
        "first_name": "Max",
        "last_name": "Mustermann",
        "street": "Hauptstr.",
        "house_number": "1",
        "zip_code": "10115",
        "city": "Berlin",
        "country": "Germany",
        "additional_address": null
      }
    },
    "delivery_type": {
      "uid": "dt-001",
      "display_name": "Standard Shipping",
      "identifier": "standard"
    },
    "order_items": [
      {
        "uid": "oi-789",
        "amount": 1,
        "sku": {
          "uid": "sku-456",
          "display_name": "Medication X 100mg",
          "pzn": "12345678",
          "product_uid": "prod-789",
          "product_display_name": "Medication X",
          "product_handle": "medication-x"
        },
        "pharmacy_sku": {
          "uid": "psku-456",
          "external_id": "EXT-001",
          "price": 1299,
          "stock": 50
        }
      }
    ],
    "patient_data": {
      "uid": "pat-123",
      "display_name": "Max Mustermann",
      "email": "max@example.com",
      "date_of_birth": "15.06.1990",
      "phone_number": "+49 170 1234567"
    },
    "doctor_data": {
      "uid": "doc-456",
      "display_name": "Dr. Schmidt"
    },
    "prescription_file": {
      "filename": "prescription_001.pdf",
      "content_base64": "JVBERi0xLjQK..."
    }
  }
}

Organisation-Level Webhooks

When the webhook subscription was created via the Management API (organisation-level), order events include an additional fulfillment object:
{
  "event_type": "pharmacy_order_updated",
  "timestamp": 1711910000,
  "payload_version": "1",
  "data": {
    "uid": "po-abc123",
    "status": "in-progress",
    "...": "... same fields as above ...",
    "fulfillment": {
      "uid": "fo-abc123",
      "external_id": "EXT-FO-001",
      "order": {
        "uid": "ord-123",
        "shop_order": {
          "uid": "so-456",
          "external_id": "SHOP-789"
        }
      }
    }
  }
}
FieldTypeDescription
data.fulfillment.uidstringFulfillment order UID
data.fulfillment.external_idstring or nullExternal identifier for the fulfillment order
data.fulfillment.order.uidstringParent order UID
data.fulfillment.order.shop_order.uidstringShop order UID
data.fulfillment.order.shop_order.external_idstring or nullExternal 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

{
  "event_type": "pharmacy_sku_stock_updated",
  "timestamp": 1711900000,
  "payload_version": "1",
  "data": {
    "uid": "psku-abc123",
    "pharmacy_uid": "ph-xyz",
    "sku_uid": "sku-456",
    "external_id": "EXT-001",
    "price": 1299,
    "stock": 45,
    "markup": 0,
    "priority": 0,
    "type": "default",
    "created_at": 1711800000,
    "updated_at": 1711900000,
    "deleted_at": null,
    "sku": {
      "uid": "sku-456",
      "display_name": "Medication X 100mg",
      "pzn": "12345678",
      "product_uid": "prod-789",
      "product_display_name": "Medication X",
      "product_handle": "medication-x"
    }
  }
}

Field Reference

FieldTypeDescription
data.uidstringPharmacy SKU UID
data.pharmacy_uidstringPharmacy UID
data.sku_uidstringSKU UID
data.external_idstring or nullExternal identifier in your own system
data.priceintegerPrice in cents
data.stockintegerCurrent stock level
data.markupintegerMarkup value
data.priorityintegerPriority level
data.typestringPharmacy SKU type
data.created_atintegerUnix timestamp of creation
data.updated_atintegerUnix timestamp of last update
data.deleted_atinteger or nullUnix timestamp of soft-deletion, or null
data.skuobjectNested SKU and product information
data.sku.uidstringSKU UID
data.sku.display_namestringSKU display name
data.sku.pznstringPharmazentralnummer (PZN)
data.sku.product_uidstringParent product UID
data.sku.product_display_namestring or nullDisplay name of the parent product
data.sku.product_handlestring or nullURL handle/slug of the parent product