Skip to main content

Connect an ERP

Connect an ERP or a management software to Wino: the ERP manages the catalog, purchases and stock levels, and Wino sells in the shops. This guide shows the main flows. Adapt them to what your ERP manages.

Develop on staging with a staging key (see Environments), and read Catalog first.

How it works​

  1. Push the catalog from the ERP: products, variants and their prices.
  2. Update the stock: deliveries and stock counts.
  3. Read the sales back into the ERP.

Keep a mapping between your ERP's ids and Wino's ids: every write returns the id of the record, and you need it to update it later. With several shops, each shop has its own copy of the catalog: create the product and its variants in each shop.

1. Push the catalog​

Create the product with createProduct, then each variant with createVariant, with its prices in the shop's price lists (list them with prices). The required fields of each product kind are in Catalog.

mutation CreateVariant($input: InputCreateVariant!, $prices: [InputCreateVariantPrices!]!) {
createVariant(input: $input, variantPricesInput: $prices) {
id
formattedName
}
}
{
"input": { "productId": "<product id>", "shopId": "<shop id>", "name": "75 cl", "stockKeepingUnit": "ERP-000123" },
"prices": [{ "priceId": "<price list id>", "valueIncludingTax": 18, "valueExcludingTax": 15 }]
}

Both values must match the product's tax: here 15 € excluding tax with a 20 % tax is 18 € including tax.

Later, update them with updateProduct and updateVariant. To change prices, send variantPricesInput with updateVariant: the change then sends a VariantPrice webhook notification to the shop's subscribers. createOrUpdateVariantPrice also sets a price, but sends no notification.

The API has no delete: when an article leaves the catalog, archive it with archiveVariant or archiveProduct.

2. Update the stock​

Record stock changes with createStockActivity and your own device (see Your shop and your device):

  • DELIVERY for goods you received: it adds to the stock.
  • RESET after a stock count: its quantity becomes the new stock level.
mutation StockCount($variantId: String!, $shopId: String!, $deviceId: String!) {
createStockActivity(
input: { kind: RESET, quantity: 24, comment: "Inventory 2026-11", variantId: $variantId, shopId: $shopId, deviceId: $deviceId }
) {
id
kind
quantity
}
}

A stock movement can't be removed: send each one once. For a bulk variant, also send capacityUnit and capacityPrecision, with a scaled quantity (see Bulk variants). The other movement kinds are listed in the Glossary.

3. Read the sales back​

  • To follow the stock, subscribe to StockActivity webhooks: each sale at a cash register sends a notification.
  • To import the sales themselves (receipts, invoices, refunds), read them regularly: see Connect an analytics system.

Suppliers and customers can be written too: createSupplier, updateSupplier, createCustomer, updateCustomer. Every input is described in the GraphQL schema.