Public Sayfalar
Yayındaki statik sayfaları listeleme, slug veya code ile detay getirme endpointleri.
Base URL: /api/public/pages
Yetkilendirme: X-Api-Key
Controller AllowAnonymous olsa da tenant çözümleme için X-Api-Key header'ı gereklidir.
GET /
Yayındaki sayfaları filtreli ve sayfalanmış olarak listeler. Sadece Published durumunda ve IsActive = true olan sayfalar döner.
Query Parametreleri:
| Parametre | Tip | Varsayılan | Açıklama |
|---|---|---|---|
page | int | 1 | Sayfa numarası |
pageSize | int | 10 | Sayfa başına kayıt |
search | string | — | Başlıkta arama |
lang | string | — | Dil kodu filtresi |
Headers:
X-Api-Key: customer-api-key
Response — 200 OK:
{
"success": true,
"data": {
"items": [
{
"id": "3fa85f64-...",
"code": "about-us",
"coverImageUrl": null,
"status": "Published",
"isActive": true,
"createdAt": "2026-03-28T10:00:00Z",
"title": "Hakkımızda",
"slug": "hakkimizda"
}
],
"page": 1,
"pageSize": 10,
"totalCount": 1,
"totalPages": 1
}
}
GET /by-slug/{slug}
Belirli bir sayfayı slug ile getirir. Sadece Published ve IsActive sayfalar döner.
Query Parametreleri:
| Parametre | Tip | Açıklama |
|---|---|---|
lang | string | İstenen dil kodu |
Örnek: GET /api/public/pages/by-slug/hakkimizda?lang=tr
Response — 200 OK:
{
"success": true,
"data": {
"id": "3fa85f64-...",
"code": "about-us",
"coverImageUrl": null,
"status": "Published",
"isActive": true,
"noIndex": false,
"createdAt": "2026-03-28T10:00:00Z",
"updatedAt": "2026-03-28T14:00:00Z",
"translations": [
{
"languageId": "9cd14a82-...",
"languageCode": "tr",
"title": "Hakkımızda",
"description": "Şirketimiz hakkında kısa bilgi",
"content": "<p>Biz kimiz...</p>",
"slug": "hakkimizda",
"metaTitle": "Hakkımızda | Kompanse",
"metaDescription": "Şirketimiz hakkında detaylı bilgi.",
"metaKeywords": "hakkımızda, şirket, vizyon",
"canonicalUrl": "https://example.com/hakkimizda"
}
]
}
}
GET /by-code/{code}
Belirli bir sayfayı benzersiz code değeriyle getirir. Sadece Published ve IsActive sayfalar döner.
Query Parametreleri:
| Parametre | Tip | Açıklama |
|---|---|---|
lang | string | İstenen dil kodu (verilirse sadece o dilin çevirisi döner) |
Örnek: GET /api/public/pages/by-code/about-us?lang=tr
Response — 200 OK: GET /by-slug/{slug} ile aynı yapıdadır.
code alanı sayfanın oluşturulurken verilen sabit bir tanımlayıcıdır (ör: about-us, contact, privacy-policy). Slug dile göre değişebilirken, code tüm dillerde sabittir. Frontend uygulamalarda sabit sayfaları çekmek için code kullanımı önerilir.