REST API
GET /external/navigations/:key
Workspace navigation by key, with POST items pre-resolved per locale.
GET /external/navigations/header
X-Api-Key: bk_live_xxxReturns the navigation identified by :key (e.g. 'header',
'footer-services'). Items are nested via parentId — top-level
items have parentId: null.
Item types
| Type | Renders as | Required fields |
|---|---|---|
CUSTOM_URL | <a href="..."> | customUrl, labels |
POST | <a href="<computed>"> | post, optional labels |
HEADING | non-link label (dropdown title, footer column header) | labels, may have children |
POST items are pre-resolved — the post.locales array contains
the per-locale slug+title for every published translation.
Response
{
"key": "header",
"name": "Main Header",
"items": [
{
"id": "i_1",
"parentId": null,
"position": 0,
"type": "HEADING",
"customUrl": null,
"labels": { "en": "Get My Visa", "pt": "Obter o meu visto" },
"hiddenLocales": [],
"post": null
},
{
"id": "i_2",
"parentId": "i_1",
"position": 0,
"type": "POST",
"customUrl": null,
"labels": null,
"hiddenLocales": [],
"post": {
"id": "p_2N4r",
"canonicalSlug": "schengen-visa",
"postTypeId": "pt_services",
"postTypeSlug": "services",
"locales": [
{ "locale": "en", "slug": "schengen-visa", "title": "Schengen Visa" },
{ "locale": "pt", "slug": "visto-schengen", "title": "Visto Schengen" }
]
}
}
]
}404 when no navigation with that key exists.
SDK
const nav = await bf.navigations.get('header')
// → BrandfineNavigation | null (null on 404)For rendering, pass through the SDK's resolver to get a ready-to-render tree:
import { resolveNavigation } from '@brandfine/client/resolvers'
const hydrated = resolveNavigation(nav!, 'pt', { defaultLocale: 'en' })
// hydrated.items: [{ href, label, type, children }, ...]See SDK → Resolvers.