SK

SmartBox statistics API

Everything Ragnetiq SmartBox records about your customers' questions and orders in your online store, as JSON over HTTPS.

Introduction

The API returns your store's SmartBox statistics: what you see in the dashboard at smartbox.ragnetiq.com, plus every single customer question, every SmartBox answer and every order attributed to SmartBox. The data is yours: load it into your own reporting, data warehouse or BI tool.

The base URL is https://smartbox.ragnetiq.com/api/stats/v1. All responses are JSON in UTF-8; record times are ISO 8601 in UTC. Requests are GET only; the API changes nothing.

  • A key covers whole stores or only selected markets (language versions, for example a store's Slovak and Czech domains), as agreed with us.
  • You choose the period with from and to, at most 366 days at a time. Days are counted in the Europe/Bratislava time zone, the same as in the dashboard.
  • The aggregated reports (/summary, /products) are the same numbers as in the dashboard; the raw data (/events, /orders) contains everything that was recorded.
  • We keep no personal data of your customers: visitor and session identifiers are random, and e-mail addresses and phone numbers in questions and answers are replaced with [e-mail] and [telefón].

Authentication

Ragnetiq issues your key. It is sb_ followed by 64 hexadecimal characters. Send it in the Authorization header with every request:

Authorization: Bearer sb_9f2c1a7e…

The key is as secret as a password. Use it from a server only (cron, backend, ETL), never in a browser or a mobile app. If it leaks, tell us: we revoke the old key and issue a new one; a revoked key stops working at once.

A missing, invalid or revoked key gets 401 unauthorized. A key without access to the requested store or market gets 403 forbidden.

The rules shared by all Ragnetiq APIs (keys, paging, limits, errors, versions) are also on one page: API basics.

Common parameters and rules

Query parameters

ParameterValueMeaning
shopstore id, optionalLimits the data to one or more stores: ?shop=a, ?shop=a&shop=b or ?shop=a,b. Without it you get all of the key's stores together. Ids are listed by /shops.
marketmarket domain, optionalLimits the data to one or more language versions: ?market=demo-shop.cz. Market domains are listed by /shops. Can be combined with shop.
fromYYYY-MM-DD, optionalFirst day of the period (inclusive). Defaults to 29 days before to.
toYYYY-MM-DD, optionalLast day of the period (inclusive). Defaults to today. At most 366 days.
after, limitintegersPaging of the raw data, see below.

A day runs from midnight to midnight in Bratislava (Europe/Bratislava), as in the dashboard; every response states it in the timezone field. Revenue in different currencies is never added up; it is split by currency.

Paging

/events and /orders return at most 1,000 records at a time, oldest first. The response contains next: the id of the page's last record, or null when there is no further page. Ask for the next page with after=<next>. limit sets the page size (1 – 1,000, default 1,000).

Record ids are stable and grow over time, so after also works for incremental downloads: remember the last id and start from it next time.

Limits

  • At most 120 requests per minute per key; above that you get 429 rate_limited.
  • At most 366 days per request; download longer history in parts.
  • Data is available within seconds, so today's numbers keep changing. For closed numbers, download yesterday and earlier.

Errors

An error response always has the same shape: an HTTP status code, error with a machine-readable code and message with an explanation.

HTTP/1.1 403 Forbidden
Content-Type: application/json; charset=utf-8

{ "error": "forbidden", "message": "Kľúč nemá prístup k trhu demo-shop.cz." }
HTTPerrorWhen
400invalid_periodfrom/to are not dates, to is before from, or the period exceeds 366 days.
400invalid_shop, invalid_market, invalid_paramMalformed shop, market, after, limit or kind, or a market that does not belong to the selected stores.
401unauthorizedMissing, invalid or revoked key.
403forbiddenThe key does not cover one of the stores in shop or markets in market.
429rate_limitedMore than 120 requests per minute. Wait and retry.
502, 503upstream, unavailableA temporary outage on our side. Retry later.

Error messages are in Slovak; rely on the error code.

Stores and markets

GET/api/stats/v1/shops

The stores and markets the key can read. Use a store's id in shop and a market's website in market; both also appear on every raw record (shop, market).

curl "https://smartbox.ragnetiq.com/api/stats/v1/shops" \
  -H "Authorization: Bearer sb_YOUR_KEY"
Response
{
  "shops": [
    {
      "id": "demo-shop",
      "name": "Demo Shop",
      "platform": "upgates",
      "access": "shop",
      "markets": [
        { "website": "demo-shop.sk", "language": "sk", "currency": "EUR" },
        { "website": "demo-shop.cz", "language": "cs", "currency": "CZK" }
      ]
    }
  ]
}
FieldTypeMeaning
id, nametextStore id and name.
platformtextThe store's platform (upgates, shoptet, eshop_rychle, custom).
accesstextshop = the key covers the whole store, including markets added later; markets = only the markets listed in markets.
marketsarrayMarkets (language versions) the key can read: website (the market's domain), language, currency. A store with one domain has one market.

Summary

GET/api/stats/v1/summary

The dashboard's numbers: totals for the period, the same for the equally long previous period (for comparison), values per day, the funnel from question to order, a split by market and the most clicked suggested questions.

curl "https://smartbox.ragnetiq.com/api/stats/v1/summary?shop=demo-shop&from=2026-10-01&to=2026-10-15" \
  -H "Authorization: Bearer sb_YOUR_KEY"
Response (shortened)
{
  "shops": ["demo-shop"],
  "markets": null,
  "from": "2026-10-01",
  "to": "2026-10-15",
  "timezone": "Europe/Bratislava",
  "totals": {
    "users": 805,
    "interactions": 1714,
    "chip_clicks": 1623,
    "custom_inputs": 91,
    "answers": 1702,
    "products": 383,
    "returning_users": 412,
    "custom_users": 74,
    "orders": 139,
    "direct_orders": 100,
    "assisted_orders": 39,
    "converted_users": 137,
    "user_conversion_rate": 0.1702,
    "direct_conversion_rate": 0.1242,
    "revenue": [
      { "currency": "EUR", "total": 5314.2, "direct": 4102.9, "orders": 112, "avg_order": 47.45 },
      { "currency": "CZK", "total": 27838, "direct": 21390, "orders": 27, "avg_order": 1031.04 }
    ]
  },
  "previous": { "from": "2026-09-16", "to": "2026-09-30", "users": 731, "…": "…" },
  "daily": [
    { "day": "2026-10-01", "users": 54, "interactions": 117, "direct_orders": 7, "assisted_orders": 2 },
    { "day": "2026-10-02", "users": 49, "interactions": 98, "direct_orders": 5, "assisted_orders": 3 }
  ],
  "funnel": { "users": 805, "answered": 798, "ordered": 136, "direct": 99 },
  "markets": [
    { "market": "demo-shop.cz", "users": 160, "interactions": 331, "custom_inputs": 17, "orders": 27, "direct_orders": 19,
      "conversion_rate": 0.1625, "currency": "CZK", "revenue": 27838, "avg_order": 1031.04 },
    { "market": "demo-shop.sk", "users": 645, "interactions": 1383, "custom_inputs": 74, "orders": 112, "direct_orders": 81,
      "conversion_rate": 0.1721, "currency": "EUR", "revenue": 5314.2, "avg_order": 47.45 }
  ],
  "top_questions": [
    { "question": "Ako sa používa?", "clicks": 412 },
    { "question": "Je vhodný pre deti?", "clicks": 198 }
  ]
}

totals and previous

FieldTypeMeaning
usersnumberDistinct visitors who clicked a question in SmartBox or wrote their own.
interactionsnumberAll questions: chip_clicks (suggested question clicked) + custom_inputs (own question).
answersnumberAnswers SmartBox generated.
productsnumberDistinct products customers asked about.
returning_usersnumberVisitors with 2 or more questions.
custom_usersnumberVisitors who asked at least one question of their own.
ordersnumberOrders attributed to SmartBox: in the same browser, the customer used SmartBox within 30 days before ordering. Each order counts once.
direct_ordersnumberDirect orders: the customer ordered a product they asked about.
assisted_ordersnumberAssisted orders: after using SmartBox they ordered a different product.
converted_usersnumberSmartBox visitors who ordered.
user_conversion_rate, direct_conversion_ratenumber 0 – 1converted_users / users, and the share of visitors with a direct order.
revenuearrayOrder value per currency: currency, total, direct (from direct orders), orders, avg_order.

previous has the same fields plus from and to of the previous period.

daily

One record for every day of the period (zeros included): day (YYYY-MM-DD), users, interactions, direct_orders, assisted_orders.

funnel

Visitors: users used SmartBox → answered got an answer → ordered of those ordered → direct ordered a product they asked about.

markets

The same per market (domain): market, users, interactions, custom_inputs, orders, direct_orders, conversion_rate, currency, revenue, avg_order.

top_questions

Up to 50 suggested questions with the most clicks: question, clicks.

Products

GET/api/stats/v1/products

Up to 100 products customers asked about in SmartBox, sorted by the number of questions.

curl "https://smartbox.ragnetiq.com/api/stats/v1/products?market=demo-shop.sk" \
  -H "Authorization: Bearer sb_YOUR_KEY"
Response (shortened)
{
  "shops": null,
  "markets": ["demo-shop.sk"],
  "from": "2026-09-16",
  "to": "2026-10-15",
  "timezone": "Europe/Bratislava",
  "products": [
    { "product_id": "1042", "market": "demo-shop.sk", "name": "Bylinný čaj 100 g", "interactions": 96, "chip_clicks": 90,
      "custom_inputs": 6, "users": 51, "ordered_users": 11, "conversion_rate": 0.2157 }
  ]
}
FieldTypeMeaning
product_idtextThe product's identifier in your platform (id or code), so you can join it with your catalogue.
markettextThe market where the product was first asked about in the period.
nametextProduct name (without the variant).
interactions, chip_clicks, custom_inputsnumberQuestions about the product, of which suggested and own.
usersnumberDistinct visitors who asked about the product.
ordered_users, conversion_ratenumberHow many of them ordered this product (direct order), and their share of users.

Questions and answers (raw data)

GET/api/stats/v1/events

Every recorded SmartBox interaction, oldest first, in pages: a suggested question clicked, an own question, and SmartBox's answer. Everything the aggregated reports count can be derived from here and from /orders.

ParameterValueMeaning
kindchip, custom, answerOptionally only one kind of record.
afternumberThe last id of the previous page (next). Default 0.
limit1 – 1000Page size. Default 1,000.
curl "https://smartbox.ragnetiq.com/api/stats/v1/events?from=2026-10-01&to=2026-10-15&kind=custom&limit=500" \
  -H "Authorization: Bearer sb_YOUR_KEY"
Response (shortened)
{
  "shops": null,
  "markets": null,
  "from": "2026-10-01",
  "to": "2026-10-15",
  "timezone": "Europe/Bratislava",
  "kind": null,
  "items": [
    {
      "id": 48213,
      "shop": "demo-shop",
      "market": "demo-shop.sk",
      "occurred_at": "2026-10-14T08:21:36.412Z",
      "kind": "chip",
      "visitor_id": "6f1c2d5e-…",
      "session_id": "9a7b3e10-…",
      "product_id": "1042",
      "product_code": "CAJ-100",
      "product_name": "Bylinný čaj 100 g",
      "product_url": "https://demo-shop.sk/bylinny-caj-100-g",
      "question": "Ako sa pripravuje?",
      "answer": null,
      "language": "sk",
      "integration": "standalone_script"
    },
    {
      "id": 48214,
      "shop": "demo-shop",
      "market": "demo-shop.sk",
      "occurred_at": "2026-10-14T08:21:39.907Z",
      "kind": "answer",
      "visitor_id": "6f1c2d5e-…",
      "session_id": "9a7b3e10-…",
      "product_id": "1042",
      "product_code": "CAJ-100",
      "product_name": "Bylinný čaj 100 g",
      "product_url": "https://demo-shop.sk/bylinny-caj-100-g",
      "question": "Ako sa pripravuje?",
      "answer": "Jednu lyžičku zalejte 250 ml vody s teplotou 95 °C a nechajte lúhovať 5 až 7 minút.",
      "language": "sk",
      "integration": "standalone_script"
    }
  ],
  "next": null
}

Record fields

FieldTypeMeaning
idnumberStable, increasing record id; used for paging.
shop, markettextStore id and market domain.
occurred_attimeWhen it happened (UTC).
kindtextchip suggested question clicked, custom the customer's own question, answer SmartBox's answer.
visitor_idtext | nullRandom browser identifier (long-lived). Not a person.
session_idtext | nullRandom visit identifier.
product_id, product_code, product_name, product_urltext | nullThe product the customer asked about.
questiontext | nullThe question; e-mail addresses and phone numbers are replaced with [e-mail] and [telefón].
answertext | nullSmartBox's answer (with kind=answer), also without personal data.
languagetext | nullAnswer language (sk, cs, …).
integrationtext | nullHow SmartBox is embedded in the store (for example standalone_script, upgates_addon).

Orders (raw data)

GET/api/stats/v1/orders

Orders attributed to SmartBox, oldest first, in pages (after, limit as with /events). Each order appears once.

curl "https://smartbox.ragnetiq.com/api/stats/v1/orders?from=2026-10-01&to=2026-10-15" \
  -H "Authorization: Bearer sb_YOUR_KEY"
Response (shortened)
{
  "shops": null,
  "markets": null,
  "from": "2026-10-01",
  "to": "2026-10-15",
  "timezone": "Europe/Bratislava",
  "items": [
    {
      "id": 931,
      "shop": "demo-shop",
      "market": "demo-shop.sk",
      "occurred_at": "2026-10-14T09:02:11.055Z",
      "order_id": "2026001234",
      "attribution": "direct",
      "value": 42.9,
      "currency": "EUR",
      "items": [{ "sku": "1042", "name": "Bylinný čaj 100 g", "quantity": 2 }],
      "matched_count": 1,
      "ordered_items_count": 3,
      "interactions_count": 4,
      "attribution_window_days": 30,
      "visitor_id": "6f1c2d5e-…",
      "session_id": "9a7b3e10-…",
      "integration": "standalone_script"
    }
  ],
  "next": null
}
FieldTypeMeaning
idnumberStable, increasing record id; used for paging.
shop, markettextStore id and market domain.
occurred_attimeWhen the order was recorded (UTC).
order_idtextThe order number in your store.
attributiontextdirect = the customer ordered a product they asked about; assisted = after using SmartBox they ordered a different product.
value, currencynumber | null, text | nullOrder value and its currency.
itemsarrayOrdered products the customer asked about: [{ sku, name, quantity }].
matched_count, ordered_items_countnumber | nullHow many such products, and how many items the order has in total.
interactions_countnumber | nullHow many questions the customer asked before ordering.
attribution_window_daysnumber | nullAttribution window in days (30 by default).
visitor_id, session_idtext | nullThe same identifiers as in /events: they link the order with the questions.
integrationtext | nullHow SmartBox is embedded in the store.

Examples

Suggested routine: once a day (in the morning, say) download /summary for yesterday for daily reports, and /events + /orders incrementally from the last id you processed. Keep the key in an environment variable, not in code.

Node.js 18+ (fetch)
const BASE = "https://smartbox.ragnetiq.com/api/stats/v1";
const headers = { Authorization: `Bearer ${process.env.SMARTBOX_API_KEY}` };

async function get(path, params = {}) {
  const url = new URL(BASE + path);
  for (const [k, v] of Object.entries(params)) if (v != null) url.searchParams.set(k, String(v));
  const res = await fetch(url, { headers });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return res.json();
}

// summary for September
const summary = await get("/summary", { from: "2026-09-01", to: "2026-09-30" });
console.log(summary.totals.users, summary.totals.orders);

// all questions and answers, page by page
let after = 0;
do {
  const page = await get("/events", { from: "2026-09-01", to: "2026-09-30", after, limit: 1000 });
  for (const e of page.items) store(e); // your logic
  after = page.next;
} while (after);
Python (requests)
import os, requests

BASE = "https://smartbox.ragnetiq.com/api/stats/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['SMARTBOX_API_KEY']}"}

def get(path, **params):
    r = requests.get(BASE + path, headers=HEADERS, params=params, timeout=30)
    r.raise_for_status()
    return r.json()

summary = get("/summary", **{"from": "2026-09-01", "to": "2026-09-30", "market": "demo-shop.cz"})
print(summary["totals"]["users"])

after = 0
while after is not None:
    page = get("/orders", **{"from": "2026-09-01", "to": "2026-09-30", "after": after})
    for order in page["items"]:
        ...  # your logic
    after = page["next"]

Changes

DateVersionChange
18 Oct 2026v1First release: /shops, /summary, /products, /events, /orders; keys for whole stores and for single markets.

The version is in the URL (/v1). We may add new fields at any time; existing fields and their meaning do not change within a version. We will tell you in advance about any new version.