Integrations

Connecting a Shoptet store

Three ways to connect Shoptet — authorized Margly.io add-on (recommended), API key, or 3 CSV feeds.

11 min read

Three options to connect Shoptet#

Shoptet supports three ways of integration with Margly:

  1. Authorized Margly.io add-on in the Shoptet App Marketplace (recommended) — install with one click, no manual key entry. The easiest and fastest path.
  2. API key (Private API) — instant loading, webhooks for real-time updates. Available only on the Shoptet Premium tier.
  3. 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).

The Margly.io add-on is approved and available in the Shoptet App Marketplace. It's the easiest way to connect — one-click install, no manual key entry.

  1. Open the Margly.io add-on

    Go to doplnky.shoptet.cz/margly-io, or open the Addons section in your Shoptet administration, find Margly.io and click Order add-on.

  2. Approve permissions

    Confirm read-only access to products, orders and customers. The add-on never requests write access.

  3. Done — Margly handles the rest

    Margly automatically creates an account, starts a 14-day free trial, registers webhooks for real-time data, and pulls historical data. You can then open the add-on directly from the Shoptet administration (Addon Manager → Margly) or from app.margly.io.

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.

  1. Generate a Private API token in Shoptet

    In the Shoptet administration go to Connections → Private API. Click Generate token, name it for example "Margly", and copy the generated token (it will show only once — save it).

    Also enable these endpoint groups for the token:

    Endpoint groupPermissionWhy Margly needs it
    Settingsread + writeWrite access is what registers the webhooks. Without it Margly won't receive real-time changes.
    OrdersreadRevenue, margins, shipping costs, customer return rate.
    ProductsreadPurchase prices — without them Margly can't compute margin.
    CustomersreadCustomer lifetime value and return rate.
  2. Paste the token into Margly

    If you're setting Margly up right now, you're in the registration wizard at step 3 of 3 — Integrations. If you already have an account, open Integrations → Shoptet.

    Fill in three fields:

    • Main currency — the currency you want to see all numbers in.
    • E-shop URL — your e-shop domain, for example https://www.my-eshop.com.
    • Shoptet API key — paste the token from the previous step here.

    Click Verify key. Margly verifies the token immediately against the Shoptet API and shows the verification date, the token type Private API, and your e-shop name.

  3. Margly registers webhooks

    Registration happens automatically during token verification — you do nothing yourself. Margly subscribes to:

    • order lifecycle (creation, edit, paid, cancellation)
    • product availability and stock movements
    • customer lifecycle (creation, edit)

    Below the key field you'll find the Shoptet webhooks card with a Reconnect button. You'll only need it rarely — if Shoptet ever stops sending updates. The button rotates the signature key and re-registers all events.

  4. Confirm the field mapping

    Click Continue to field mapping. The Field mapping card opens with the Orders, Products and Customers tabs and the columns Our metric, API field and Status.

    Margly prefills everything automatically — look it over and change nothing unless you have a reason to. On the first pass the whole Status column is yellow "unsaved"; that's not an error, it just means "not confirmed yet". An asterisk next to a metric means it's required.

    Click Save and confirm mapping. The statuses switch to "auto" and Margly starts pulling data.

  5. Finish registration and wait for the data

    Click Finish registration. 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.

  1. 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 tick the columns from the table below.

    Why exactly these columns? Margly can't see into your administration — it only sees what your export sends. Each column unlocks a specific calculation or recommendation. Whatever you leave out, Margly can't compute; and for some columns that's worse than silence — without visibility Margly has no idea you took an item off sale, so it keeps counting it.

    Section in Shoptet adminTickWhat it gives you in Margly
    Basic informationProduct visibility, Variant visibilityMargly can tell what you've taken off sale. Without it, hidden items creep into your stats and the AI Advisor tells you to fix products you no longer sell.
    Basic informationDescription, Short descriptionAI models (ChatGPT, Perplexity) and search engines read your product text. Margly lists items where it's missing or too short — that's why AI doesn't recommend you.
    Basic informationPage meta descriptionThe blurb shown in search results. Margly shows you products where it's missing, so Google and AI make up their own text instead.
    Basic informationManufacturerThe brand. Shopping assistants use it to classify your product and compare it with competitors.
    Basic informationDefault categoryMargly works out which categories earn money and which just tie up stock.
    PricesPurchase price, Purchase price in VAT percent, Purchase price including VAT, CurrencyWithout the purchase price we can't compute margin — not per product, not overall. This is the single most important item on the list.
    StockStock quantityStock turnover, splitting products into stars and weak performers, and dead-stock alerts — the money sitting in goods that aren't selling.
    StockEANThe barcode. Comparison sites and shopping assistants use it to match you with the same item at competitors. Without it they rank you worse, or not at all.
    ImagesProduct imagesMargly spots products with no photo. AI and comparison sites barely ever surface those.
    SetsSet itemsMargly recognises a product is already a bundle and won't suggest you build one again. Without it we guess from the name and sometimes get it wrong.

    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.

  2. 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).

  3. 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.
  • "The API token is missing required permissions (403)" — the token is restricted to endpoint groups in Shoptet and some of the ones Margly needs are missing. In Connections → Private API enable Settings (read + write), Orders, Products and Customers (read).
  • "Margly isn't loading data even though the key is verified" — you most likely didn't finish the last step. Open Integrations → Shoptet, scroll to the Field mapping card and click Save and confirm mapping. Without the confirmation the API import never starts.
  • "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:

Was this helpful?

Related articles

A human reply

Didn't find your answer?

Write to us directly — we usually reply within 24 hours on business days.

support@margly.io