Webhooks and notifications
When and how we deliver
#One delivery = one POST with a single message that gathers all new events since the previous delivery, after the daily data check (around 8:30, Romanian time). Every delivery has a unique identifier (the id field and the X-DataRomania-Delivery header): if you receive it twice, ignore the duplicate.
Request headers
- Content-Type
- application/json; charset=utf-8
- User-Agent
- DataRomania-Webhooks/1.0
- X-DataRomania-Event
- alerte.rezumat · prospect.firme_noi · test
- X-DataRomania-Delivery
- the delivery identifier (the same on retries)
- X-DataRomania-Signature
- t=<Unix seconds>,v1=<HMAC-SHA256 hex>
JSON format
#The request body (version 1). New fields may appear at any time; treat unknown ones as optional. Field names are in Romanian, as in the REST API.
Main fields
- Field: id
- Type: string
- Description: the delivery identifier
- Field: eveniment
- Type: string
- Description: alerte.rezumat, prospect.firme_noi or test
- Field: versiune
- Type: number
- Description: the format version (1)
- Field: creat_la
- Type: ISO 8601
- Description: when the delivery was made
- Field: url
- Type: URL
- Description: the DataRomania page with the details
- Field: evenimente[]
- Type: list
- Description: for alerte.rezumat: one object per event (cui, denumire, tip, grup, grav, descriere, detaliu, creat_la, url)
- Field: lista, firme[]
- Type: object, list
- Description: for prospect.firme_noi: the saved list and the new companies (cui, denumire, forma, data_inreg, judet, localitate, url)
{
"id": "dlv_5821",
"eveniment": "alerte.rezumat",
"versiune": 1,
"creat_la": "2026-10-24T05:30:00.000Z",
"limba": "en",
"titlu": "Warning: a serious signal at a company you follow",
"url": "https://dataromania.ro/en/alerte",
"evenimente": [
{
"id": 91234,
"cui": 14837428,
"denumire": "EXEMPLU DISTRIBUTIE SRL",
"tip": "inactiv",
"grup": "inactivare",
"grav": true,
"descriere": "Became tax-inactive (since 23 October 2026)",
"detaliu": {
"data": "2026-10-23"
},
"creat_la": "2026-10-24T04:12:09Z",
"url": "https://dataromania.ro/en/firma/14837428"
},
{
"id": 91240,
"cui": 160796,
"denumire": "AUTOMOBILE DACIA SA",
"tip": "intrat_tva",
"grup": "tva",
"grav": false,
"descriere": "Became VAT-registered",
"detaliu": {},
"creat_la": "2026-10-24T04:15:41Z",
"url": "https://dataromania.ro/en/firma/160796"
}
]
}{
"id": "dlv_5822",
"eveniment": "prospect.firme_noi",
"versiune": 1,
"creat_la": "2026-10-24T05:30:00.000Z",
"limba": "en",
"titlu": "One new company for “Construction, Cluj”",
"url": "https://dataromania.ro/en/cont/liste",
"lista": {
"id": 77,
"nume": "Construction, Cluj"
},
"total": 1,
"firme": [
{
"cui": 55728797,
"denumire": "NEXT GUARD S.R.L.",
"forma": "SRL",
"data_inreg": "2026-10-19",
"judet": "cluj",
"localitate": "Florești",
"activa": true,
"url": "https://dataromania.ro/en/firma/55728797"
}
]
}Signature
#We sign every delivery with the channel secret (whsec_…, shown once when the channel is created). The signature is the hex HMAC-SHA256 of the string “<t>.<the exact request body>”.
X-DataRomania-Signature: t=1792819800,v1=5257a869e7ecebeda32affa62cdca3fa51cad7e77a0e56ff536d0ce8e108d8bdVerifying the signature
#Compute the HMAC over the raw body (before any JSON parsing), compare it in constant time and reject deliveries older than 5 minutes.
import { createHmac, timingSafeEqual } from "node:crypto";
// corp = textul brut al cererii (de ex. express.raw({ type: "application/json" }))
export function verifica(corp, antet, secret) {
const p = Object.fromEntries(antet.split(",").map((x) => x.split("=")));
const t = Number(p.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false;
const asteptat = createHmac("sha256", secret).update(`${t}.${corp}`).digest();
const primit = Buffer.from(p.v1 ?? "", "hex");
return primit.length === asteptat.length && timingSafeEqual(primit, asteptat);
}import hmac, hashlib, time
def verifica(corp: bytes, antet: str, secret: str) -> bool:
p = dict(x.split("=", 1) for x in antet.split(","))
t = int(p.get("t", "0"))
if abs(time.time() - t) > 300:
return False
asteptat = hmac.new(secret.encode(), f"{t}.".encode() + corp, hashlib.sha256).hexdigest()
return hmac.compare_digest(asteptat, p.get("v1", ""))Retries and automatic pause
#A 2xx answer within 10 seconds = successful delivery. Otherwise we retry up to 3 times with growing pauses (2 s, then 8 s), and the events stay for the next delivery. After 5 failed deliveries in a row we pause the channel and show you the reason in your account. A 410 Gone pauses the channel immediately.
Security
#We only send to public HTTPS addresses on port 443: addresses that point (also after DNS resolution) to private, loopback, link-local or reserved networks are refused, and redirects are not followed. Do not put secrets in the URL; use the signature.
Slack, Teams, Telegram, Discord
#For Slack, Teams, Telegram and Discord we format the message natively (Slack blocks, an Adaptive Card in Teams, HTML in Telegram, an embed in Discord), with at most 10 items and a link to the rest. There is nothing to verify: the webhook URL is the secret.
Event types
The tip field of each event says what changed; grup places it in the filters of your account. The list grows: handle unknown types generically (descriere always holds a readable text).
- grup: inactivare
- types: inactiv, reactivat, radiat
- grup: tva
- types: iesit_tva, intrat_tva, split_tva_intrat, split_tva_iesit
- grup: e_factura
- types: e_factura_intrat, e_factura_iesit
- grup: onrc
- types: stare_onrc
- grup: denumire
- types: denumire
- grup: sediu
- types: sediu
- grup: caen
- types: caen
- grup: forma_juridica
- types: forma_juridica
- grup: instanta
- types: insolventa_dosar
- grup: termene
- types: termen_dosar
- grup: prospect
- types: prospect.firme_noi
- grup: altele
- types: …