Entegrasyon akışları
Önce kataloğu veya doğrulanmış kapsamı okuyun, fiyatı ya da revision bilgisini kontrol edin, bir kez gönderin ve kayıtlı işlem ile teslimat durumunu izleyin.
Katalog ve satın alma
products → catalog → quote → purchase
↓
purchase_status → order_delivery → order_proxiesÇok ülkeli satın alma ülkelere ayrı sipariş ve tek çok satırlı fatura oluşturur. İndirim ülke bazında hesaplanır. accepted, teslimat değil kuyruğa kabul anlamındadır.
Süre uzatma
renewal_options → renewal_quote → renewal → renewal_statusEk loginler
extra_login_options → extra_login_create → extra_login_operation_statusResidential liste ve trafik
residential_catalog → residential_quote → residential_purchase
↓
residential_purchase_status → order_delivery → residential_package_refreshIdempotency-Key
Her değişiklik için bir Idempotency-Key üretip saklayın. Zaman aşımı veya HTTP 5xx başarısızlık kanıtı değildir. Aynı anahtarla durumunu sorgulayın; belirsizliği çözmek için yeni anahtarla yeniden işlem başlatmayın.
/orders/create/statusKaydedilmiş uzatma sonucu →GET /renewals/statusAynı ek login işlemini yalnız sorgula →GET /extra-logins/statusKaydedilmiş ödeme ve güncel Residential teslimat durumu →GET /residential/orders/statusKullanım amacı: yalnız alt seçenek seçilir
Normal siparişte iki ayrı seçim yaptırmayın. catalog.purposes içinden id=201 kaydını bulun ve yalnız onun children seçeneklerini gösterin. purchase isteğinde purpose_id sayısal 201 olarak sabittir; subpurpose_id müşterinin seçtiği alt seçeneğin ID’sidir. Katalogdaki üst/alt yapı eski entegrasyonlarla uyumluluk için korunur.
Fiyat almak için quote satırlarında kullanım amacı gönderilmez: location_id, time_id ve quantity yeterlidir. Kullanım amacı purchase aşamasında zorunludur.
const response = await fetch(
'https://www.arnproxy.com/account/api/v1/catalog?product_id=' + productId,
{ headers: { Authorization: 'Bearer ' + apiKey } }
);
const catalog = await response.json();
if (!response.ok || !catalog.ok) throw new Error('Catalog request failed');
const purposeGroup = catalog.data.purposes.find(group => group.id === 201);
if (!purposeGroup) throw new Error('Purpose group 201 is not available');
const purposeOptions = purposeGroup.children.map(({ id, name }) => ({ id, name }));
// Show only purposeOptions. The customer selects selectedSubpurposeId.
const purchaseLine = {
location_id: selectedLocationId,
time_id: selectedTimeId,
quantity: selectedQuantity,
purpose_id: 201,
subpurpose_id: selectedSubpurposeId
};
// Add other_purpose (1–30 characters) only when selectedSubpurposeId === -1.
// No purchase is sent by this example.import json
import urllib.request
request = urllib.request.Request(
'https://www.arnproxy.com/account/api/v1/catalog?product_id=' + str(product_id),
headers={'Authorization': 'Bearer ' + api_key}
)
with urllib.request.urlopen(request, timeout=20) as response:
catalog = json.load(response)
if not catalog.get('ok'):
raise RuntimeError('Catalog request failed')
purpose_group = next((g for g in catalog['data']['purposes'] if g['id'] == 201), None)
if purpose_group is None:
raise RuntimeError('Purpose group 201 is not available')
purpose_options = [{'id': p['id'], 'name': p['name']} for p in purpose_group['children']]
# Display only purpose_options; the customer selects selected_subpurpose_id.
purchase_line = {
'location_id': selected_location_id,
'time_id': selected_time_id,
'quantity': selected_quantity,
'purpose_id': 201,
'subpurpose_id': selected_subpurpose_id,
}
# For Other (-1), also set other_purpose to 1–30 characters.
# This example does not submit a purchase.“Diğer” kullanım amacı
“Diğer” seçilirse subpurpose_id=-1 ve 1–30 karakterlik other_purpose gönderin. Diğer seçimlerde other_purpose gerekmez. purpose_id yine 201’dir.
{
"location_id": 10,
"time_id": 101,
"quantity": 1,
"purpose_id": 201,
"subpurpose_id": -1,
"other_purpose": "Custom purpose"
}Residential: yeni paket ve GB ekleme farkı
Residential siparişlerinde müşteri kullanım amacı seçmez. Yeni pakette kullanım amacı, web sitesindeki siparişle aynı sabit değerle sunucuda otomatik atanır; purpose_id, subpurpose_id veya other_purpose göndermeniz gerekmez. GB ekleme mevcut paketin kullanım amacını korur.
Kimlik ve fiyatlar temsilidir; gerçek değerleri katalog ve aynı fiyat yanıtından alın. JSON kimlikleri ve expected_total_minor sayısal olmalıdır. Güvenlik için örneklerde terms=false bırakılmıştır; gerçek ücretli işlem ancak açık müşteri onayıyla terms=true gönderildiğinde başlatılmalıdır.
Aynı türde iki ülkeden sipariş
Tek product_id içinde en fazla 20 farklı location_id kullanılabilir. Her ülke ayrı sipariş kaydı olur; bağlı alışveriş tek faturada işlenir. Adet indirimi her ülkenin kendi adedine göre hesaplanır.
{
"product_id": 5,
"lines": [
{
"location_id": 10,
"time_id": 101,
"quantity": 1,
"purpose_id": 201,
"subpurpose_id": 202
},
{
"location_id": 11,
"time_id": 102,
"quantity": 1,
"purpose_id": 201,
"subpurpose_id": 202
}
],
"currency": "TRY",
"expected_total_minor": 2000,
"promo_code": "",
"terms": false
}POST /account/api/v1/orders/create
Residential: yeni paket ve GB ekleme farkı · mode=new
Residential siparişlerinde müşteri kullanım amacı seçmez. Yeni pakette kullanım amacı, web sitesindeki siparişle aynı sabit değerle sunucuda otomatik atanır; purpose_id, subpurpose_id veya other_purpose göndermeniz gerekmez. GB ekleme mevcut paketin kullanım amacını korur.
{
"mode": "new",
"location_id": 20,
"time_id": 201,
"promo_code": "",
"currency": "TRY",
"expected_total_minor": 1000,
"expected_selection_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"terms": false
}POST /account/api/v1/residential/orders/create
Residential: yeni paket ve GB ekleme farkı · mode=topup
Residential siparişlerinde müşteri kullanım amacı seçmez. Yeni pakette kullanım amacı, web sitesindeki siparişle aynı sabit değerle sunucuda otomatik atanır; purpose_id, subpurpose_id veya other_purpose göndermeniz gerekmez. GB ekleme mevcut paketin kullanım amacını korur.
{
"mode": "topup",
"package_id": 10001,
"time_id": 201,
"promo_code": "",
"currency": "TRY",
"expected_total_minor": 1000,
"expected_selection_hash": "0000000000000000000000000000000000000000000000000000000000000000",
"terms": false
}POST /account/api/v1/residential/orders/create
CSV dışa aktarma
CSV sütunları id, endpoint, ip, port, login ve password arasından seçilir. Özel biçimde yalnız belgelenen %...% alanları kullanılabilir; bu bir kod çalıştırma şablonu değildir. Login/şifre içeren çıktı credentials izni gerektirir. Dönen içerik JSON içindedir; dosyaya kaydetme işlemini uygulamanız yapar.
{
"proxy_ids": [
10001
],
"format": "csv",
"columns": [
"id",
"endpoint"
]
}POST /account/api/v1/proxies/export
Özel bağlantı biçimi
CSV sütunları id, endpoint, ip, port, login ve password arasından seçilir. Özel biçimde yalnız belgelenen %...% alanları kullanılabilir; bu bir kod çalıştırma şablonu değildir. Login/şifre içeren çıktı credentials izni gerektirir. Dönen içerik JSON içindedir; dosyaya kaydetme işlemini uygulamanız yapar.
{
"proxy_ids": [
10001
],
"format": "custom",
"template": "%login%:%password%@%endpoint%"
}POST /account/api/v1/proxies/export
Kabul edildi, teslim edildi demek değildir
HTTP 201/202 veya state=accepted yalnız kabulü gösterebilir. purchase_status / residential_purchase_status ile aynı işlemi, order_delivery ile teslimatı takip edin. poll_after_seconds ve Retry-After varsa bunlara uyun. Zaman aşımından sonra yeni Idempotency-Key ile tekrar satın almayın.