diff --git a/custom.css b/custom.css index 3a0922b..2d1049b 100644 --- a/custom.css +++ b/custom.css @@ -130,19 +130,6 @@ div.nav-tabs :not(a[data-active="true"]) { border-radius: 8px; } -/* ── Buttons (primary) ─────────────────────────────────────────────────────── */ -button[class*='primary'], -a[class*='button'][class*='primary'] { - background-color: var(--df-primary); - color: #fff; - border-radius: 6px; -} - -button[class*='primary']:hover, -a[class*='button'][class*='primary']:hover { - background-color: var(--df-navy); -} - /* ── Tables ────────────────────────────────────────────────────────────────── */ thead { background-color: var(--df-sidebar); diff --git a/index.mdx b/index.mdx index 65cfbfd..c751930 100644 --- a/index.mdx +++ b/index.mdx @@ -73,7 +73,7 @@ Each API uses a different subdomain pattern: | Category Merchandising | `https://{zone}-category-merchandising.doofinder.com` | - Your search zone is shown in the [Doofinder Admin Panel](https://admin.doofinder.com). All Search API keys are zone-prefixed (e.g. `eu1-ab46030x...`). + Your search zone is shown in the [Doofinder Admin Panel](https://admin.doofinder.com). The zone prefix on API keys (e.g. `eu1-ab46030x...`) is optional — the zone is determined by the hostname you call. ## Authentication at a Glance diff --git a/introduction/authentication.mdx b/introduction/authentication.mdx index a70190b..96607e9 100644 --- a/introduction/authentication.mdx +++ b/introduction/authentication.mdx @@ -13,27 +13,16 @@ Generate an API key in the [Doofinder Admin Panel](https://admin.doofinder.com/a Only the API key of the **account owner** is valid for API operations. Keys generated by team members will not work. -### Search API: zone-prefixed format +### Key format -When calling the Search API, prepend your zone to the key: +The same key works across all APIs. You may see it written with a zone prefix (e.g. `eu1-ab46030x...`) — this prefix is optional and ignored by the API. Both formats are valid: ``` -eu1-ab46030xza33960aac71a10248489b6c26172f07 +eu1-ab46030xza33960aac71a10248489b6c26172f07 ← zone prefix included (optional) +ab46030xza33960aac71a10248489b6c26172f07 ← no prefix (also valid) ``` -The prefix (`eu1`, `us1`, `ap1`) routes the request to the correct datacenter. - - - Always use the prefix that matches your search engine's zone. Using a mismatched zone prefix will result in authentication errors. - - -### Management & Stats API: unprefixed format - -When calling the Management or Stats API, use the key without a zone prefix: - -``` -ab46030xza33960aac71a10248489b6c26172f07 -``` +The zone that serves your request is determined by the **hostname** you call, not by the key. --- diff --git a/introduction/errors.mdx b/introduction/errors.mdx index 66bb936..ce7636d 100644 --- a/introduction/errors.mdx +++ b/introduction/errors.mdx @@ -56,7 +56,7 @@ The request is missing an `Authorization` header, or the provided API key is inv **Common causes:** - No `Authorization` header sent - API key has been revoked or does not exist -- Wrong key format (e.g. missing the zone prefix for the Search API, or including it for the Management API) +- Wrong key format (e.g. using a JWT token where a plain token is expected) --- diff --git a/search-api/overview.mdx b/search-api/overview.mdx index f10de9a..8d2a881 100644 --- a/search-api/overview.mdx +++ b/search-api/overview.mdx @@ -21,7 +21,7 @@ Replace `{search_zone}` with your zone (`eu1`, `us1`, `ap1`). ## Authentication -The Search API uses zone-prefixed API keys: +The Search API uses the standard Doofinder API key. The zone prefix is optional: ```http Authorization: Token eu1-ab46030xza33960aac71a10248489b6c26172f07