Zum Inhalt springen
Garanify

Shops

Ein Shop ist eine Website mit Domains, Sprachen und Anzeige-Einstellungen. Jeder Schlüssel gehört zu genau einem Shop.

Die API ist gebaut und getestet. Das Hosting unter api.garanify.com ist in Vorbereitung; bis dahin läuft sie lokal. Schlüssel gibt es auf Anfrage.

Feldbeschreibungen auf Englisch, direkt aus der OpenAPI-Datei.

Schlüssel prüfen

GET /v1/me

Schlüssel: Secret Key / Publishable Key

Shop und Schlüsselart hinter dem Schlüssel. Geht mit Secret und Publishable Key.

Anfrage

curl "https://api.garanify.com/v1/me" \
  -H "Authorization: Bearer $GARANIFY_SECRET_KEY"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const me = await garanify.me();
<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify(getenv('GARANIFY_SECRET_KEY'), ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$me = $garanify->me();
import os, requests

res = requests.get(
    "https://api.garanify.com/v1/me",
    headers={"Authorization": f"Bearer {os.environ['GARANIFY_SECRET_KEY']}"},
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 200 application/json

{
  "shop": "shp_4kq8Zt2mWc9x",
  "keyId": "key_9hVb2mQx7Lp1",
  "keyType": "secret",
  "plan": "free",
  "livemode": true
}

Antworten

  • 200 Key and shop. · Me
  • 401 Key missing, invalid, expired or revoked. · Problem
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Weiteren Shop anlegen

POST /v1/shops

Schlüssel: Secret Key

Legt einen Shop im selben Konto an und gibt seinen ersten Secret und Publishable Key zurück. Die Schlüssel sehen Sie nur einmal.

Parameter

NameOrtTypBeschreibung
Idempotency-Key header string Any unique string (for example a UUID). The same key with the same body returns the stored response for 24 hours.1–255 chars

Body

NameTypBeschreibung
namePflicht string 1–120 chars
domainsPflicht Domain[] 1–20 items
defaultLanguage "bg" | "cs" | "da" | "de" | "el" | "en" | "es" | "et" | "fi" | "fr" | "ga" | "hr" | "hu" | "it" | "lt" | "lv" | "mt" | "nl" | "pl" | "pt" | "ro" | "sk" | "sl" | "sv"
languages "bg" | "cs" | "da" | "de" | "el" | "en" | "es" | "et" | "fi" | "fr" | "ga" | "hr" | "hu" | "it" | "lt" | "lv" | "mt" | "nl" | "pl" | "pt" | "ro" | "sk" | "sl" | "sv"[] 1–∞ items
settings ShopSettings
settings.notice NoticeSettings
settings.garan GaranSettings

Anfrage

curl -X POST "https://api.garanify.com/v1/shops" \
  -H "Authorization: Bearer $GARANIFY_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"name":"Second shop","domains":["second-shop.example"],"defaultLanguage":"de","languages":["de","en"]}'
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const created = await garanify.shops.create({
  name: 'Second shop',
  domains: [
    'second-shop.example'
  ],
  defaultLanguage: 'de',
  languages: [
    'de',
    'en'
  ]
});
<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify(getenv('GARANIFY_SECRET_KEY'), ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$created = $garanify->shops->create([
    'name' => 'Second shop',
    'domains' => [
        'second-shop.example',
    ],
    'defaultLanguage' => 'de',
    'languages' => [
        'de',
        'en',
    ],
]);
import os, uuid, requests

res = requests.post(
    "https://api.garanify.com/v1/shops",
    headers={"Authorization": f"Bearer {os.environ['GARANIFY_SECRET_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Second shop",
        "domains": [
            "second-shop.example",
        ],
        "defaultLanguage": "de",
        "languages": [
            "de",
            "en",
        ],
    },
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 201 application/json

{
  "shop": {
    "id": "shp_7mPq2Vx8Ns4d",
    "name": "Second shop",
    "domains": [
      "second-shop.example"
    ],
    "defaultLanguage": "de",
    "languages": [
      "de",
      "en"
    ],
    "settings": {
      "notice": {
        "enabled": true,
        "placements": [
          "product",
          "cart",
          "checkout"
        ],
        "maxWidth": 480,
        "link": false
      },
      "garan": {
        "productDisplay": "full",
        "cartDisplay": "nested"
      }
    },
    "plan": {
      "id": "free",
      "state": "none",
      "features": [
        "notice",
        "allLanguages",
        "garanManual",
        "cartDisplay"
      ],
      "garan": {
        "limit": 25,
        "used": 0,
        "remaining": 25,
        "canAdd": true
      }
    },
    "livemode": true,
    "createdAt": "2026-11-18T10:00:00Z",
    "updatedAt": "2026-11-18T10:00:00Z"
  },
  "secretKey": {
    "id": "key_2bRt6Hn9Qw3e",
    "type": "secret",
    "hint": "gfy_sk_…a1B2",
    "label": null,
    "createdAt": "2026-11-18T10:00:00Z",
    "lastUsedDay": null,
    "expiresAt": null,
    "revokedAt": null,
    "secret": "gfy_sk_EXAMPLEONLYa1B2"
  },
  "publishableKey": {
    "id": "key_5cWn1Jk4Zp8r",
    "type": "publishable",
    "hint": "gfy_pk_…c3D4",
    "label": null,
    "createdAt": "2026-11-18T10:00:00Z",
    "lastUsedDay": null,
    "expiresAt": null,
    "revokedAt": null,
    "secret": "gfy_pk_7mPq2Vx8Ns4d_EXAMPLEONLYc3D4"
  }
}

Antworten

  • 201 Shop created. · ShopCreated
  • 401 Key missing, invalid, expired or revoked. · Problem
  • 409 The request conflicts with the current state. · Problem
  • 422 The request does not match the schema. · Problem
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Shop abrufen

GET /v1/shops/{shop}

Schlüssel: Secret Key

Parameter

NameOrtTypBeschreibung
shopPflicht path string Shop ID (shp_…).pattern ^shp_[A-Za-z0-9]{12}$

Anfrage

curl "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x" \
  -H "Authorization: Bearer $GARANIFY_SECRET_KEY"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const shop = await garanify.shops.retrieve();
<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify(getenv('GARANIFY_SECRET_KEY'), ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$shop = $garanify->shops->retrieve();
import os, requests

res = requests.get(
    "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x",
    headers={"Authorization": f"Bearer {os.environ['GARANIFY_SECRET_KEY']}"},
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 200 application/json

{
  "id": "shp_4kq8Zt2mWc9x",
  "name": "Mein Shop",
  "domains": [
    "mein-shop.example"
  ],
  "defaultLanguage": "de",
  "languages": [
    "de",
    "en",
    "fr"
  ],
  "settings": {
    "notice": {
      "enabled": true,
      "placements": [
        "product",
        "cart",
        "checkout"
      ],
      "maxWidth": 480,
      "link": false
    },
    "garan": {
      "productDisplay": "full",
      "cartDisplay": "nested"
    }
  },
  "plan": {
    "id": "pro",
    "state": "active",
    "features": [
      "notice",
      "allLanguages",
      "garanManual",
      "cartDisplay",
      "garanUnlimited",
      "garanRules",
      "garanBulk"
    ],
    "garan": {
      "limit": null,
      "used": 12,
      "remaining": null,
      "canAdd": true
    }
  },
  "livemode": true,
  "createdAt": "2026-11-18T10:00:00Z",
  "updatedAt": "2026-11-18T10:05:00Z"
}

Antworten

  • 200 The shop. · Shop
  • 401 Key missing, invalid, expired or revoked. · Problem
  • 404 Not found. · Problem
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Shop ändern

PATCH /v1/shops/{shop}

Schlüssel: Secret Key

Ändert Name, Domains, Sprachen oder Anzeige-Einstellungen. Weggelassene Felder bleiben. Solange eine Lizenz verknüpft ist, bleibt die erste Domain (Hauptdomain) fest.

Parameter

NameOrtTypBeschreibung
shopPflicht path string Shop ID (shp_…).pattern ^shp_[A-Za-z0-9]{12}$

Body

NameTypBeschreibung
name string 1–120 chars
domains Domain[] 1–20 items
defaultLanguage "bg" | "cs" | "da" | "de" | "el" | "en" | "es" | "et" | "fi" | "fr" | "ga" | "hr" | "hu" | "it" | "lt" | "lv" | "mt" | "nl" | "pl" | "pt" | "ro" | "sk" | "sl" | "sv"
languages "bg" | "cs" | "da" | "de" | "el" | "en" | "es" | "et" | "fi" | "fr" | "ga" | "hr" | "hu" | "it" | "lt" | "lv" | "mt" | "nl" | "pl" | "pt" | "ro" | "sk" | "sl" | "sv"[] 1–∞ items
settings ShopSettings
settings.notice NoticeSettings
settings.garan GaranSettings

Anfrage

curl -X PATCH "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x" \
  -H "Authorization: Bearer $GARANIFY_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domains":["mein-shop.example","shop.mein-shop.example"],"languages":["de","en","fr"],"settings":{"notice":{"maxWidth":520}}}'
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const shop = await garanify.shops.update({
  domains: [
    'mein-shop.example',
    'shop.mein-shop.example'
  ],
  languages: [
    'de',
    'en',
    'fr'
  ],
  settings: {
    notice: {
      maxWidth: 520
    }
  }
});
<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify(getenv('GARANIFY_SECRET_KEY'), ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$shop = $garanify->shops->update([
    'domains' => [
        'mein-shop.example',
        'shop.mein-shop.example',
    ],
    'languages' => [
        'de',
        'en',
        'fr',
    ],
    'settings' => [
        'notice' => [
            'maxWidth' => 520,
        ],
    ],
]);
import os, requests

res = requests.patch(
    "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x",
    headers={"Authorization": f"Bearer {os.environ['GARANIFY_SECRET_KEY']}"},
    json={
        "domains": [
            "mein-shop.example",
            "shop.mein-shop.example",
        ],
        "languages": [
            "de",
            "en",
            "fr",
        ],
        "settings": {
            "notice": {
                "maxWidth": 520,
            },
        },
    },
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antworten

  • 200 The updated shop. · Shop
  • 401 Key missing, invalid, expired or revoked. · Problem
  • 404 Not found. · Problem
  • 409 The request conflicts with the current state. · Problem
  • 422 The request does not match the schema. · Problem
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Tarif abrufen

GET /v1/shops/{shop}/license

Schlüssel: Secret Key

Tarif und Lizenzstand. Ohne Lizenz läuft der Shop mit Free.

Parameter

NameOrtTypBeschreibung
shopPflicht path string Shop ID (shp_…).pattern ^shp_[A-Za-z0-9]{12}$

Anfrage

curl "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x/license" \
  -H "Authorization: Bearer $GARANIFY_SECRET_KEY"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const plan = await garanify.license.retrieve();
<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify(getenv('GARANIFY_SECRET_KEY'), ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$plan = $garanify->license->retrieve();
import os, requests

res = requests.get(
    "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x/license",
    headers={"Authorization": f"Bearer {os.environ['GARANIFY_SECRET_KEY']}"},
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 200 application/json

{
  "id": "free",
  "state": "none",
  "features": [
    "notice",
    "allLanguages",
    "garanManual",
    "cartDisplay"
  ],
  "garan": {
    "limit": 25,
    "used": 3,
    "remaining": 22,
    "canAdd": true
  }
}

Antworten

  • 200 Plan. · Plan
  • 401 Key missing, invalid, expired or revoked. · Problem
  • 404 Not found. · Problem
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Export evidence (CSV)

GET /v1/shops/{shop}/evidence

Schlüssel: Secret Key

Parameter

NameOrtTypBeschreibung
shopPflicht path string Shop ID (shp_…).pattern ^shp_[A-Za-z0-9]{12}$

Anfrage

curl "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x/evidence" \
  -H "Authorization: Bearer $GARANIFY_SECRET_KEY"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const csv = await garanify.evidence.export();
<?php
// composer require garanify/sdk guzzlehttp/guzzle
$factory = new GuzzleHttp\Psr7\HttpFactory();
$garanify = new Garanify\Garanify(getenv('GARANIFY_SECRET_KEY'), ['httpClient' => new GuzzleHttp\Client(), 'requestFactory' => $factory, 'streamFactory' => $factory]);
$csv = $garanify->evidence->export();
import os, requests

res = requests.get(
    "https://api.garanify.com/v1/shops/shp_4kq8Zt2mWc9x/evidence",
    headers={"Authorization": f"Bearer {os.environ['GARANIFY_SECRET_KEY']}"},
    timeout=10,
)
res.raise_for_status()

Antwort 200 text/csv

record,id,sku,name,brand,model,years,source,status,reason,language,placements,active_since,exported_at
notice,,,Legal guarantee,,,,,active,,en,product cart checkout,2026-11-18T10:00:00Z,2026-11-23T10:41:00Z
garan,WCR870,WCR870,Washing machine W1,Miele,WCR 870 WPS,10,product,active,,,,,2026-11-23T10:41:00Z

Antworten

  • 200 The CSV file.
  • 401 Key missing, invalid, expired or revoked. · Problem
  • 403 Plan, key type or origin does not allow the request. · Problem
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Weiter: Schlüssel