Public Navigator Menuleri
Frontend uygulamasinin kullanacagi aktif menu agacini dil bazli link fallback destegiyle getirir.
Base URL: /api/public/navigator/menus
Yetkilendirme: X-Api-Key
Modul: navigator modulu musteriye atanmis olmalidir.
bilgi
Controller AllowAnonymous olsa da tenant cozumleme icin X-Api-Key header'i gereklidir.
GET /{code}
Belirli bir menuyu code alani ile public kullanim icin getirir.
Headers:
X-Api-Key: customer-api-key
Query Parametreleri:
| Parametre | Tip | Aciklama |
|---|---|---|
lang | string | Istenen dil kodu. Gonderilmezse varsayilan dil kullanilir |
Response - 200 OK:
{
"success": true,
"data": {
"id": "menu-id",
"code": "header",
"name": "Header Menu",
"languageCode": "en",
"defaultLanguageCode": "tr",
"items": [
{
"id": "item-id",
"sortOrder": 1,
"openInNewTab": false,
"title": "Products",
"subtitle": "All products",
"link": "/en/products",
"children": [
{
"id": "child-item-id",
"sortOrder": 1,
"openInNewTab": false,
"title": "Software",
"subtitle": null,
"link": "/en/products/software",
"children": []
}
]
},
{
"id": "container-item-id",
"sortOrder": 2,
"openInNewTab": false,
"title": "Resources",
"subtitle": null,
"link": null,
"children": []
}
]
}
}
Davranis Notlari
- Sadece
isActive = trueolan menu ve item'lar doner - Inactive parent altindaki item'lar da donmez
- Istenen dilde ceviri yoksa varsayilan dile fallback uygulanir
link = nullise item container olarak kullanilabilir- Bir item ayni anda hem
linkhemchildrenicerebilir
Olası Hatalar
| Kod | Durum |
|---|---|
400 | X-Api-Key gecersiz veya eksik |
403 | navigator modulu atanmamis veya aktif degil |
404 | Istek yapilan code icin menu bulunamadi |