Public
Read-only endpoints for the browser (embed snippet), authenticated with a publishable key.
The API is built and tested. Hosting at api.garanify.com is in preparation; until then it runs locally. Keys are available on request.
Display settings of a shop
GET /v1/public/{shop}
Key: Publishable key
Notice settings for pages without a product, for example the cart. CORS is limited to the domains of the shop.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shoprequired | path | string | Shop ID (shp_…).pattern ^shp_[A-Za-z0-9]{12}$ |
lang | query | string | Language of texts and notice. Locales such as de-AT are mapped to one of the 24 EU languages; unknown languages fall back to the default language of the shop, then English.≤ 16 chars |
Request
curl "https://api.garanify.com/v1/public/shp_4kq8Zt2mWc9x?lang=de&key=gfy_pk_4kq8Zt2mWc9x_…"import { Garanify } from '@garanify/sdk';
const garanify = new Garanify({ apiKey: 'gfy_pk_4kq8Zt2mWc9x_…' });
const settings = await garanify.public.shop({
lang: 'de'
});<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify('gfy_pk_4kq8Zt2mWc9x_…', ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$settings = $garanify->public->shop('de');import os, requests
res = requests.get(
"https://api.garanify.com/v1/public/shp_4kq8Zt2mWc9x?lang=de&key=gfy_pk_4kq8Zt2mWc9x_…",
timeout=10,
)
res.raise_for_status()
data = res.json()Try it GET /v1/public/{shop}
Response 200 application/json
{
"shop": "shp_4kq8Zt2mWc9x",
"lang": "de",
"notice": {
"enabled": true,
"placements": [
"product",
"cart",
"checkout"
],
"maxWidth": 480,
"link": false,
"title": "Gesetzliche Gewährleistung",
"image": "https://api.garanify.com/v1/render/notice?lang=de&format=png"
},
"display": {
"product": "full",
"cart": "nested"
}
} Responses
200Display settings. ·PublicShop304Not modified (ETag matches).401Key missing, invalid, expired or revoked. ·Problem403Plan, key type or origin does not allow the request. ·Problem429Too many requests. Wait `Retry-After` seconds. ·Problem
Label of a product for the browser
GET /v1/public/{shop}/products/{sku}
Key: Publishable key
What the embed snippet loads: the resolved GARAN label and the notice settings. Pass the publishable key as ?key= so that the browser sends a simple request without preflight.
Responses are cacheable (ETag, Cache-Control with stale-while-revalidate). CORS is limited to the domains of the shop.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
shoprequired | path | string | Shop ID (shp_…).pattern ^shp_[A-Za-z0-9]{12}$ |
skurequired | path | Sku | Your product ID, usually the SKU. URL-encode special characters.1–120 chars, pattern ^[^\x00-\x1f]+$ |
lang | query | string | Language of texts and notice. Locales such as de-AT are mapped to one of the 24 EU languages; unknown languages fall back to the default language of the shop, then English.≤ 16 chars |
Request
curl "https://api.garanify.com/v1/public/shp_4kq8Zt2mWc9x/products/WCR870?lang=de&key=gfy_pk_4kq8Zt2mWc9x_…"import { Garanify } from '@garanify/sdk';
const garanify = new Garanify({ apiKey: 'gfy_pk_4kq8Zt2mWc9x_…' });
const product = await garanify.public.product('WCR870', {
lang: 'de'
});<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify('gfy_pk_4kq8Zt2mWc9x_…', ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$product = $garanify->public->product('WCR870', 'de');import os, requests
res = requests.get(
"https://api.garanify.com/v1/public/shp_4kq8Zt2mWc9x/products/WCR870?lang=de&key=gfy_pk_4kq8Zt2mWc9x_…",
timeout=10,
)
res.raise_for_status()
data = res.json()Try it GET /v1/public/{shop}/products/{sku}
Response 200 application/json
{
"shop": "shp_4kq8Zt2mWc9x",
"sku": "WCR870",
"lang": "de",
"label": {
"years": 10,
"brand": "Miele",
"model": "WCR 870 WPS",
"text": "GARAN – Herstellergarantie in Jahren: 10 (Miele WCR 870 WPS)"
},
"notice": {
"enabled": true,
"placements": [
"product",
"cart",
"checkout"
],
"maxWidth": 480,
"link": false,
"title": "Gesetzliche Gewährleistung",
"image": "https://api.garanify.com/v1/render/notice?lang=de&format=png"
},
"display": {
"product": "full",
"cart": "nested"
}
} Responses
200Label and display settings. ·PublicProduct304Not modified (ETag matches).401Key missing, invalid, expired or revoked. ·Problem403Plan, key type or origin does not allow the request. ·Problem404Not found. ·Problem429Too many requests. Wait `Retry-After` seconds. ·Problem