orakel
Docs navigation

Canonical

GET /api/updates

Change feed for incremental CRM sync. Returns companies whose record changed after a given timestamp.

Updated 2026-04-21

Request

GET /api/updates

Parameter Type Required Description
since ISO date yes Return companies with updatedAt >= since.
limit integer no 1–100. Default 20.
cursor string no Pagination cursor from prior response.

Ordering is stable: updatedAt ASC. Store the most recent updatedAt you've seen and pass it as since on the next call.

Response

{
  "data": [
    {
      "orgNumber": "912345678",
      "country": "NO",
      "name": "Example AS",
      "updatedAt": "2026-04-20T12:34:56Z"
    }
  ],
  "nextCursor": "clx...",
  "hasMore": true
}

Each row includes the full company firmographics, the latest financial, and active roles — the same shape as a page of /api/companies. Upstream update cadences: Brreg every 15 min, YTJ and Bolagsverket daily.

Examples

curl

curl -H "Authorization: Bearer $ORAKEL_KEY" \
  "https://orakel.cloud/api/updates?since=2026-04-20T00:00:00Z&limit=100"

JavaScript

const since = localStorage.getItem("orakel_watermark") ?? "2026-04-01T00:00:00Z";
const res = await fetch(
  `https://orakel.cloud/api/updates?since=${encodeURIComponent(since)}&limit=100`,
  { headers: { Authorization: `Bearer ${process.env.ORAKEL_KEY}` } },
);
const { data, hasMore } = await res.json();
if (data.length) {
  localStorage.setItem("orakel_watermark", data[data.length - 1].updatedAt);
}

Error modes

Status Meaning Action
400 Missing or invalid since parameter Pass an ISO timestamp
401 Missing or invalid API key Check the Authorization header
429 Rate or quota exceeded Back off
500 Query failed Retry

Rate limits

Per-key RPM per tier.

Typical use cases

  • Incremental CRM sync: poll hourly with the previous updatedAt watermark.
  • Data-warehouse CDC: stream change records into a staging table.
  • Webhook replacement: pull on a schedule instead of operating a webhook receiver.