Skip to content

Integrations and API

Check texts from your own system, Zapier or Make. The API uses our rules (no AI, so no cost per scan) and returns the findings as JSON. After each scan the result can go to your own address (webhook).

1. Create an API key

Go to your settings and create a key. You see it once; keep it safe and never put it in your website code.

To settings

2. Send a text

POST to /api/v1/scan with your key in the Authorization header.

tekst
required, max 20,000 characters
titel
optional, product name
stoffen
optional, list of substances (e.g. ["Vitamine C"])
dosering
optional, e.g. "500 mg per day"
curl
curl -X POST https://sellegally.com/api/v1/scan \
  -H "Authorization: Bearer sg_JOUW_SLEUTEL" \
  -H "Content-Type: application/json" \
  -d '{"titel":"VitaFictie Vitamine C 500","tekst":"Versterkt je weerstand en beschermt tegen verkoudheid.","stoffen":["Vitamine C"]}'
JavaScript
const r = await fetch('https://sellegally.com/api/v1/scan', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.SELLEGALLY_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({ titel: 'VitaFictie Vitamine C 500', tekst: productTekst, stoffen: ['Vitamine C'] }),
});
const uitkomst = await r.json();
console.log(uitkomst.aantal, uitkomst.bevindingen);
Python
import json, os, urllib.request

req = urllib.request.Request('https://sellegally.com/api/v1/scan', method='POST',
    headers={'Authorization': 'Bearer ' + os.environ['SELLEGALLY_API_KEY'], 'Content-Type': 'application/json'},
    data=json.dumps({'titel': 'VitaFictie Vitamine C 500', 'tekst': product_tekst}).encode())
uitkomst = json.load(urllib.request.urlopen(req))
print(uitkomst['aantal'])
Response
{
  "titel": "VitaFictie Vitamine C 500",
  "aantal": 1,
  "bevindingen": [
    {
      "zin": "Versterkt je weerstand en beschermt tegen verkoudheid.",
      "ernst": "hoog",
      "zeker": true,
      "uitleg": "...",
      "veilige_versie": "Vitamine C draagt bij tot de normale werking van het immuunsysteem.",
      "wetsbron": "...",
      "regel": "..."
    }
  ],
  "controle": "regels (zonder AI)",
  "let_op": "Automatische indicatie, geen juridisch advies. Laat twijfelgevallen nakijken."
}

3. Webhook (optional)

Set an https address in your settings. After each API scan we send { gebeurtenis: "scan.klaar", tijd, data } with the header X-Sellegally-Handtekening (HMAC-SHA256 of the body with your webhook secret). Verify it like this:

Node.js
import crypto from 'crypto';
// body = de ruwe tekst van het verzoek, geheim = je webhookgeheim (whsec_...)
const verwacht = 'sha256=' + crypto.createHmac('sha256', geheim).update(body).digest('hex');
const klopt = crypto.timingSafeEqual(Buffer.from(verwacht), Buffer.from(req.headers['x-sellegally-handtekening'] ?? ''));

Zapier

  1. Create a Zap with the "Webhooks by Zapier" step, action POST.
  2. URL: the scan URL below. Payload: JSON. Data: tekst = the field from your previous step.
  3. Headers: Authorization = Bearer + your key.
  4. Result back in Zapier? Use "Catch Hook" and set that address as the webhook in your settings.

Make

  1. Add the HTTP module, "Make a request". Method POST, JSON body.
  2. Header Authorization = Bearer + your key. Turn on "Parse response".
  3. Receive results: module "Webhooks, Custom webhook" and set that address as your webhook.

Test your key

GET /api/v1/ik returns { ok: true } when your key works (useful as a connection test).

curl
curl https://sellegally.com/api/v1/ik -H "Authorization: Bearer sg_JOUW_SLEUTEL"

Limits

  • 20 requests per hour per key; then 429.
  • Up to 5 active keys per account.
  • Rules only, no AI. The result is an automatic indication, not legal advice.
  • Errors: 400 (missing or invalid JSON), 401 (key), 413 (too long), 429 (too many).

Which web shop and marketplace integrations we are looking into is on our roadmap. Want one? Let us know.