Uluslararası SMS
Uluslararası SMS gönderici adı başvurularını, ülke fiyatlarını ve modül ayarlarını yöneten on beş uç.
Genel Bakış
Bazı ülkeler SMS gönderici adının önceden onaylanmasını zorunlu tutar. Müşteri belgeleriyle birlikte başvurur, siz onaylar ya da reddedersiniz; ilk altı uç bu akışı yürütür.
Geri kalanı satışın kendisiyle ilgilidir: hangi modülle gönderileceği, ülke başına maliyet ve fiyat, kâr marjı ve eski kayıtların temizlenmesi. Fiyatlar tek bir birincil para biriminde tutulur; o ayarlanmadan otomatik fiyatlama çalışmaz.
Referans
Başvuruları Listeleme
Müşterilerin ülke bazında açtığı gönderici adı başvurularını döndürür.
waiting onay bekliyor, active onaylandı, inactive reddedildi.curl 'https://panel.ornek.com/api/v1/admin/products/sms/intl-origins' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins');
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()->GetSmsIntlOrigins();
$waiting = array_filter(
$response['data'],
fn (array $r): bool => $r['status'] === 'waiting',
);{
"data": [
{
"id": 9,
"origin_id": 1,
"origin_name": "ACME",
"country_code": "sv",
"status": "waiting",
"status_message": "",
"client": { "id": 2, "full_name": "John Doe", "company_name": "" },
"attachments": [
{
"size": 255435,
"file_name": "licence.jpg",
"name": "215d8151c44f2d058eee5e5.jpg",
"file_path": "215d8151c44f2d058eee5e5.jpg"
}
],
"created_at": "2026-03-09 11:52:45",
"approved_date": null,
"rejected_date": null
}
],
"meta": { "total": 2, "page": 1, "limit": 25, "next_page": 0 }
}Başvuru Detayı
Tek bir başvuruyu döndürür. Şema liste öğesiyle aynıdır.
waiting onay bekliyor, active onaylandı, inactive reddedildi.curl 'https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9');
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()->GetSmsIntlOrigin(['id' => 9]);Başvuruyu Karara Bağlama
Başvuruyu onaylar ya da reddeder.
active onaylar, inactive reddeder.active ya da inactive değil.curl -X PUT 'https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9/status' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"action":"inactive","reason":"Documents missing"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9/status', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ action: 'inactive', reason: 'Documents missing' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9/status');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'action' => 'inactive',
'reason' => 'Documents missing',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Hazir gerekceyi sablon listesinden alin ki musteri her seferinde ayni metni gorsun.
$reasons = Api::Products()->GetSmsReasons([], ['group' => 'international-sms'])['data'];
Api::Products()->SetSmsIntlOriginStatus([
'id' => 9,
'action' => 'inactive',
'reason' => $reasons['en'][0]['description'] ?? '',
]);Toplu Karar
Birden çok başvuruyu tek çağrıda onaylar ya da reddeder.
active ya da inactive.ids boş.active ya da inactive değil.curl -X POST 'https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/bulk' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"ids":[9,10],"action":"active"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/bulk', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ ids: [9, 10], action: 'active' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/bulk');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode(['ids' => [9, 10], 'action' => 'active']),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Toplu ucta gerekce alani YOKTUR: red mesaji gerekiyorsa tek tek karara baglayin.
Api::Products()->BulkSmsIntlOrigins([
'ids' => [9, 10],
'action' => 'active',
]);Başvuruyu Silme
Başvuruyu ve yüklenmiş belgelerini siler.
curl -X DELETE 'https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9', {
method: 'DELETE',
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-origins/9');
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()->DeleteSmsIntlOrigin(['id' => 9]);Teslimat Raporu
Gönderilmiş bir SMS için sağlayıcıdan canlı teslimat durumu ister.
curl 'https://panel.ornek.com/api/v1/admin/products/sms/intl-reports/501' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-reports/501', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-reports/501');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Rapor sagliyiciya sorularak uretilir: yavas olabilir ve modul destegine baglidir.
$response = Api::Products()->GetSmsIntlReport(['id' => 501]);Red Gerekçelerini Listeleme
Başvuru reddederken kullanılan hazır metinleri dil başına döndürür.
sms ya da international-sms. Varsayılan sms, yani parametreyi unutmak yurt içi listeyi verir.curl -G 'https://panel.ornek.com/api/v1/admin/products/sms/reasons' \
-H "Authorization: Bearer $API_KEY" \
-d group=international-smsconst url = new URL('https://panel.ornek.com/api/v1/admin/products/sms/reasons');
url.searchParams.set('group', 'international-sms');
const res = await fetch(url, { headers: { Authorization: `Bearer ${apiKey}` } });
const body = await res.json();$url = 'https://panel.ornek.com/api/v1/admin/products/sms/reasons?' . http_build_query(['group' => 'international-sms']);
$ch = curl_init($url);
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()->GetSmsReasons([], ['group' => 'international-sms']);Red Gerekçesi Ekleme
Bir dile hazır red metni ekler.
sms ya da international-sms. Varsayılan sms, yani parametreyi unutmak yurt içi listeyi verir.201 ile döner. Listeyle aynı şema: kurulu her dil için bir anahtar, her biri kendi listesini taşır. Gerekçesi olmayan dil boş dizi döner.curl -X POST 'https://panel.ornek.com/api/v1/admin/products/sms/reasons?group=international-sms' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"lang":"en","reason":"Please upload a valid trade licence."}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/reasons?group=international-sms', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
lang: 'en',
reason: 'Please upload a valid trade licence.',
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/reasons?group=international-sms');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'lang' => 'en',
'reason' => 'Please upload a valid trade licence.',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);$response = Api::Products()->AddSmsReason(
['lang' => 'en', 'reason' => 'Please upload a valid trade licence.'],
['group' => 'international-sms'],
);Red Gerekçesi Silme
Bir dildeki gerekçeyi listedeki sırasına göre siler.
sms ya da international-sms. Varsayılan sms, yani parametreyi unutmak yurt içi listeyi verir.lang verilmedi.curl -X DELETE -G 'https://panel.ornek.com/api/v1/admin/products/sms/reasons/0' \
-H "Authorization: Bearer $API_KEY" \
-d lang=en \
-d group=international-smsconst url = new URL('https://panel.ornek.com/api/v1/admin/products/sms/reasons/0');
url.searchParams.set('lang', 'en');
url.searchParams.set('group', 'international-sms');
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/sms/reasons/0?' . http_build_query([
'lang' => 'en',
'group' => 'international-sms',
]);
$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);// Sira numarasi silme sonrasi KAYAR: birden fazla silecekseniz sondan basa gidin.
foreach ([2, 1] as $index)
Api::Products()->DeleteSmsReason(['index' => $index], ['lang' => 'en']);Ayarları Getirme
Uluslararası SMS için modül, fiyatlama ve ön kayıt ayarlarını döndürür.
none.curl 'https://panel.ornek.com/api/v1/admin/products/sms/intl-settings' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-settings', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-settings');
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()->GetSmsIntlSettings();Ayarları Yazma
Modülü, fiyatlama görevini ve ön kayıt ülkelerini ayarlar; ya da yalnız kâr marjını değiştirir.
curl -X PUT 'https://panel.ornek.com/api/v1/admin/products/sms/intl-settings' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"active_module":"Twilio","cron_status":true,"primary_currency":1}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-settings', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
active_module: 'Twilio',
cron_status: true,
primary_currency: 1,
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-settings');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'active_module' => 'Twilio',
'cron_status' => true,
'primary_currency' => 1,
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// 'margin' govdedeyse DIGER alanlar okunmaz — iki degisikligi ayri istek yapin.
Api::Products()->SetSmsIntlSettings(['active_module' => 'Twilio']);
Api::Products()->SetSmsIntlSettings(['margin' => 20]);Fiyatları Getirme
Ülke başına maliyet ve satış fiyatını döndürür.
curl 'https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing', {
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing');
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()->GetSmsIntlPricing();Fiyatları Yazma
Ülke başına maliyet ve fiyatı elle yazar.
values boş.curl -X PUT 'https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"values":{"US":{"cost":0.01,"amount":0.02,"cid":1,"status":true}}}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing', {
method: 'PUT',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
values: {
US: { cost: 0.01, amount: 0.02, cid: 1, status: true },
},
}),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'values' => [
'US' => ['cost' => 0.01, 'amount' => 0.02, 'cid' => 1, 'status' => true],
],
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Ulke kodu BUYUK harfli yazilir; basvuru kayitlarindaki kucuk harfli kodla karistirmayin.
Api::Products()->SetSmsIntlPricing([
'values' => [
'US' => ['cost' => 0.01, 'amount' => 0.02, 'cid' => 1, 'status' => true],
],
]);Fiyatları Modülden Çekme
Ülke fiyatlarını sağlayıcıdan çeker ve marjı uygulayarak yazar.
curl -X POST 'https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing/auto' \
-H "Authorization: Bearer $API_KEY"const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing/auto', {
method: 'POST',
headers: { Authorization: `Bearer ${apiKey}` },
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/intl-pricing/auto');
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);// Ucun uc onkosulu vardir: modul secili, modul fiyat cekebiliyor, para birimi ayarli.
$settings = Api::Products()->GetSmsIntlSettings()['data'];
if ($settings['active_module'] !== 'none' && $settings['primary_currency'] > 0)
Api::Products()->AutoDefineSmsIntlPricing();Raporları Temizleme
Verilen tarihte ve öncesinde gönderilmiş SMS kayıtlarını siler.
domestic ya da international. Varsayılan domestic.curl -X POST 'https://panel.ornek.com/api/v1/admin/products/sms/clear-reports' \
-H "Authorization: Bearer $API_KEY" \
-H 'Content-Type: application/json' \
-d '{"date":"2026-01-01","type":"international"}'const res = await fetch('https://panel.ornek.com/api/v1/admin/products/sms/clear-reports', {
method: 'POST',
headers: {
Authorization: `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ date: '2026-01-01', type: 'international' }),
});
const body = await res.json();$ch = curl_init('https://panel.ornek.com/api/v1/admin/products/sms/clear-reports');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $apiKey,
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'date' => '2026-01-01',
'type' => 'international',
]),
]);
$body = json_decode(curl_exec($ch), true);
curl_close($ch);// Kanal belirtmezseniz YURT ICI kayitlar silinir; uluslararasi olanlari acikca isteyin.
Api::Products()->ClearSmsReports([
'date' => '2026-01-01',
'type' => 'international',
]);Tuzaklar
Başvuru kayıtları ülke kodunu küçük harfle döndürür, fiyatlama uçları ise büyük harfle bekler ve döndürür. İkisini eşleştiren kod, harf durumunu dönüştürmezse hiçbir ülkeyi bulamaz ve bunu sessizce yapar.
Ayar ucunda margin gövdedeyse yalnız marj dalı çalışır; modül, para birimi ve ülke listesi okunmaz. İkisini birden değiştirmek istiyorsanız iki ayrı istek gönderin.
Fiyatları modülden çekmek, elle yazdığınız ülke fiyatlarının üzerine yazar. Birkaç ülkeyi özel olarak fiyatladıysanız bu çağrıdan sonra onları yeniden girmeniz gerekir; ayrıca fiyat görevi açıksa aynı ezme düzenli olarak tekrarlanır.
Toplu uç yalnız durumu değiştirir; red mesajı alanı yoktur. Müşterinin neden reddedildiğini görmesini istiyorsanız başvuruları tek tek karara bağlamanız gerekir.
Gerekçeler kimlikle değil listedeki sırayla silinir. Bir gerekçe silindiğinde ondan sonrakilerin sırası bir azalır; art arda silme yapacaksanız sondan başa gidin, yoksa yanlış metni silersiniz.
İ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.