Public Urunler
Yayindaki urunleri listeleme, slug ile detay getirme ve filtrelenebilir ozellik listesi endpointleri.
Base URL: /api/public/product-catalog/products
Yetkilendirme: X-Api-Key
Controller AllowAnonymous olsa da tenant cozumleme icin X-Api-Key header'i gereklidir.
GET /
Yayindaki (Published ve isActive: true) urunleri filtreli ve sayfalanmis olarak listeler. Dinamik ozellik degerlerine gore filtreleme destekler.
Headers:
X-Api-Key: customer-api-key
Query Parametreleri:
| Parametre | Tip | Varsayilan | Aciklama |
|---|---|---|---|
page | int | 1 | Sayfa numarasi |
pageSize | int | 10 | Sayfa basina kayit |
categoryId | Guid | — | Kategori filtresi |
search | string | — | Urun adinda arama |
lang | string | — | Dil kodu filtresi |
attrs[code] | string | — | Ozellik degerine gore filtreleme |
attrs[code_min] | string | — | Sayisal ozellik alt sinir |
attrs[code_max] | string | — | Sayisal ozellik ust sinir |
Ozellik Filtreleme Ornekleri
# Rengi "Kirmizi" olan urunler
GET /api/public/product-catalog/products?attrs[renk]=Kirmizi
# Agirligi 0.5 ile 2.0 kg arasi urunler
GET /api/public/product-catalog/products?attrs[agirlik_min]=0.5&attrs[agirlik_max]=2.0
# Garantili urunler
GET /api/public/product-catalog/products?attrs[garantili]=true
# Birden fazla filtre
GET /api/public/product-catalog/products?categoryId=xxx&attrs[renk]=Mavi&attrs[agirlik_max]=1.5&lang=tr
Response — 200 OK:
{
"success": true,
"data": {
"items": [
{
"id": "3fa85f64-...",
"code": "iphone-16-pro",
"sku": "IP16PRO-256-BLK",
"status": "Published",
"isActive": true,
"coverImageUrl": "https://api.example.com/media/acme/cc4d4a1df9894a8da60f0a5e8cb8583d.webp",
"createdAt": "2026-03-28T14:00:00Z",
"name": "iPhone 16 Pro",
"slug": "iphone-16-pro"
}
],
"page": 1,
"pageSize": 10,
"totalCount": 1,
"totalPages": 1
}
}
GET /{slug}
Belirli bir urunu slug ile getirir. Sadece Published ve isActive: true urunleri doner.
Query Parametreleri:
| Parametre | Tip | Aciklama |
|---|---|---|
lang | string | Istenen dil kodu |
Response — 200 OK:
{
"success": true,
"data": {
"id": "3fa85f64-...",
"code": "iphone-16-pro",
"sku": "IP16PRO-256-BLK",
"status": "Published",
"isActive": true,
"coverImageUrl": "https://api.example.com/media/acme/cc4d4a1df9894a8da60f0a5e8cb8583d.webp",
"createdAt": "2026-03-28T14:00:00Z",
"updatedAt": "2026-03-28T15:00:00Z",
"translations": [
{
"languageId": "9cd14a82-...",
"languageCode": "tr",
"name": "iPhone 16 Pro",
"slug": "iphone-16-pro",
"shortDescription": "Apple iPhone 16 Pro 256GB",
"description": "<p>Detayli aciklama...</p>",
"metaTitle": "iPhone 16 Pro | Magazamiz",
"metaDescription": "iPhone 16 Pro en uygun fiyatla"
}
],
"categories": [
{
"id": "cat-id-...",
"translations": [
{ "languageId": "...", "languageCode": "tr", "name": "Telefonlar", "slug": "telefonlar" }
]
}
],
"attributeValues": [
{
"attributeDefinitionId": "attr-renk-...",
"attributeCode": "renk",
"dataType": "Select",
"unit": null,
"attributeOptionId": "opt-siyah-...",
"optionTranslations": [
{ "languageId": "...", "languageCode": "tr", "value": "Siyah" }
]
},
{
"attributeDefinitionId": "attr-agirlik-...",
"attributeCode": "agirlik",
"dataType": "Decimal",
"unit": "kg",
"decimalValue": 0.199
}
],
"images": [
{
"id": "img-id-...",
"imageUrl": "https://api.example.com/media/acme/f9cc9bbcc17f4635b4b8766d939e6043.jpg",
"sortOrder": 1,
"altText": "iPhone 16 Pro on gorunum"
}
]
}
}
GET /filters
Filtreleme icin kullanilabilir (isFilterable: true) olarak isaretlenmis ozellik tanimlarini getirir. Frontend'de filtre paneli olusturmak icin kullanilir.
Response — 200 OK:
{
"success": true,
"data": [
{
"id": "attr-renk-...",
"code": "renk",
"dataType": "Select",
"isFilterable": true,
"isSortable": false,
"unit": null,
"translations": [
{ "languageId": "...", "languageCode": "tr", "label": "Renk" }
],
"options": [
{
"id": "opt-1-...",
"sortOrder": 1,
"translations": [
{ "languageId": "...", "languageCode": "tr", "value": "Kirmizi" }
]
},
{
"id": "opt-2-...",
"sortOrder": 2,
"translations": [
{ "languageId": "...", "languageCode": "tr", "value": "Mavi" }
]
}
]
},
{
"id": "attr-agirlik-...",
"code": "agirlik",
"dataType": "Decimal",
"isFilterable": true,
"isSortable": true,
"unit": "kg",
"translations": [
{ "languageId": "...", "languageCode": "tr", "label": "Agirlik" }
],
"options": []
}
]
}
/filters endpointinden donen dataType alanina gore frontend'de uygun filtre bilesenini render edin:
- Select → Checkbox veya dropdown (secenekler
optionsdizisinden gelir) - Number / Decimal → Min-max araligi slider
- Boolean → Toggle
- Text → Arama kutusu
- Date → Tarih araligi secici