---
agentTools:
  projectIndex: https://cannaflow.readme.io/llms.txt
---

# List Pharmacies

Returns a list of pharmacies sorted alphabetically by name. You can filter by delivery method, products in stock, postal code, and search by name or address.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Cannaflow API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://api-pharmacy.cannaflow.de/api/v1",
      "description": "production"
    },
    {
      "url": "https://api-pharmacy.sandbox.cannaflow.de/api/v1",
      "description": "sandbox"
    },
    {
      "url": "https://api-pharmacy.cannaflow-staging.de/api/v1",
      "description": "staging"
    }
  ],
  "externalDocs": {
    "url": "https://api-pharmacy.sandbox.cannaflow.de/document/v1"
  },
  "paths": {
    "/pharmacies": {
      "get": {
        "operationId": "pharmacies-list",
        "summary": "List Pharmacies",
        "description": "Returns a list of pharmacies sorted alphabetically by name. You can filter by delivery method, products in stock, postal code, and search by name or address.",
        "tags": [
          "Pharmacies"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "query",
            "name": "deliveryMethod",
            "schema": {
              "type": "string",
              "enum": [
                "standard",
                "express",
                "sameDay",
                "selfPickup"
              ],
              "description": "Filter pharmacies by delivery method"
            }
          },
          {
            "in": "query",
            "name": "productsInStock",
            "schema": {
              "description": "Comma separated list of product ids",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "postalCode",
            "schema": {
              "type": "string",
              "description": "Postal code to filter pharmacies by delivery radius"
            }
          },
          {
            "in": "query",
            "name": "patientLat",
            "schema": {
              "type": "number",
              "description": "Patient latitude to filter same day delivery radius. Note: Filter only is applied if lat and lng are set."
            }
          },
          {
            "in": "query",
            "name": "patientLng",
            "schema": {
              "type": "number",
              "description": "Patient longitude to filter same day delivery radius . Note: Filter only is applied if lat and lng are set."
            }
          },
          {
            "in": "query",
            "name": "search",
            "schema": {
              "type": "string",
              "description": "Search term to filter pharmacies by name or address components (street, house number, city, postal code)"
            }
          },
          {
            "in": "query",
            "name": "pharmacyIds",
            "schema": {
              "description": "Comma separated list of pharmacy IDs to filter by",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "page",
            "schema": {
              "description": "Index of the current page. Starts at 1.",
              "default": 1,
              "type": "number",
              "minimum": 1
            }
          },
          {
            "in": "query",
            "name": "pageSize",
            "schema": {
              "description": "Number of items per page.",
              "default": 50,
              "type": "number",
              "minimum": 1,
              "maximum": 1000
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier for the pharmacy"
                          },
                          "slug": {
                            "type": "string",
                            "description": "Unique slug for the pharmacy"
                          },
                          "officialName": {
                            "type": "string",
                            "description": "Legal registered name of the pharmacy"
                          },
                          "displayName": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Public-facing name of the pharmacy"
                          },
                          "logoUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Logo URL of the pharmacy"
                          },
                          "domain": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Website domain associated with the pharmacy"
                          },
                          "email": {
                            "type": "string",
                            "description": "Primary contact email address for the pharmacy"
                          },
                          "phoneNumber": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Contact phone number for the pharmacy"
                          },
                          "street": {
                            "type": "string",
                            "description": "Street of the pharmacy location"
                          },
                          "houseNumber": {
                            "type": "string",
                            "description": "House number of the pharmacy location"
                          },
                          "postalCode": {
                            "type": "string",
                            "description": "Postal/ZIP code of the pharmacy location"
                          },
                          "city": {
                            "type": "string",
                            "description": "City where the pharmacy is located"
                          },
                          "country": {
                            "type": "string",
                            "description": "Country where the pharmacy is located"
                          },
                          "lat": {
                            "type": "number",
                            "description": "Latitude coordinate of the pharmacy location"
                          },
                          "long": {
                            "type": "number",
                            "description": "Longitude coordinate of the pharmacy location"
                          },
                          "googlePlaceId": {
                            "description": "Google Place ID for the pharmacy location",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "imprintUrl": {
                            "description": "URL to the pharmacy imprint",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "privacyPolicyUrl": {
                            "description": "URL to the pharmacy privacy policy",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "termsAndConditionsUrl": {
                            "description": "URL to the pharmacy terms and conditions",
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "shippingOptions": {
                            "type": "array",
                            "items": {
                              "type": "object",
                              "properties": {
                                "id": {
                                  "type": "string",
                                  "description": "Shipping option id"
                                },
                                "price": {
                                  "type": "number",
                                  "description": "Gross price in cents"
                                },
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "standard",
                                    "express",
                                    "selfPickUp",
                                    "sameDay"
                                  ],
                                  "description": "Shipping option type"
                                },
                                "freeShippingThreshold": {
                                  "description": "Delivery is free when the threshold in cents is reached. Deprecated, use discounts instead.",
                                  "type": "number"
                                },
                                "discounts": {
                                  "description": "Discounts for the shipping option",
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "thresholdCent": {
                                        "type": "number",
                                        "exclusiveMinimum": 0,
                                        "description": "Threshold in cents. If the order value is above this threshold, the shipping price is reduced to the price in cents."
                                      },
                                      "priceCent": {
                                        "type": "number",
                                        "minimum": 0,
                                        "description": "Price in cents"
                                      }
                                    },
                                    "required": [
                                      "thresholdCent",
                                      "priceCent"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "restriction": {
                                  "description": "Geographic restriction for the shipping option. Absent when unrestricted.",
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "radius"
                                        },
                                        "radiusKm": {
                                          "type": "number",
                                          "exclusiveMinimum": 0,
                                          "description": "Delivery radius in kilometers"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "radiusKm"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "postalCodes"
                                        },
                                        "postalCodes": {
                                          "type": "array",
                                          "items": {
                                            "type": "string"
                                          },
                                          "description": "Postal codes where delivery is available"
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "postalCodes"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                },
                                "address": {
                                  "description": "Pickup address for shipping options of type selfPickUp.",
                                  "type": "object",
                                  "properties": {
                                    "street": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "houseNumber": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "addressLine2": {
                                      "anyOf": [
                                        {
                                          "type": "string",
                                          "maxLength": 45
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ],
                                      "description": "Address line 2 (optional, truncated to 45 chars) - e.g., apartment number, company name, hotel room number, or delivery instructions"
                                    },
                                    "postalCode": {
                                      "type": "string",
                                      "minLength": 1,
                                      "pattern": "^\\d+$"
                                    },
                                    "city": {
                                      "type": "string",
                                      "minLength": 1
                                    },
                                    "country": {
                                      "description": "ISO 3166-1 alpha-2 country code",
                                      "type": "string"
                                    },
                                    "lat": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    },
                                    "long": {
                                      "anyOf": [
                                        {
                                          "type": "number"
                                        },
                                        {
                                          "type": "null"
                                        }
                                      ]
                                    }
                                  },
                                  "required": [
                                    "street",
                                    "houseNumber",
                                    "addressLine2",
                                    "postalCode",
                                    "city",
                                    "country"
                                  ],
                                  "additionalProperties": false
                                },
                                "title": {
                                  "description": "Display name of the pickup location for shipping options of type selfPickUp.",
                                  "type": "string"
                                },
                                "eta": {
                                  "description": "Estimated pickup time for the next available slot. Only present for selfPickUp options with time slots configured.",
                                  "type": "object",
                                  "properties": {
                                    "min": {
                                      "type": "string"
                                    },
                                    "max": {
                                      "type": "string"
                                    },
                                    "cutoff": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "min"
                                  ],
                                  "additionalProperties": false
                                }
                              },
                              "required": [
                                "id",
                                "price",
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            "description": "Array of shipping options offered by the pharmacy."
                          },
                          "paymentMethods": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "enum": [
                                "credit-card",
                                "instant-payment",
                                "self-pick-up",
                                "klarna",
                                "sofort",
                                "direct-transfer",
                                "zinia",
                                "paypal",
                                "bank-transfer",
                                "google-pay",
                                "apple-pay",
                                "pos-prepaid",
                                "pay-on-delivery"
                              ]
                            },
                            "description": "Payment methods accepted by the pharmacy (credit-card, instant-payment, self-pick-up)"
                          },
                          "isExternal": {
                            "type": "boolean",
                            "description": "Whether the pharmacy is external or uses the full cannaflow system. Notifications are handled by external pharmacies themselves and status flows might differ."
                          },
                          "externalPharmacyId": {
                            "description": "External pharmacy identifier as defined by the telemedicine provider on their platform",
                            "type": "string"
                          },
                          "paymentAccountId": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "The ID used for the payment API. Identifies the pharmacy's account with the payment provider, so its e-commerce payments can be attributed. Null if the pharmacy has no payment account configured."
                          }
                        },
                        "required": [
                          "id",
                          "slug",
                          "officialName",
                          "displayName",
                          "logoUrl",
                          "domain",
                          "email",
                          "phoneNumber",
                          "street",
                          "houseNumber",
                          "postalCode",
                          "city",
                          "country",
                          "lat",
                          "long",
                          "shippingOptions",
                          "paymentMethods",
                          "isExternal",
                          "paymentAccountId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "pagination": {
                      "type": "object",
                      "properties": {
                        "page": {
                          "type": "number",
                          "description": "Index of the current page. Starts at 1."
                        },
                        "pageSize": {
                          "type": "number",
                          "description": "Number of items per page."
                        },
                        "totalPages": {
                          "type": "number",
                          "description": "Total number of pages."
                        },
                        "totalItems": {
                          "type": "number",
                          "description": "Total number of items."
                        }
                      },
                      "required": [
                        "page",
                        "pageSize",
                        "totalPages",
                        "totalItems"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "data",
                    "pagination"
                  ],
                  "additionalProperties": false,
                  "example": {
                    "data": [
                      {
                        "id": "1",
                        "officialName": "Cannabis Apotheke",
                        "displayName": "Cannabis Apotheke Berlin",
                        "domain": "apotheke.cannaflow.de",
                        "email": "info@cannabis-apotheke.de",
                        "phoneNumber": "+49301234567",
                        "slug": "cannabis-apotheke-berlin",
                        "logoUrl": "https://cdn.cannaflow.de/example/logo.jpg",
                        "street": "Hauptstraße",
                        "houseNumber": "42",
                        "postalCode": "10115",
                        "city": "Berlin",
                        "country": "DE",
                        "lat": 52.52,
                        "long": 13.405,
                        "googlePlaceId": "ChIJN1t_tDeuEmsRUsoyG83frY4",
                        "imprintUrl": "https://apotheke.cannaflow.de/imprint",
                        "privacyPolicyUrl": "https://apotheke.cannaflow.de/privacy",
                        "termsAndConditionsUrl": "https://apotheke.cannaflow.de/terms",
                        "externalPharmacyId": "ext-pharmacy-123",
                        "paymentAccountId": "acc_01HZX9K4M7QW3RVTB2N5PDGY8C",
                        "shippingOptions": [
                          {
                            "id": "dhl-parcel",
                            "price": 700,
                            "type": "standard",
                            "freeShippingThreshold": 10000,
                            "discounts": [
                              {
                                "thresholdCent": 10000,
                                "priceCent": 0
                              }
                            ]
                          }
                        ],
                        "paymentMethods": [
                          "credit-card"
                        ],
                        "isExternal": false
                      }
                    ],
                    "pagination": {
                      "page": 1,
                      "pageSize": 10,
                      "totalPages": 1,
                      "totalItems": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input data",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.BAD_REQUEST"
                }
              }
            }
          },
          "401": {
            "description": "Authorization not provided",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.UNAUTHORIZED"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.FORBIDDEN"
                }
              }
            }
          },
          "404": {
            "description": "Not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.NOT_FOUND"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error.INTERNAL_SERVER_ERROR"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "error.UNAUTHORIZED": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Authorization not provided"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "UNAUTHORIZED"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false,
        "title": "Authorization not provided error (401)",
        "description": "The error information",
        "example": {
          "code": "UNAUTHORIZED",
          "message": "Authorization not provided",
          "issues": []
        }
      },
      "error.FORBIDDEN": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Insufficient access"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "FORBIDDEN"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false,
        "title": "Insufficient access error (403)",
        "description": "The error information",
        "example": {
          "code": "FORBIDDEN",
          "message": "Insufficient access",
          "issues": []
        }
      },
      "error.INTERNAL_SERVER_ERROR": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Internal server error"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "INTERNAL_SERVER_ERROR"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false,
        "title": "Internal server error error (500)",
        "description": "The error information",
        "example": {
          "code": "INTERNAL_SERVER_ERROR",
          "message": "Internal server error",
          "issues": []
        }
      },
      "error.BAD_REQUEST": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Invalid input data"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "BAD_REQUEST"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false,
        "title": "Invalid input data error (400)",
        "description": "The error information",
        "example": {
          "code": "BAD_REQUEST",
          "message": "Invalid input data",
          "issues": []
        }
      },
      "error.NOT_FOUND": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "description": "The error message",
            "example": "Not found"
          },
          "code": {
            "type": "string",
            "description": "The error code",
            "example": "NOT_FOUND"
          },
          "issues": {
            "description": "An array of issues that were responsible for the error",
            "example": [],
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "code"
        ],
        "additionalProperties": false,
        "title": "Not found error (404)",
        "description": "The error information",
        "example": {
          "code": "NOT_FOUND",
          "message": "Not found",
          "issues": []
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "description": "Access token for the API",
        "name": "x-cannaflow-api-key",
        "in": "header"
      }
    }
  },
  "webhooks": {
    "prescription.checkout_completed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription checkout completed event",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_checkout_completed"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.payment_confirmed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription payment confirmed event. Sent when a payment is captured after checkout, e.g. a bank transfer confirmed by the pharmacy or a self-pickup order paid at the pharmacy (POS terminal or cash). Not sent for payments completed during checkout itself. Every order emits exactly one payment signal: prescription_checkout_completed if it was paid during checkout, or prescription_payment_confirmed if the payment was captured afterwards.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_payment_confirmed"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.authorized": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription authorized event",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_authorized"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "invoiceId": {
                    "type": "string",
                    "description": "Invoice ID"
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "invoiceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.packaged": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription packaged event. Opt-in replacement for `prescription.authorized`, enabled per telemedicine provider — you receive one or the other, never both.  `prescription.authorized` can only be sent when an invoice is created, so orders that are never invoiced at packaging (patient invoicing disabled, or payment collected later such as pay on delivery and pay at pickup) produce no event at all. This event is sent for every packaged order instead, with `invoiceId` null when no invoice exists yet.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_packaged"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "invoiceId": {
                    "type": "string",
                    "nullable": true,
                    "description": "Invoice ID, or null when the order has no invoice at packaging"
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "invoiceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.cancelled": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription cancelled event",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_cancelled"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "reason": {
                    "type": "string",
                    "description": "Cancellation reason"
                  },
                  "cancelledBy": {
                    "type": "string",
                    "enum": [
                      "telemedicineProvider",
                      "pharmacy"
                    ]
                  },
                  "refundedAmountCent": {
                    "type": "number",
                    "description": "Refunded amount in cents. If payment method supports it this amount was refunded to the patient."
                  },
                  "patientEmailSuppressed": {
                    "type": "boolean",
                    "description": "Only present when cancelledBy is \"pharmacy\". Indicates that the pharmacy suppressed the cancellation email to the patient. This is only relevant if you have disabled Cannaflow's transactional email notifications and handle patient communication yourself."
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "reason",
                  "cancelledBy",
                  "refundedAmountCent"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.completed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription completed event",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_completed"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.ready_for_pickup": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription ready for pickup event",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_ready_for_pickup"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "readyForPickupAt": {
                    "type": "string",
                    "format": "date-time",
                    "description": "Timestamp when the prescription became ready for pickup"
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "readyForPickupAt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.announced": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription announced event.The package was registered by the pharmacy to the fulfillment provider.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_announced"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "tracking": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "trackingNumber": {
                        "type": "string",
                        "nullable": true,
                        "description": "Tracking number"
                      },
                      "trackingUrl": {
                        "type": "string",
                        "nullable": true,
                        "description": "Tracking URL"
                      }
                    }
                  },
                  "shippingOption": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Option ID"
                      },
                      "type": {
                        "type": "string",
                        "description": "Option type"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "shippingOption"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.checkout_payment_failed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "deprecated": true,
        "summary": "Payment failed (deprecated)",
        "description": "This webhook is no longer in use and should be ignored. Please contact our support team for assistance with payment failure handling.",
        "requestBody": {
          "description": "Payment failed event (deprecated)",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_checkout_payment_failed"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "nullable": true,
                        "description": "Prescription ID. Null for draft/TP-initiated checkouts."
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.shipped": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription shipped event",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_shipped"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "tracking": {
                    "type": "object",
                    "nullable": true,
                    "properties": {
                      "trackingNumber": {
                        "type": "string",
                        "nullable": true,
                        "description": "Tracking number"
                      },
                      "trackingUrl": {
                        "type": "string",
                        "nullable": true,
                        "description": "Tracking URL"
                      },
                      "currentLocationDriver": {
                        "type": "object",
                        "nullable": true,
                        "properties": {
                          "lat": {
                            "type": "number",
                            "nullable": true,
                            "description": "Driver lat"
                          },
                          "long": {
                            "type": "number",
                            "nullable": true,
                            "description": "Driver long"
                          }
                        }
                      }
                    }
                  },
                  "shippingOption": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Option ID"
                      },
                      "type": {
                        "type": "string",
                        "description": "Option type"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  },
                  "estimatedDelivery": {
                    "type": "string",
                    "format": "date-time",
                    "nullable": true,
                    "description": "Estimated delivery"
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "shippingOption"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.billing_address_updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription billing address updated event. Sent when the pharmacy updates the billing address on an order.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_billing_address_updated"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "previousBillingAddress": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "houseNumber": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string",
                        "nullable": true
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "lat": {
                        "type": "number",
                        "nullable": true,
                        "description": "Latitude"
                      },
                      "long": {
                        "type": "number",
                        "nullable": true,
                        "description": "Longitude"
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "street",
                      "houseNumber",
                      "addressLine2",
                      "postalCode",
                      "city",
                      "country",
                      "lat",
                      "long"
                    ]
                  },
                  "billingAddress": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "houseNumber": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string",
                        "nullable": true
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "lat": {
                        "type": "number",
                        "nullable": true,
                        "description": "Latitude"
                      },
                      "long": {
                        "type": "number",
                        "nullable": true,
                        "description": "Longitude"
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "street",
                      "houseNumber",
                      "addressLine2",
                      "postalCode",
                      "city",
                      "country",
                      "lat",
                      "long"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "previousBillingAddress",
                  "billingAddress"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "affiliation.activated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Affiliation activated event. Sent when a pharmacy switches a telemedicine provider on (the onboarding trigger). Carries a fixed snapshot of the pharmacy onboarding data so the provider can complete onboarding without a separate API round-trip. Opt-in per provider and only sent when a webhook URL is configured.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "affiliation_activated"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "affiliation": {
                    "type": "object",
                    "properties": {
                      "pharmacyId": {
                        "type": "string",
                        "description": "Cannaflow's canonical pharmacy ID. Always present."
                      },
                      "telemedicineProviderId": {
                        "type": "string",
                        "description": "Telemedicine provider ID."
                      },
                      "externalPharmacyId": {
                        "type": "string",
                        "nullable": true,
                        "description": "The TP's own pharmacy ID. On affiliation_activated this is typically null for TPs that assign it during onboarding — its absence is not an error."
                      }
                    },
                    "required": [
                      "pharmacyId",
                      "telemedicineProviderId",
                      "externalPharmacyId"
                    ]
                  },
                  "pharmacy": {
                    "type": "object",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "officialName": {
                        "type": "string"
                      },
                      "slug": {
                        "type": "string"
                      },
                      "contactEmail": {
                        "type": "string"
                      },
                      "contactPhone": {
                        "type": "string",
                        "nullable": true
                      },
                      "website": {
                        "type": "string",
                        "nullable": true
                      },
                      "address": {
                        "type": "object",
                        "properties": {
                          "street": {
                            "type": "string"
                          },
                          "houseNumber": {
                            "type": "string"
                          },
                          "postalCode": {
                            "type": "string"
                          },
                          "city": {
                            "type": "string"
                          },
                          "country": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "street",
                          "houseNumber",
                          "postalCode",
                          "city",
                          "country"
                        ],
                        "description": "Operating address (where the pharmacy is / ships from)."
                      },
                      "billing": {
                        "type": "object",
                        "properties": {
                          "name": {
                            "type": "string"
                          },
                          "ownerName": {
                            "type": "string"
                          },
                          "email": {
                            "type": "string"
                          },
                          "taxNumber": {
                            "type": "string",
                            "nullable": true
                          },
                          "vatNumber": {
                            "type": "string",
                            "nullable": true
                          },
                          "address": {
                            "type": "object",
                            "properties": {
                              "street": {
                                "type": "string"
                              },
                              "houseNumber": {
                                "type": "string"
                              },
                              "postalCode": {
                                "type": "string"
                              },
                              "city": {
                                "type": "string"
                              },
                              "country": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "street",
                              "houseNumber",
                              "postalCode",
                              "city",
                              "country"
                            ],
                            "description": "Billing address (where invoices go)."
                          }
                        },
                        "required": [
                          "name",
                          "ownerName",
                          "email",
                          "address"
                        ]
                      }
                    },
                    "required": [
                      "name",
                      "officialName",
                      "slug",
                      "contactEmail",
                      "address",
                      "billing"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "affiliation",
                  "pharmacy"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "affiliation.deactivated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Affiliation deactivated event. Sent when a pharmacy switches a telemedicine provider off. Carries only the affiliation identifier (no pharmacy data block). Opt-in per provider and only sent when a webhook URL is configured.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "affiliation_deactivated"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "affiliation": {
                    "type": "object",
                    "properties": {
                      "pharmacyId": {
                        "type": "string",
                        "description": "Cannaflow's canonical pharmacy ID. Always present."
                      },
                      "telemedicineProviderId": {
                        "type": "string",
                        "description": "Telemedicine provider ID."
                      },
                      "externalPharmacyId": {
                        "type": "string",
                        "nullable": true,
                        "description": "The TP's own pharmacy ID. On affiliation_activated this is typically null for TPs that assign it during onboarding — its absence is not an error."
                      }
                    },
                    "required": [
                      "pharmacyId",
                      "telemedicineProviderId",
                      "externalPharmacyId"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "affiliation"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    },
    "prescription.delivery_address_updated": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "requestBody": {
          "description": "Prescription delivery address updated event. Sent when the pharmacy updates the delivery address on an order.",
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "prescription_delivery_address_updated"
                    ]
                  },
                  "timestamp": {
                    "type": "number",
                    "description": "Unix timestamp"
                  },
                  "prescription": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "description": "Prescription ID"
                      },
                      "referenceId": {
                        "type": "string",
                        "description": "Reference ID"
                      }
                    },
                    "required": [
                      "id",
                      "referenceId"
                    ]
                  },
                  "previousDeliveryAddress": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "houseNumber": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string",
                        "nullable": true
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "lat": {
                        "type": "number",
                        "nullable": true,
                        "description": "Latitude"
                      },
                      "long": {
                        "type": "number",
                        "nullable": true,
                        "description": "Longitude"
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "street",
                      "houseNumber",
                      "addressLine2",
                      "postalCode",
                      "city",
                      "country",
                      "lat",
                      "long"
                    ]
                  },
                  "deliveryAddress": {
                    "type": "object",
                    "properties": {
                      "firstName": {
                        "type": "string"
                      },
                      "lastName": {
                        "type": "string"
                      },
                      "street": {
                        "type": "string"
                      },
                      "houseNumber": {
                        "type": "string"
                      },
                      "addressLine2": {
                        "type": "string",
                        "nullable": true
                      },
                      "postalCode": {
                        "type": "string"
                      },
                      "city": {
                        "type": "string"
                      },
                      "country": {
                        "type": "string"
                      },
                      "lat": {
                        "type": "number",
                        "nullable": true,
                        "description": "Latitude"
                      },
                      "long": {
                        "type": "number",
                        "nullable": true,
                        "description": "Longitude"
                      }
                    },
                    "required": [
                      "firstName",
                      "lastName",
                      "street",
                      "houseNumber",
                      "addressLine2",
                      "postalCode",
                      "city",
                      "country",
                      "lat",
                      "long"
                    ]
                  }
                },
                "required": [
                  "action",
                  "timestamp",
                  "prescription",
                  "previousDeliveryAddress",
                  "deliveryAddress"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Event processed successfully"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 103,
      "1": 44,
      "2": 25,
      "3": 148,
      "4": 73,
      "5": 233,
      "6": 9,
      "7": 0,
      "8": 61,
      "9": 87,
      "10": 29,
      "11": 226
    }
  }
}
```