Skip to main content

Setup

Webhooks notify your server when data changes in our Wino system, with an HTTP POST request to a URL you choose. Use them to keep another system, an online store for instance, in sync without constantly polling our Open API.

How it works​

  1. You subscribe with the REST API below: each subscription follows one shop and sends to one URL.
  2. Each time something changes in that shop (a product is updated …), Wino sends a notification to your URL.
  3. Your server processes them and answers quickly.

The subscriptions API​

MethodPathDoes
GET/webhooks/subscriptionsList your subscriptions
GET/webhooks/subscriptions/{id}Get one subscription
POST/webhooks/subscriptionsCreate a subscription
PATCH/webhooks/subscriptions/{id}Change some of its properties
PUT/webhooks/subscriptions/{id}Replace it (its event settings go back to the defaults)
DELETE/webhooks/subscriptions/{id}Delete it
Note

A new, changed or deleted subscription takes up to 5 minutes to apply: after a DELETE or disabled: true, notifications can still arrive for 5 minutes. That's why PATCH answers with a warning property.

Entities which publish changes:​

Each subscription has settings: for each kind of data, whether you're notified. A new subscription follows the first four kinds. To turn on others, send a PATCH with their settings after creating it (see Manage subscriptions).

KindOn by default
Productyes
Variantyes
VariantPriceyes
StockActivityyes
Shopno
Deviceno
Taxno
Priceno
Categoryno
Customerno
Voucherno
Rewardno
LoyaltyActivityno
Staffno
Quoteno
DeliveryNoteno
CreditNoteno
Invoiceno
RefundReceiptno
SalesReceiptno
CashFlowno
CashRegisterReportno
Supplierno
Orderno
Not every change sends a notification
  • A stock movement sends a StockActivity notification, not a Variant one: follow StockActivity to track stock.
  • Prices set with createOrUpdateVariantPrice, and categories created or changed through the API, don't send notifications.
  • archiveVariant, unarchiveVariant, activateVariant and deactivateVariant don't send notifications either, nor do the product archive and unarchive that archiveVariant and unarchiveVariant make on its product (when it archives the product's last non-archived variant, or unarchives a variant of an archived product).
  • A DELIVERY or RECEPTION movement on an inactive variant makes it active, without a Variant notification: read the variant's active again when you receive its StockActivity.
  • Supplier orders handled in the Wino app can make a variant active and change its supplier and purchase price, without a Variant notification. Read the variants again when you receive the Order or StockActivity notification.