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

# Get a pharmacy

Returns a single pharmacy by ID. This endpoint is useful for retrieving detailed information about a specific pharmacy and all its currently available products.

# 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/{id}": {
      "get": {
        "operationId": "pharmacies-get",
        "summary": "Get a pharmacy",
        "description": "Returns a single pharmacy by ID. This endpoint is useful for retrieving detailed information about a specific pharmacy and all its currently available products.",
        "tags": [
          "Pharmacies"
        ],
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "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."
                    },
                    "openingHours": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "timezone": {
                              "type": "string",
                              "description": "IANA timezone, e.g. Europe/Berlin"
                            },
                            "rules": {
                              "type": "array",
                              "items": {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "weekday"
                                      },
                                      "weekday": {
                                        "type": "string",
                                        "enum": [
                                          "monday",
                                          "tuesday",
                                          "wednesday",
                                          "thursday",
                                          "friday",
                                          "saturday",
                                          "sunday"
                                        ]
                                      },
                                      "intervals": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string",
                                              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",
                                              "description": "Opening time in 24-hour HH:MM format (e.g. \"09:00\")"
                                            },
                                            "to": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                                                },
                                                {
                                                  "type": "string",
                                                  "const": "24:00"
                                                }
                                              ],
                                              "description": "Exclusive closing time in HH:MM format. 24:00 means the end of this calendar day. Overnight hours use separate rules for each day."
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "to"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "description": "Time intervals when the pharmacy is open. Empty array means closed."
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "weekday",
                                      "intervals"
                                    ],
                                    "additionalProperties": false
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "date"
                                      },
                                      "date": {
                                        "type": "string",
                                        "description": "Specific date in YYYY-MM-DD format"
                                      },
                                      "intervals": {
                                        "type": "array",
                                        "items": {
                                          "type": "object",
                                          "properties": {
                                            "from": {
                                              "type": "string",
                                              "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$",
                                              "description": "Opening time in 24-hour HH:MM format (e.g. \"09:00\")"
                                            },
                                            "to": {
                                              "anyOf": [
                                                {
                                                  "type": "string",
                                                  "pattern": "^(?:[01]\\d|2[0-3]):[0-5]\\d$"
                                                },
                                                {
                                                  "type": "string",
                                                  "const": "24:00"
                                                }
                                              ],
                                              "description": "Exclusive closing time in HH:MM format. 24:00 means the end of this calendar day. Overnight hours use separate rules for each day."
                                            }
                                          },
                                          "required": [
                                            "from",
                                            "to"
                                          ],
                                          "additionalProperties": false
                                        },
                                        "description": "Time intervals when the pharmacy is open on this date. Empty array means closed."
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "date",
                                      "intervals"
                                    ],
                                    "additionalProperties": false
                                  }
                                ],
                                "type": "object"
                              },
                              "description": "Availability rules. Weekday rules define recurring weekly hours. Date rules are exceptions such as public holidays or shortened days: on their date they replace the weekday rule, and an empty intervals array means closed all day. Only date rules from today on (in the pharmacy timezone) are returned, at most one year ahead, after the weekday rules and sorted by date."
                            }
                          },
                          "required": [
                            "timezone",
                            "rules"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "null"
                        }
                      ],
                      "description": "Opening hours of the pharmacy. Null if not configured."
                    },
                    "products": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "Unique identifier of the product"
                          },
                          "name": {
                            "type": "string",
                            "description": "Full product identifier combining the base name and specific cultivar"
                          },
                          "baseName": {
                            "type": "string",
                            "description": "Root product name before adding cultivar-specific details"
                          },
                          "slug": {
                            "type": "string",
                            "description": "URL-friendly slug for the product"
                          },
                          "pzn": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Pharmacy Central Number, nullable if not applicable"
                          },
                          "category": {
                            "type": "string",
                            "enum": [
                              "flower",
                              "capsule",
                              "extract",
                              "shot"
                            ],
                            "description": "Category of the product"
                          },
                          "unit": {
                            "type": "string",
                            "enum": [
                              "gram",
                              "milliliter",
                              "piece"
                            ],
                            "description": "Measurement unit for product quantities and per-unit prices"
                          },
                          "cannabinoidUnit": {
                            "type": "string",
                            "enum": [
                              "percentage",
                              "milligram/milliliter"
                            ],
                            "description": "Measurement unit shared by the thc and cbd values"
                          },
                          "cultivar": {
                            "type": "string",
                            "description": "Name of cultivar. Value is an empty string if cultivar is unknown."
                          },
                          "cultivarId": {
                            "anyOf": [
                              {
                                "type": "number"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Database ID of the cultivar, null when the product has no cultivar"
                          },
                          "manufacturer": {
                            "type": "string",
                            "description": "Company that produces the product"
                          },
                          "manufacturerId": {
                            "type": "number",
                            "description": "Database ID of the manufacturer that produces the product"
                          },
                          "genetic": {
                            "type": "string",
                            "enum": [
                              "hybrid",
                              "indica",
                              "sativa",
                              "hybridIndicaDominant",
                              "hybridSativaDominant"
                            ],
                            "description": "Genetic type of the product, defaults to hybrid"
                          },
                          "country": {
                            "type": "string",
                            "description": "Country of origin, nullable if not applicable"
                          },
                          "thc": {
                            "type": "number",
                            "description": "THC content of the product"
                          },
                          "cbd": {
                            "type": "number",
                            "description": "CBD content of the product"
                          },
                          "irradiated": {
                            "type": "boolean",
                            "description": "Indicates if the product is irradiated"
                          },
                          "availability": {
                            "type": "boolean",
                            "description": "Indicates if the product is available"
                          },
                          "imageUrl": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Image URL of the product (deprecated: use images instead)"
                          },
                          "images": {
                            "type": "object",
                            "properties": {
                              "original": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Original image URL (1024x1024)"
                              },
                              "responsive": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string",
                                      "description": "Image URL for this size"
                                    },
                                    "width": {
                                      "type": "number",
                                      "description": "Image width in pixels. Can be one of the following: 64, 320, 480, 768, 1024"
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "width"
                                  ],
                                  "additionalProperties": false
                                },
                                "description": "Responsive image URLs for different screen sizes"
                              }
                            },
                            "required": [
                              "original",
                              "responsive"
                            ],
                            "additionalProperties": false
                          },
                          "blurredImages": {
                            "type": "object",
                            "properties": {
                              "original": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ],
                                "description": "Original image URL (1024x1024)"
                              },
                              "responsive": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "url": {
                                      "type": "string",
                                      "description": "Image URL for this size"
                                    },
                                    "width": {
                                      "type": "number",
                                      "description": "Image width in pixels. Can be one of the following: 64, 320, 480, 768, 1024"
                                    }
                                  },
                                  "required": [
                                    "url",
                                    "width"
                                  ],
                                  "additionalProperties": false
                                },
                                "description": "Responsive image URLs for different screen sizes"
                              }
                            },
                            "required": [
                              "original",
                              "responsive"
                            ],
                            "additionalProperties": false,
                            "description": "Blurred product image URLs. When no blurred image variant exists, original is null and responsive is empty."
                          },
                          "packSize": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "exclusiveMinimum": 0,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ],
                            "description": "Number of units in a package. Only products of category \"shot\" have a pack size."
                          },
                          "descriptionDe": {
                            "type": "string",
                            "description": "SEO-optimized product description in German"
                          },
                          "descriptionEn": {
                            "type": "string",
                            "description": "SEO-optimized product description in English"
                          },
                          "price": {
                            "type": "number",
                            "description": "Gross price of the product in cents"
                          },
                          "priceNet": {
                            "type": "number",
                            "description": "Net price of the product in cents"
                          },
                          "vat": {
                            "type": "number",
                            "description": "VAT rate applied to the product price (e.g. 19 for 19%)"
                          },
                          "currency": {
                            "description": "Currency of the price, default is EUR",
                            "type": "string"
                          },
                          "externalPharmacyId": {
                            "description": "External pharmacy identifier as defined by the telemedicine provider on their platform",
                            "type": "string"
                          },
                          "quantityIncrement": {
                            "type": "number",
                            "description": "Quantity step for ordering, measured in the product unit"
                          },
                          "minOrderQuantity": {
                            "type": "number",
                            "description": "Minimum order quantity that can be purchased"
                          },
                          "availableQuantity": {
                            "description": "Available quantity (may be capped by pharmacy configuration)",
                            "type": "number"
                          }
                        },
                        "required": [
                          "id",
                          "name",
                          "baseName",
                          "slug",
                          "pzn",
                          "category",
                          "unit",
                          "cannabinoidUnit",
                          "cultivar",
                          "cultivarId",
                          "manufacturer",
                          "manufacturerId",
                          "genetic",
                          "country",
                          "thc",
                          "cbd",
                          "irradiated",
                          "availability",
                          "imageUrl",
                          "images",
                          "blurredImages",
                          "packSize",
                          "descriptionDe",
                          "descriptionEn",
                          "price",
                          "priceNet",
                          "vat",
                          "currency",
                          "quantityIncrement",
                          "minOrderQuantity"
                        ],
                        "additionalProperties": false
                      },
                      "description": "List of products currently available at this pharmacy"
                    }
                  },
                  "required": [
                    "id",
                    "slug",
                    "officialName",
                    "displayName",
                    "logoUrl",
                    "domain",
                    "email",
                    "phoneNumber",
                    "street",
                    "houseNumber",
                    "postalCode",
                    "city",
                    "country",
                    "lat",
                    "long",
                    "shippingOptions",
                    "paymentMethods",
                    "isExternal",
                    "paymentAccountId",
                    "openingHours",
                    "products"
                  ],
                  "additionalProperties": false,
                  "example": {
                    "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"
                    ],
                    "openingHours": {
                      "timezone": "Europe/Berlin",
                      "rules": [
                        {
                          "type": "weekday",
                          "weekday": "monday",
                          "intervals": [
                            {
                              "from": "09:00",
                              "to": "18:00"
                            }
                          ]
                        },
                        {
                          "type": "weekday",
                          "weekday": "tuesday",
                          "intervals": [
                            {
                              "from": "09:00",
                              "to": "18:00"
                            }
                          ]
                        },
                        {
                          "type": "weekday",
                          "weekday": "wednesday",
                          "intervals": [
                            {
                              "from": "09:00",
                              "to": "18:00"
                            }
                          ]
                        },
                        {
                          "type": "weekday",
                          "weekday": "thursday",
                          "intervals": [
                            {
                              "from": "09:00",
                              "to": "18:00"
                            }
                          ]
                        },
                        {
                          "type": "weekday",
                          "weekday": "friday",
                          "intervals": [
                            {
                              "from": "09:00",
                              "to": "18:00"
                            }
                          ]
                        },
                        {
                          "type": "weekday",
                          "weekday": "saturday",
                          "intervals": []
                        },
                        {
                          "type": "weekday",
                          "weekday": "sunday",
                          "intervals": []
                        },
                        {
                          "type": "date",
                          "date": "2026-12-24",
                          "intervals": [
                            {
                              "from": "09:00",
                              "to": "13:00"
                            }
                          ]
                        },
                        {
                          "type": "date",
                          "date": "2026-12-25",
                          "intervals": []
                        }
                      ]
                    },
                    "products": [
                      {
                        "id": "CF0001",
                        "name": "420 pharma 30/1 CA WES Wedding Singer",
                        "baseName": "420 pharma 30/1 CA WES",
                        "slug": "420-pharma-30-1-ca-wes-wedding-singer",
                        "pzn": "18669241",
                        "category": "flower",
                        "unit": "gram",
                        "cannabinoidUnit": "percentage",
                        "cultivar": "wedding singer",
                        "cultivarId": 42,
                        "manufacturer": "420 pharma",
                        "manufacturerId": 7,
                        "genetic": "hybridIndicaDominant",
                        "country": "CA",
                        "thc": 30.05,
                        "cbd": 0.1,
                        "price": 1250,
                        "priceNet": 1050,
                        "vat": 19,
                        "irradiated": true,
                        "currency": "EUR",
                        "availability": true,
                        "quantityIncrement": 5,
                        "imageUrl": "https://cdn.cannaflow.de/example/CF0001.jpg",
                        "images": {
                          "original": "https://cdn.cannaflow.de/example/CF0001.jpg",
                          "responsive": [
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_64w.jpg",
                              "width": 64
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_320w.jpg",
                              "width": 320
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_480w.jpg",
                              "width": 480
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_768w.jpg",
                              "width": 768
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_1024w.jpg",
                              "width": 1024
                            }
                          ]
                        },
                        "blurredImages": {
                          "original": "https://cdn.cannaflow.de/example/CF0001.blur.webp",
                          "responsive": [
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_64w.blur.webp",
                              "width": 64
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_320w.blur.webp",
                              "width": 320
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_480w.blur.webp",
                              "width": 480
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_768w.blur.webp",
                              "width": 768
                            },
                            {
                              "url": "https://cdn.cannaflow.de/example/CF0001_1024w.blur.webp",
                              "width": 1024
                            }
                          ]
                        },
                        "packSize": null,
                        "descriptionDe": "420 pharma 30/1 CA WES mit dem Strain wedding singer hat eine Hybrid Indica-dominant-Genetik. Der Wirkstoffgehalt liegt bei ungefähr 30,1% THC und unter 1% CBD. Die Blütensorte ist bestrahlt, wird von 420 pharma aus Kanada importiert.",
                        "descriptionEn": "420 pharma 30/1 CA WES with the strain wedding singer has indica-dominant hybrid genetics. The active ingredient content is approximately 30.1% THC and under 1% CBD. The flower is irradiated, imported by 420 pharma from Canada.",
                        "minOrderQuantity": 10,
                        "availableQuantity": 100
                      }
                    ],
                    "isExternal": false
                  }
                }
              }
            }
          },
          "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
    }
  }
}
```