Embed & API

One global script enables both the harmonised legal guarantee notice and automatic GARAN badges. Free, cookie-free, no tracking, no external dependencies, and fail-safe: if our API is unreachable, your shop is never affected.

1. Install the script (once, site-wide)

<script src="https://garan.ro/embed/garan.js" defer></script>

2. Legal guarantee notice link

Add a link anywhere (header, footer, product page, checkout). On click, the official harmonised notice opens in an accessible modal, in the language of the page (<html lang>) or of the data-lang attribute.

<a href="#garantieEu">Your legal guarantee rights</a> <!-- or with an explicit language --> <a href="#garantieEu" data-lang="ro">Drepturile tale privind garanția legală</a>

Also supported: class="garan-notice-link" on any element, and automatic insertion into the CSS selectors you configure in your free account (colours, font, background, border and icon are customisable per site).

3. GARAN badge on product pages

Automatic lookup: test phase. Automatic detection is still being tested. The badge appears only if a guarantee for that exact product is registered and verified in the GARAN database (your warranties or the public labels); otherwise nothing is shown. Check it on one of your product pages before using it everywhere, and help by publishing your labels in the public directory. For a predictable result today, use the direct mode below (data-years).

Place an empty element with the product data. If a verified commercial guarantee of durability exists in the GARAN database, the nested label is displayed; the full label opens on the first click, roll-over or tap. If there is no eligible guarantee, nothing is rendered.

<div class="garan-badge" data-brand="Bosch" data-identifier="WGG244Z0BY" data-country="RO"></div>

data-identifier: the product code exactly as on the label: the producer’s model code (e.g. WGG244Z0BY) or the EAN barcode.
data-country: ISO code (RO, DE, …). Leave empty for EU-wide guarantees.
data-mode: latest (default: latest verified version) or pinned + data-version="3" for a fixed label version.

Direct mode: pass the duration yourself

If you do not want a database lookup, pass the duration directly with data-years. The nested label for that duration is shown immediately from a static SVG. data-brand and data-identifier are required: they are printed on the full label that opens on interaction, which must identify the product.

<div class="garan-badge" data-years="5" data-brand="Bosch" data-identifier="WGG244Z0BY" data-url="https://shop.example.com/produs"></div> <!-- half years use a comma: data-years="2,5" -->

The nested SVG lives at a stable URL (/labels/nested-5.svg, /labels/nested-2_5.svg …) and is generated once, then served statically — perfect for CDNs.

See the live demo page ↗

4. Lookup API

GET https://garan.ro/api/embed/lookup?brand=Bosch&identifier=WGG244Z0BY&identifier_type=model&country=RO Positive response: { "found": true, "status": "source_backed", "duration_years": 5, "version": 1, "nested_svg_url": "https://garan.ro/labels/….svg", "full_svg_url": "https://garan.ro/labels/….svg", "qr_url": "https://europa.eu/youreurope/commercial-guarantee-durability/index.htm", "product_url": "https://…" } Negative response: { "found": false }

Responses are cacheable (Cache-Control) and label SVGs are immutable static files served without touching PHP — CDN friendly.

Principles

✔ Free, no account required for the notice and the generator
✔ No cookies, no ads, no aggressive tracking — only anonymous, aggregated lookup counters
✔ Labels generated exclusively from the official EU templates; only the permitted fields are edited
✔ The full label is always reachable from the nested label at the first relevant interaction