Satış Ortaklığı
Satış ortaklığını açan, komisyonu belirleyen, kazancın ödenmesini yürüten ve şüpheli referansları tarayan dokuz uç.
Genel Bakış
Satış ortaklığında müşteri, getirdiği her satıştan komisyon kazanır. Bu uçlar ortaklığı açar, komisyon kuralını belirler, kazancın ödenmesini yürütür ve şüpheli referansları tarar.
Komisyonun iki periyodu vardır: lifetime müşterinin her yenilemesinde öder, onetime yalnız ilk satışta. Seçim ortak başınadır.
Referans
Ortaklık Durumunu Getirme
Müşterinin satış ortaklığı durumunu, komisyon ayarlarını ve bakiyesini döndürür.
lifetime her yenilemede komisyon verir, onetime yalnız ilk satışta. Boş değer varsayılanı kullanır.curl 'https://panel.ornek.com/api/v1/admin/clients/42/affiliate' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/affiliate', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/affiliate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->GetClientAffiliate(['id' => 42]);
if (!($response['data']['is_affiliate'] ?? false)) {
return;
}Ortaklığı Açma
Müşteriyi satış ortağı yapar. Zaten ortak olan bir müşteride hata döner.
lifetime ya da onetime. Başka bir değer boşa çevrilir.reference/currencies.201 ile döner. Durum ucuyla aynı şekildedir.curl -X POST 'https://panel.ornek.com/api/v1/admin/clients/42/affiliate' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"commission_value":10,"commission_period":"lifetime","currency_id":1}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/affiliate', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
commission_value: 10,
commission_period: 'lifetime',
currency_id: 1,
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/affiliate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'commission_value' => 10,
'commission_period' => 'lifetime',
'currency_id' => 1,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->ActivateClientAffiliate([
'id' => 42,
'commission_value' => 10,
'commission_period' => 'lifetime',
'currency_id' => 1,
]);Ortaklık Ayarlarını Güncelleme
Komisyonu, bakiyeyi ve ortağın durumunu değiştirir. Engelleme de bu uçtan yapılır.
lifetime ya da onetime.disabled açıkken yazılır.curl -X PATCH 'https://panel.ornek.com/api/v1/admin/clients/42/affiliate' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"commission_value":15}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/affiliate', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ commission_value: 15 }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/affiliate');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PATCH',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['commission_value' => 15]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Engelleme bekleyen odeme taleplerini de iptal eder.
$response = Api::Clients()->UpdateClientAffiliate([
'id' => 42,
'block_partner' => true,
'block_reason' => 'Sahte referans',
]);Sahtecilik Analizi
Ortağın giriş yaptığı IP adreslerini, yönlendirdiği müşterilerin giriş IP'leriyle karşılaştırır ve aynı IP'yi paylaşan her yönlendirilen müşteriyi listeler. Personelin "müşteri olarak giriş" oturumları yok sayılır. Önce state alanını okuyun: no_referrals ve no_logins karşılaştırılacak veri olmadığı anlamına gelir, temiz sonuç değildir.
match · clean · no_referrals · no_logins. Son ikisi ortağın yönlendirdiği müşteri ya da karşılaştırılacak kendi girişi olmadığını söyler.state match iken true.state match değilse boş.curl -X POST 'https://panel.ornek.com/api/v1/admin/clients/42/affiliate/fraud-check' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/affiliate/fraud-check', {
method: 'POST',
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/affiliate/fraud-check');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->CheckClientAffiliateFraud(['id' => 42]);
// Tarama yalnizca rapor uretir; engellemeyi siz karar verip yaparsiniz.
if (($response['data']['state'] ?? '') === 'match') {
$sharedIps = $response['data']['matching_ips'];
}Ödeme Taleplerini Listeleme
Ortağın kazancını çekmek için açtığı talepleri döndürür.
awaiting, process, completed, rejected ya da cancelled.curl 'https://panel.ornek.com/api/v1/admin/clients/42/affiliate/withdrawals' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/affiliate/withdrawals', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/affiliate/withdrawals');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->GetClientAffiliateWithdrawals(['id' => 42]);Ödeme Talebini Güncelleme
Talebin durumunu değiştirir. Ödemeyi yaptıysanız makbuzu da bu istekte iletirsiniz.
pending → awaiting, inprocess → process, paid → completed.completed'a geçerken kabul edilir. base64 data-URI, {filename, content} ya da {url}. İzinli: görsel ve PDF.status boş.curl -X PATCH 'https://panel.ornek.com/api/v1/admin/clients/42/affiliate/withdrawals/5' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"status":"completed","receipt":{"url":"https://ornek.com/makbuz.pdf"}}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/42/affiliate/withdrawals/5', {
method: 'PATCH',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
status: 'completed',
receipt: { url: 'https://ornek.com/makbuz.pdf' },
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/42/affiliate/withdrawals/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' => 'completed',
'receipt' => ['url' => 'https://ornek.com/makbuz.pdf'],
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->UpdateClientAffiliateWithdrawal([
'id' => 42,
'wid' => 5,
'status' => 'completed',
'receipt' => ['url' => 'https://ornek.com/makbuz.pdf'],
]);Hazır Metinleri Listeleme
Ortaklık işlerinde kullanılan hazır metinleri döndürür: kapatma nedenleri, ödeme notları, engelleme nedenleri.
curl 'https://panel.ornek.com/api/v1/admin/clients/affiliate/templates' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/affiliate/templates', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/affiliate/templates');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->GetAffiliateTemplates();Hazır Metin Ekleme
Seçtiğiniz türe yeni bir metin ekler.
deactivate_reasons, withdrawal_notes ya da block_reasons.value boş.curl -X POST 'https://panel.ornek.com/api/v1/admin/clients/affiliate/templates' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"block_reasons","value":"Sahte referans tespit edildi"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/affiliate/templates', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ type: 'block_reasons', value: 'Sahte referans tespit edildi' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/affiliate/templates');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'block_reasons',
'value' => 'Sahte referans tespit edildi',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->AddAffiliateTemplate([
'type' => 'block_reasons',
'value' => 'Sahte referans tespit edildi',
]);Hazır Metin Silme
Bir metni listeden çıkarır. Kimlik değil, metnin kendisi gönderilir.
deactivate_reasons, withdrawal_notes ya da block_reasons.value boş.curl -X DELETE 'https://panel.ornek.com/api/v1/admin/clients/affiliate/templates' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"type":"block_reasons","value":"Sahte referans tespit edildi"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/clients/affiliate/templates', {
method: 'DELETE',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ type: 'block_reasons', value: 'Sahte referans tespit edildi' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/clients/affiliate/templates');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'type' => 'block_reasons',
'value' => 'Sahte referans tespit edildi',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Clients()->DeleteAffiliateTemplate([
'type' => 'block_reasons',
'value' => 'Sahte referans tespit edildi',
]);Tuzaklar
Komisyon oranı 0-100 aralığına sıkıştırılır, negatif bakiye sıfıra çekilir ve tanınmayan bir komisyon periyodu boşa döner. Hiçbiri hata vermez; yanlış bir değer sessizce düzeltilmiş olarak kaydedilir. Yazdıktan sonra okuyup doğrulayın.
block_partner yalnız ortağı durdurmaz; bekleyen ödeme taleplerini de iptal eder. Ödemesi yapılmak üzere olan bir ortağı engellemeden önce talep listesine bakın.
Tarama yalnız rapor üretir: kendi kendine referans sayısı ve aynı IP'den gelen kayıtlar. Ortağı engellemek ayrı bir istektir ve kararı siz verirsiniz.
İ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.