Start a review and wait for review.ready
Start a website review, get told when it is done, read the findings and download the report.
15 minScope: reviewsWhat you get
- A review started safely (a retry never starts a second one).
- The result: recommendation, findings with their verbatim quotes, the fix list and the KYC items.
- The sealed report PDF on your letterhead.
Start the review
Send the merchant's
merchant_id(or awebsite: Kvali reuses the merchant with that website, or creates one; a new merchant needs its tax ID inregistry_idsince API 2.0.0, or the call is refused with422). Always send anIdempotency-Key: if the call times out and you retry with the same key, Kvali answers the first answer again and starts nothing twice. The answer is202at once; the review runs in the background, about a minute and a half.curl -X POST "https://aikvali.com/api/v1/reviews" \ -H "Authorization: Bearer $KVALI_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"merchant_id":"3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10","kind":"onboarding"}'const res = await fetch("https://aikvali.com/api/v1/reviews", { method: "POST", headers: { Authorization: `Bearer ${process.env.KVALI_KEY}`, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() }, body: JSON.stringify({ "merchant_id": "3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10", "kind": "onboarding" }), }); if (!res.ok) throw new Error((await res.json()).error.message); const { data } = await res.json();import os, uuid import requests res = requests.post( "https://aikvali.com/api/v1/reviews", headers={"Authorization": f"Bearer {os.environ['KVALI_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, json={ "merchant_id": "3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10", "kind": "onboarding", }, timeout=30, ) if not res.ok: raise RuntimeError(res.json()["error"]["message"]) data = res.json()["data"]{ "data": { "id": "3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10", "created_at": "2026-10-22T09:30:00Z", "merchant_id": "3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10", "website": "https://shop.ge/", "kind": "onboarding", "status": "queued", "declared_mcc": "5732", "detected_mcc": null, "recommendation": null, "confidence": null, "decision": null, "pages_read": 0, "rulebook_version": 3, "started_at": null, "finished_at": null, "error": null, "link": "https://kvali.example/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10" }, "warnings": [] }Wait for review.ready
Best: subscribe to the
review.readywebhook (andreview.failed) in Settings → API → Webhooks. Itsdata.review.idis the review to read. Without a receiver, pollGET /reviews/{id}every 10 seconds untilstatusisreadyorfailed.const BASE = "https://aikvali.com/api/v1"; const headers = { Authorization: "Bearer " + process.env.KVALI_KEY }; async function waitForReview(id) { for (;;) { const res = await fetch(BASE + "/reviews/" + id, { headers }); const { data } = await res.json(); if (data.status === "ready" || data.status === "decided") return data; if (data.status === "failed") throw new Error(data.error); await new Promise((r) => setTimeout(r, 10_000)); } }import os, time import requests BASE = "https://aikvali.com/api/v1" HEADERS = {"Authorization": f"Bearer {os.environ['KVALI_KEY']}"} def wait_for_review(review_id): while True: data = requests.get(f"{BASE}/reviews/{review_id}", headers=HEADERS, timeout=30).json()["data"] if data["status"] in ("ready", "decided"): return data if data["status"] == "failed": raise RuntimeError(data["error"]) time.sleep(10){ "id": "<delivery id>", "event": "review.ready", "created_at": "2026-11-08T09:30:00Z", "data": { "review": { "id": "3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10", "status": "ready", "recommendation": "conditional", "findings": 3 } } }Read the result
GET /reviews/{id}returns Kvali'srecommendationandconfidence, and each finding with itsseverity, the verbatimquoteand thepage_urlit was found on.fix_listis what the merchant should change andkyc_itemswhat to ask the merchant for; addlang=kaorlang=rufor those two in Georgian or Russian. The decision itself is a person's, in Kvali: you learn it fromreview.decided.curl "https://aikvali.com/api/v1/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10?lang=en" \ -H "Authorization: Bearer $KVALI_KEY"const res = await fetch("https://aikvali.com/api/v1/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10?lang=en", { headers: { Authorization: "Bearer " + process.env.KVALI_KEY }, }); const { data: review } = await res.json(); console.log(review.recommendation, review.confidence); for (const f of review.findings) console.log(f.severity, f.title, '"' + f.quote + '"', f.page_url); for (const fix of review.fix_list) console.log("fix:", fix.text); for (const item of review.kyc_items) console.log("ask for:", item.text);import os import requests review = requests.get( "https://aikvali.com/api/v1/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10?lang=en", headers={"Authorization": f"Bearer {os.environ['KVALI_KEY']}"}, timeout=30, ).json()["data"] print(review["recommendation"], review["confidence"]) for f in review["findings"]: print(f["severity"], f["title"], f["quote"], f["page_url"]) for fix in review["fix_list"]: print("fix:", fix["text"]) for item in review["kyc_items"]: print("ask for:", item["text"])Download the report PDF
POST /reviews/{id}/reportissues the review report as a sealed PDF, the same file as "Download PDF" in Kvali. Each call issues a numbered record, so send anIdempotency-Key. The PDF comes base64 inpdf_base64; anyone can check it atverify_url.409means the review isn't finished yet.curl -X POST "https://aikvali.com/api/v1/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10/report" \ -H "Authorization: Bearer $KVALI_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{"lang":"en"}' \ | jq -r .data.pdf_base64 | base64 --decode > report.pdfimport { writeFile } from "node:fs/promises"; const res = await fetch("https://aikvali.com/api/v1/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10/report", { method: "POST", headers: { Authorization: "Bearer " + process.env.KVALI_KEY, "Content-Type": "application/json", "Idempotency-Key": crypto.randomUUID() }, body: JSON.stringify({ lang: "en" }), }); const { data } = await res.json(); await writeFile(data.file_name ?? "report.pdf", Buffer.from(data.pdf_base64, "base64")); console.log(data.record_id, data.verify_url);import base64, os, uuid import requests res = requests.post( "https://aikvali.com/api/v1/reviews/3f0c2a52-6a1e-4c1b-9d55-2f7f5b1e9a10/report", headers={"Authorization": f"Bearer {os.environ['KVALI_KEY']}", "Idempotency-Key": str(uuid.uuid4())}, json={"lang": "en"}, timeout=60, ) data = res.json()["data"] with open(data.get("file_name") or "report.pdf", "wb") as f: f.write(base64.b64decode(data["pdf_base64"])) print(data["record_id"], data["verify_url"])