Zum Inhalt springen
Garanify

Meta

Sprachen, Module und Statusprüfung.

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.

Statusprüfung

GET /health

Schlüssel: keiner

Anfrage

curl "https://api.garanify.com/health"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const health = await garanify.meta.health();
<?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]);
$health = $garanify->meta->health();
import os, requests

res = requests.get(
    "https://api.garanify.com/health",
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 200 application/json

{
  "ok": true,
  "version": "1.0.0"
}

Antworten

  • 200 Service is up. · Health
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Sprachen auflisten

GET /v1/languages

Schlüssel: keiner

Die 24 EU-Amtssprachen der Mitteilung mit offiziellem Titel und GARAN-Begriff.

Anfrage

curl "https://api.garanify.com/v1/languages"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const languages = await garanify.meta.languages();
<?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]);
$languages = $garanify->meta->languages();
import os, requests

res = requests.get(
    "https://api.garanify.com/v1/languages",
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 200 application/json

{
  "data": [
    {
      "code": "de",
      "noticeTitle": "Gesetzliche Gewährleistung",
      "garanTerm": "Herstellergarantie in Jahren"
    },
    {
      "code": "en",
      "noticeTitle": "Legal guarantee",
      "garanTerm": "Producer guarantee in years"
    }
  ]
}

Antworten

  • 200 All languages. · LanguageList
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem

Module auflisten

GET /v1/modules

Schlüssel: keiner

Compliance-Module. Heute ist nur guarantee (Mitteilung und GARAN-Etikett) verfügbar. Neue Module bekommen eigene Pfade unter /v1/shops/{shop}/modules/{module}/….

Anfrage

curl "https://api.garanify.com/v1/modules"
import { Garanify } from '@garanify/sdk';

const garanify = new Garanify({ apiKey: process.env.GARANIFY_SECRET_KEY });
const modules = await garanify.meta.modules();
<?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]);
$modules = $garanify->meta->modules();
import os, requests

res = requests.get(
    "https://api.garanify.com/v1/modules",
    timeout=10,
)
res.raise_for_status()
data = res.json()

Antwort 200 application/json

{
  "data": [
    {
      "id": "guarantee",
      "status": "available",
      "title": "Legal guarantee notice and GARAN label"
    },
    {
      "id": "gpsr",
      "status": "planned",
      "title": "Manufacturer information (GPSR)"
    }
  ]
}

Antworten

  • 200 All modules. · ModuleList
  • 429 Too many requests. Wait `Retry-After` seconds. · Problem