Three options to connect Shoptet#
Shoptet supports three ways of integration with Margly:
- Authorized Margly.io add-on in Shoptet Addons (coming soon — available shortly) — install with one click, no manual key entry. After release this will be the recommended path.
- API key (Private API) — instant loading, webhooks for real-time updates. Available only on the Shoptet Premium tier.
- CSV feeds — works for all Shoptet tiers. Margly needs 3 separate feed URLs (orders, products, customers). Data is loaded automatically according to your Margly tier (Starter 1×/day, Professional 2×/day, Business / Enterprise / Trial 4×/day).
Option A: Authorized Margly.io add-on (coming soon)#
Option B: Connection via Private API key#
The Private API key is the fastest path to current data — Margly receives changes in the e-shop (new order, cancellation, price change) in real time via webhooks, so the overviews in the app are practically immediate.
Generate a Private API token in Shoptet
In the Shoptet administration go to Settings → Private API. Click Generate token, name it for example "Margly", and copy the generated token (it will show only once — save it).
Paste the token into Margly
In Margly open Integrations → Shoptet and paste the Private API token. Click Verify and save — Margly verifies the token immediately against the Shoptet API.
Margly automatically registers webhooks
After verifying the token Margly registers a set of webhooks in the background for:
- order lifecycle (creation, edit, paid, cancellation)
- product availability and stock movements
- customer lifecycle (creation, edit)
Registration takes a few seconds and you'll see the "Webhooks active" status in the Integrations section.
Wait for the first data load
Margly pulls historical data — typically 5–30 minutes depending on the e-shop size. You see the status in Integrations → Data updates.
Option C: Connection via CSV feeds#
If you don't have Shoptet Premium (and therefore no Private API), paste 3 feed URLs into Margly. Without all three Margly can't calculate margins or customer return rates — product prices and customer data are essential for calculations.
Each feed is generated in a different section in the Shoptet administration — see Shoptet's official help on exports. We summarize the procedure for each feed below.
Generate CSV feed URLs in Shoptet admin
Products: in the Shoptet administration go to Products → Export. Create a custom export (e.g., "Data for Margly") and in the field editor add these columns (find them in the field selection menu):
- Default category
- Purchase price
- Purchase price in VAT percent
- Purchase price including VAT
- Currency
Important: "Allow only from a specific IP address" must not be checked. Save and copy the URL from the bottom of the page.
Orders: go to Orders → Export. Select the system export Shoptet — CSV. For "Include orders" select All. "Permanent link" must not be checked. Copy the URL from the bottom of the page.
Customers: go to Customers → Export. Select export type CSV. "Permanent link" must not be checked. Copy the URL from the bottom of the page.
Paste all 3 URLs into Margly
In Margly open Integrations → Shoptet (CSV) and paste:
- Orders feed URL
- Products feed URL
- Customers feed URL
Margly verifies all three — it pulls a small sample and tests that it can read the encoding (UTF-8 or Windows-1250) and column separator (semicolon or tab).
Load frequency according to your tier
CSV feeds are pulled by Margly under the same rules as API/add-on — the frequency follows your Margly tier:
- Starter — 1×/day (morning)
- Professional — 2×/day (morning + evening)
- Business / Enterprise / Trial — 4×/day (morning, midday, evening, night)
Detail in Data sync. Between loads, current data is visible only after the next scheduled load — for real time you need the Private API (Option B), which sends webhooks immediately.
Common errors#
- "Feed unavailable (403)" — the private CSV feed URL requires that in the Shoptet settings the "Allow only from a specific IP address" (for products) or "Permanent link" (for orders and customers) is not checked. Check it in the administration.
- "API key not verified (401)" — the token was deactivated or copied incorrectly. In Shoptet generate a new one and paste it again.
- "Webhooks didn't register" — some Shoptet tiers don't allow webhook registration. Margly will then work, but only with regular data loads (according to your tier).
- "Wrong encoding in CSV" — Margly supports UTF-8 and Windows-1250 (legacy Shoptet feeds). If the feed contains a different encoding (extremely rare), write to support.
- Wrong currency in orders — Margly takes the currency from the e-shop settings. If you have a multi-language/multi-currency e-shop, check in the Billing section that you have the correct default currency.
What's next#
After successfully connecting Shoptet we recommend connecting ad systems and external services as well — without them Margly only sees revenue, not ad returns or traffic:
- Google Ads — spend and conversions from Google advertising
- Meta Ads — Facebook and Instagram advertising
- Sklik — seznam.cz and partner network (CZ/SK, e-shop in CZK)
- Heureka — price comparison site (CZ/SK)
- Google Analytics 4 — traffic and conversion rate
- Google Search Console — organic traffic and keywords