Skip to content

Order Status Hooks

Once an order has been created, Pharmacy keeps you informed of its lifecycle by calling back into your system. This page describes the two hooks you must expose:

  • A status webhook that Pharmacy calls whenever the order moves to Processing, Shipped, Delivered, Cancelled
  • A Get Order API that Pharmacy calls to fetch the current state of an order from your system.

Status Webhook

We send status updates to the webhook URL configured for your integration. Each update is sent as an HTTP POST request with a JSON payload.

The following events trigger a webhook notification:

  • Processing – Indicates that Pharmacy has started processing the order.
  • Shipped – Indicates that Pharmacy has shipped the order and includes the carrier, tracking number, tracking URL.
  • Delivered – Indicates that the order has been delivered and includes the delivery date.
  • Recalled – Indicates that the shipment has been recalled and is no longer in transit.
  • Cancelled – Indicates that the order has been cancelled and includes the cancellation reason.

Expected response

How you should respond is agreed with you as part of setting up the integration.

Get Order API

Pharmacy also needs a way to read back the current state of an order from your system - for example, to resync after a webhook delivery failure.

Expected response

json
{
  "orderReference": "ORD-2024-00123",
  "prescriptionUrl": "https://example.com/prescriptions/ORD-2024-00123.pdf",
  "medicines": [
    {
      "name": "Amoxicillin",
      "reference": "MED-456",
      "description": "Amoxicillin 500mg",
      "packageSize": "21 capsules",
      "dosage": "500",
      "dosageUnit": "mg",
      "units": 21,
      "unitLabel": "capsule",
      "quantity": 1,
      "usageAdvice": "Take 1 capsule 3 times daily."
    }
  ],
  "customer": {
    "reference": "CUST-789",
    "firstName": "Jan",
    "lastName": "de Vries",
    "email": "jan.devries@example.com",
    "phone": "+31612345678",
    "dateOfBirth": "1985-04-22",
    "gender": "male"
  },
  "shipmentDetails": {
    "carrier": "DHL",
    "trackingNumber": "TRACK-123",
    "trackingUrl": "https://carrier.example.com/track/TRACK-123"
  }
}
FieldTypeDescription
orderReferencestringOrder reference.
prescriptionUrlstringLink to the prescription document.
statusstringCurrent order status, e.g. new, processing, shipped, delivered, cancelled, returned.
medicinesarraySame shape as the order creation request.
customerobjectSame shape as the order creation request.
shippingobjectSame shape as the order creation request.
shipmentDetailsobject | nullPresent once the order has shipped.
shipmentDetails.carrierstringCarrier name.
shipmentDetails.trackingNumberstringCarrier tracking number.
shipmentDetails.trackingUrlstringCarrier tracking URL.

Eurocare Pharma documentation.