Özel Gruplar
Sabit tiplerin dışındaki ürün ailelerini tutan özel grupları yöneten yedi uç.
Genel Bakış
Özel grup, sabit tiplerin dışında kalan bir ürün ailesini bir arada tutar. SSL sertifikaları kanonik örnektir: kendi tipi olmayan ürünler bir özel grubun içinde yaşar.
Grup yalnız bir kap değil, aynı zamanda bir vitrin ayarıdır. Ödeme yolları, liste şablonu ve yükseltme izni grup düzeyinde belirlenir ve içindeki tüm ürünleri etkiler.
Referans
Grupları Listeleme
Üst seviye özel ürün gruplarını döndürür.
active ya da inactive.curl 'https://panel.ornek.com/api/v1/admin/products/special-groups' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/special-groups', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/special-groups');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Products()->GetProductGroupsList();{
"data": [
{
"id": 5,
"key": "special-5",
"title": "SSL Certificates",
"route": "ssl-certificates",
"status": "active",
"product_count": 8,
"service_count": 40,
"created_at": "2026-01-01 10:00:00"
}
],
"meta": { "total": 3, "page": 1, "limit": 25, "next_page": 0 }
}Grup Detayı
Tek bir grubu tüm ayarları ve dil içeriğiyle döndürür.
active ya da inactive.visible ya da invisible.font ya da image.curl 'https://panel.ornek.com/api/v1/admin/products/special-groups/5' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/special-groups/5', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/special-groups/5');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Products()->GetProductGroup(['id' => 5]);Grup Oluşturma
Üst seviye özel grup açar.
active ya da inactive.font ya da image.201 ile döner. Grup detayı şemasıyla aynıdır.sub_title değeri 255 karakterden uzun.curl -X POST 'https://panel.ornek.com/api/v1/admin/products/special-groups' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"title":{"en":"SSL Certificates"},"status":"active","icon_type":"font","icon":"fa-lock","color":"3366ff"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/special-groups', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
title: { en: 'SSL Certificates' },
status: 'active',
icon_type: 'font',
icon: 'fa-lock',
color: '3366ff',
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/special-groups');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'title' => ['en' => 'SSL Certificates'],
'status' => 'active',
'icon_type' => 'font',
'icon' => 'fa-lock',
'color' => '3366ff',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Yeni grubun anahtari, icine urun ve kategori acarken kullanilir.
$group = Api::Products()->CreateProductGroup([
'title' => ['en' => 'SSL Certificates'],
]);
Api::Products()->CreateProduct([
'type' => 'special',
'group_id' => $group['data']['id'],
'name' => 'Wildcard SSL',
]);Grubu Güncelleme
Gönderdiğiniz alanları uygular, geri kalanını olduğu gibi bırakır.
active ya da inactive.font ya da image.sub_title değeri 255 karakterden uzun.curl -X PATCH 'https://panel.ornek.com/api/v1/admin/products/special-groups/5' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"status":"inactive","color":"ff0000"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/special-groups/5', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ status: 'inactive', color: 'ff0000' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/special-groups/5');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'status' => 'inactive',
'color' => 'ff0000',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Sik sorulan sorular, sutunlar ve odeme yollari bu uctan DUZENLENMEZ; korunur.
$response = Api::Products()->UpdateProductGroup([
'id' => 5,
'status' => 'inactive',
]);Grubu Silme
Grubu siler. İçindeki ürünler, alt kategoriler ve görseller de silinir.
gate:product.group_delete kancası işlemi veto etti.curl -X DELETE 'https://panel.ornek.com/api/v1/admin/products/special-groups/5' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/special-groups/5', {
method: 'DELETE',
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/special-groups/5');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Silme gruptaki her seyi goturur — once icerigi sayin.
$group = Api::Products()->GetProductGroupsList()['data'][0];
if ($group['product_count'] > 0 || $group['service_count'] > 0) {
return;
}
Api::Products()->DeleteProductGroup(['id' => $group['id']]);Grup Görseli Yükleme
Grubun ikonunu ya da başlık arka planını yükler.
icon ya da header-background. Varsayılan icon.icon ya da header-background. Sessiz düşmeyi yakalamak için gönderdiğinizle karşılaştırın.header-background görselleri yapılandırılmış boyutlara ölçeklenir.curl -X POST 'https://panel.ornek.com/api/v1/admin/products/special-groups/5/image' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"image":"https://cdn.example.com/ssl.png","type":"icon"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/special-groups/5/image', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
image: 'https://cdn.example.com/ssl.png',
type: 'icon',
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/special-groups/5/image');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'image' => 'https://cdn.example.com/ssl.png',
'type' => 'icon',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Products()->UploadGroupImage([
'id' => 5,
'image' => 'https://cdn.example.com/ssl.png',
'type' => 'icon',
]);Grup Görselini Silme
Grubun ikonunu ya da başlık arka planını kaldırır.
icon ya da header-background. Varsayılan icon.curl -X DELETE -G 'https://panel.ornek.com/api/v1/admin/products/special-groups/5/image' \
-H "Authorization: Bearer $API_KEY" \
-d type=iconconst url = new URL('https://panel.ornek.com/api/v1/admin/products/special-groups/5/image');
url.searchParams.set('type', 'icon');
const res = await fetch(url, {
method: 'DELETE',
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$url = 'https://panel.ornek.com/api/v1/admin/products/special-groups/5/image?' . http_build_query(['type' => 'icon']);
$ch = curl_init($url);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Products()->DeleteProductGroupImage(['id' => 5], ['type' => 'icon']);Tuzaklar
Grup silindiğinde içindeki ürünler, alt kategoriler ve görseller de silinir. Listedeki product_count ve service_count alanları tam olarak bunun için oradadır; silmeden önce ikisini de okuyun.
Sık sorulan sorular, sütun düzeni, işletme notları ve ödeme yolu listeleri güncelleme gövdesinde yer almaz. Bunlar mevcut değerleriyle korunur, yani göndermemeniz onları silmez. Panelin kendi ekranlarından yönetilirler.
Renk alanı altı basamaklı değeri diyez işareti olmadan bekler. Başında işaretle göndermek değerin okunamamasına yol açabilir; yazdıktan sonra detayı okuyup ne kaydedildiğini doğrulayın.
İlgili Makaleler
Geri bildiriminiz için teşekkürler!
Yukarıda bulamadığınız her şey için destek ekibimiz her zaman yanınızda.