orakel
Docs navigation

Canonical

POST /api/companies/enrich

Batch-fetch up to 100 company records. Norwegian misses are fetched live from Brreg.

Updated 2026-04-22

Request

POST /api/companies/enrich

Accepts two body shapes. The legacy orgNumbers shape assumes country NO. The pairs shape is explicit and supports the full Nordic universe.

{ "orgNumbers": ["923609016", "987654321"] }
{
  "pairs": [
    { "orgNumber": "923609016", "country": "NO" },
    { "orgNumber": "5560000000", "country": "SE" }
  ]
}
Field Type Required Description
orgNumbers[] string[] one-of 9-digit Norwegian numbers. 1–100 entries.
pairs[] { orgNumber, country }[] one-of Up to 100 entries. country defaults to NO. 9-digit orgNumber regex is enforced.

Norwegian misses are fetched from Brreg in parallel (concurrency 10). Non-NO misses are not fetched — load those universes via the bulk sync jobs (see YTJ, Bolagsverket).

Response

{
  "data": [
    {
      "orgNumber": "923609016",
      "country": "NO",
      "name": "EQUINOR ASA",
      "_sources": {
        "attribution": ["Brønnøysundregistrene", "Regnskapsregisteret"],
        "fields": {
          "companyCore": "Brønnøysundregistrene",
          "roles": "Brønnøysundregistrene",
          "financials": "Regnskapsregisteret"
        }
      }
    }
  ],
  "notFound": ["111111111"]
}

With the pairs shape, notFound is an array of { orgNumber, country } objects. Each entry in data is a full company record including financials, roles, sub-units, and a _sources block — same shape as single-company lookup, minus the route-handler-only enrichment (SSB Klass labels, county hydration, SSB context); those appear on the single-company endpoint but not on the batch enrich response.

Examples

curl

curl -X POST https://orakel.cloud/api/companies/enrich \
  -H "Authorization: Bearer $ORAKEL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pairs":[{"orgNumber":"923609016","country":"NO"}]}'

JavaScript

const res = await fetch("https://orakel.cloud/api/companies/enrich", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.ORAKEL_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    pairs: [{ orgNumber: "923609016", country: "NO" }],
  }),
});
const { data, notFound } = await res.json();

Error modes

Status Meaning Action
400 Invalid JSON body, or schema violation (bad org number, too many entries) Inspect details[]
401 Missing or invalid API key Check the Authorization header
429 Rate or quota exceeded Back off
500 Enrich pipeline failed Retry

Rate limits

Per-key RPM per tier. A single request can trigger up to 100 Brreg fetches, but counts as one request against daily and monthly quotas.

Typical use cases

  • Nightly CRM sync: enrich a list of account org numbers in one call.
  • CSV import: upload a spreadsheet of org numbers and fetch records in batches of 100.
  • Mixed-country enrichment via the pairs shape.