Başlarken
Hızlı başlangıç
Dört adımda ilk siparişinizi API üzerinden verin.
Bayilik başvurusu yapın
Başvuru formunu doldurun (şahıs veya şirket). Cüzdan bakiyeniz 2.000 ₺ ’ye ulaştığında (mevcut bakiye veya başvurudan sonraki toplam yüklemeler) bayiliğiniz otomatik olarak aktifleşir . Aktivasyon tek seferliktir; sonraki harcamalar bayiliğinizi düşürmez.
API anahtarı oluşturun
Bayi panelinden yeni bir anahtar oluşturun. Anahtar wck_ ile başlar ve yalnızca bir kez gösterilir ; hemen güvenli bir yere kaydedin. Hesap başına en fazla 20 anahtar oluşturabilir, her anahtarı belirli IP adresleriyle sınırlayabilirsiniz.
İlk isteğinizi gönderin
GET /me hesabınızı ve bakiyenizi döndürür. 200 yanıtı alıyorsanız anahtarınız çalışıyor demektir.
cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/me" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/me' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/me' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/me" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())
İlk siparişinizi verin
Önce POST /orders/preview ile net tutarı görün, ardından aynı kalemlerle POST /orders gönderin. Siparişte her zaman benzersiz bir Idempotency-Key kullanın.
cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/orders/preview" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly"
}
]
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly"
}
]
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders/preview' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders/preview' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
},
body: JSON.stringify({
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly"
}
]
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/orders/preview" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
json={
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
},
],
},
timeout=30 ,
)
print (res.status_code, res.json())
cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/orders" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: siparis-a1042-7f3c9e2b" \
-d '{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly"
}
],
"payment" : {
"method" : "balance"
},
"terms" : true
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly"
}
],
"payment" : {
"method" : "balance"
},
"terms" : true
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
'Idempotency-Key: siparis-a1042-7f3c9e2b' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
'Idempotency-Key' : 'siparis-a1042-7f3c9e2b' ,
},
body: JSON.stringify({
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly"
}
],
"payment" : {
"method" : "balance"
},
"terms" : true
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/orders" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
"Idempotency-Key" : "siparis-a1042-7f3c9e2b" ,
},
json={
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
},
],
"payment" : {
"method" : "balance" ,
},
"terms" : True ,
},
timeout=30 ,
)
print (res.status_code, res.json())
Temeller
Kimlik doğrulama
Her isteğe API anahtarınızı Authorization başlığında Bearer token olarak ekleyin. Başlığı ayarlayamayan istemciler X-Api-Key başlığını kullanabilir. Yalnızca GET /ping kimlik doğrulama gerektirmez.
İstek başlıkları Kopyala Kopyalandı Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# alternatif
X-Api-Key: wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Anahtar biçimi: wck_ + 32 karakter (0-9A-Za-z). Anahtar yalnızca oluşturulduğunda bir kez gösterilir; sistemde yalnızca özeti (SHA-256) saklanır, bu yüzden kaybedilen anahtar geri getirilemez.
Anahtarlar bayi panelinden oluşturulur ve iptal edilir. Hesap başına en fazla 20 anahtar tanımlanabilir.
Her anahtar için isteğe bağlı IP izin listesi (tam IP adresleri) tanımlayabilirsiniz. Listede olmayan adreslerden gelen istekler 403 ip_not_allowed alır.
API yalnızca aktif bayi hesaplarında çalışır; diğer hesaplar 403 client_api_not_allowed alır.
Anahtarınızı tarayıcı, mobil uygulama veya herkese açık depo gibi istemci tarafı kodlara koymayın. İstekleri her zaman kendi sunucunuzdan gönderin; anahtar sızarsa panelden hemen iptal edip yenisini oluşturun.
İstek ve yanıt yapısı
API, UTF-8 kodlu JSON alır ve döndürür. Gövde gönderdiğiniz isteklerde Content-Type: application/json kullanın. Tüm yollar base URL’ye görelidir: https://sunucuatlas.com/api/v1/client/orders.
Başarılı yanıt
Veri her zaman data alanındadır (nesne, dizi veya null). Sayfalı listelerde meta eklenir; yalnızca gerektiğinde bulunur. Durum kodu 200, yeni kayıt oluşturan isteklerde 201 olur.
200 Başarılı yanıt Kopyala Kopyalandı {
"data" : {
"id" : 77 ,
"status" : "active"
},
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
} Hata yanıtı
Hatalarda gövde tek bir error nesnesi içerir: makine tarafından okunacak code, insan tarafından okunacak message ve varsa ek bilgiler için details. Entegrasyonunuzda her zaman code alanına göre karar verin.
422 Hata yanıtı Kopyala Kopyalandı {
"error" : {
"code" : "insufficient_balance" ,
"message" : "Bakiye yetersiz." ,
"details" : {
"required" : {
"amount" : 420 ,
"currency" : "TRY"
},
"available" : {
"amount" : 180.5 ,
"currency" : "TRY"
}
}
}
} Metot geçersiz kılma ve CORS
PATCH, PUT veya DELETE gönderemeyen istemciler isteği POST olarak gönderip X-Http-Method-Override: PATCH|PUT|DELETE başlığını ekleyebilir. API CORS için Access-Control-Allow-Origin: * döndürür ve OPTIONS isteklerini 204 ile yanıtlar; yine de anahtarınızı tarayıcıda kullanmayın.
Hata kodları
HTTP durum kodu hatanın sınıfını, error.code ise kesin nedenini belirtir. 401, 403 ve 429 hataları kimlik doğrulama gerektiren tüm uçlarda dönebilir.
Hata kodları
Kod HTTP Anlamı
bad_request400 İstek çözümlenemedi (ör. geçersiz JSON gövdesi).
operation_failed400 İşlem tamamlanamadı; nedeni message alanındadır.
missing_token401 Authorization veya X-Api-Key başlığı gönderilmedi.
invalid_token401 Anahtar geçersiz ya da tanınmıyor.
key_revoked401 Anahtar iptal edilmiş. Panelden yeni bir anahtar oluşturun.
owner_inactive401 Anahtarın sahibi olan hesap aktif değil.
ip_not_allowed403 İstek, anahtarın IP izin listesinde olmayan bir adresten geldi.
client_api_not_allowed403 Hesap aktif bir bayi değil; API erişimi yok.
insufficient_scope403 Anahtarın bu işlem için yetkisi yok.
not_found404 İstenen kayıt bulunamadı.
endpoint_not_found404 Böyle bir uç nokta yok; yolu ve sürümü kontrol edin.
method_not_allowed405 Uç nokta bu HTTP metodunu desteklemiyor.
idempotency_in_flight409 Aynı Idempotency-Key ile gönderilen istek hâlâ işleniyor; kısa bir süre sonra tekrar deneyin.
idempotency_key_reuse422 Aynı Idempotency-Key farklı bir gövdeyle kullanıldı.
validation_failed422 Bir veya daha fazla alan geçersiz; ayrıntılar details içindedir.
insufficient_balance422 Cüzdan bakiyesi yetersiz. details.required ve details.available tutarları döner.
cycle_invalid422 Ürün bu dönemle satılmıyor. Geçerli dönemler details.allowed içindedir.
product_not_orderable422 Ürün şu anda sipariş edilemiyor.
out_of_stock422 Ürün stokta yok.
addon_invalid422 Eklenti bu ürün için geçersiz.
addon_option_invalid422 Eklenti seçeneği geçersiz.
requirement_missing422 Zorunlu bir sipariş gereksinimi (requirements) eksik.
terms_required422 Sözleşme onayı (terms: true) gönderilmedi.
payment_method_invalid422 Ödeme yöntemi geçersiz; yalnızca balance kabul edilir.
invoice_not_payable422 Fatura ödenebilir durumda değil.
not_renewable422 Hizmet yenilenemiyor.
cancellation_exists422 Bu hizmet için zaten bir iptal talebi var.
tool_action_failed422 Araç eylemi başarısız oldu.
password_too_short422 Şifre çok kısa.
rate_limited429 Dakikalık istek sınırı aşıldı; Retry-After saniye kadar bekleyin.
too_many_auth_failures429 Çok sayıda başarısız kimlik doğrulama denemesi; bir süre bekleyin.
server_error500 Beklenmeyen sunucu hatası. Tekrar deneyin; sürerse destekle iletişime geçin.
Idempotency
Ağ hatası veya zaman aşımında bir isteği güvenle tekrarlayabilmek için POST isteklerine Idempotency-Key başlığı (8–191 karakter) ekleyin. POST /orders ve POST /invoices/{id}/pay isteklerinde her zaman gönderin.
Idempotency davranışı
Durum Sonuç
Aynı anahtar ve aynı gövde, 24 saat içinde İşlem tekrar yapılmaz; ilk yanıt aynen döner ve Idempotency-Replayed: true başlığı eklenir.
Aynı anahtar, farklı gövde 422 idempotency_key_reuse
İlk istek hâlâ işleniyor 409 idempotency_in_flight; kısa bir süre sonra tekrar deneyin.
Anahtarı işlem başına bir kez üretin (ör. kendi sipariş numaranızdan veya bir UUID’den) ve tekrar denemelerde değiştirmeyin.
İstek sınırı
Her API anahtarı için dakikada 60 istek sınırı vardır (sabit 60 saniyelik pencere). Kimlik doğrulaması yapılan her yanıtta kalan hakkınızı gösteren başlıklar bulunur.
İstek sınırı başlıkları
Başlık Açıklama
X-RateLimit-LimitPenceredeki toplam istek hakkı (60).
X-RateLimit-RemainingPenceredeki kalan istek hakkı.
X-RateLimit-ResetPencerenin sıfırlanacağı zaman (Unix zaman damgası).
Retry-AfterYalnızca 429 yanıtlarında: tekrar denemeden önce beklenecek saniye.
429 Sınır aşıldığında Kopyala Kopyalandı HTTP/1.1 429 Too Many Requests
Content-Type: application/json
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1796481060
Retry-After: 23
{"error" : {"code" : "rate_limited" , "message" : "Too many requests." }} Durum sorgularını (polling) birkaç saniyede bir yapın ve 429 aldığınızda Retry-After süresi kadar bekleyin. Art arda başarısız kimlik doğrulama denemeleri too_many_auth_failures ile geçici olarak engellenir.
Faturalama dönemleri
Sipariş kalemlerinde ve fiyat listelerinde cycle alanı aşağıdaki değerlerden birini alır. Bir ürünün sunduğu dönemler pricing dizisinde listelenir; sunulmayan bir dönem gönderilirse 422 cycle_invalid döner ve geçerli değerler details.allowed içinde gelir.
Faturalama dönemleri
Değer Dönem
hourlySaatlik kullanım
monthlyAylık
quarterly3 aylık
semiannually6 aylık
annuallyYıllık
biennially2 yıllık
triennially3 yıllık
onetimeTek seferlik
Bayi fiyatlandırma
Bayi indirimi, API ve panel üzerinden verdiğiniz tüm siparişlere otomatik uygulanır. Kesin net fiyatı her zaman GET /reseller/prices veya POST /orders/preview ile alın.
Şahıs bayi %30’a varan indirim
Şirket bayi %35’e varan indirim
İndirim ürünlere, eklentilere ve kurulum ücretlerine uygulanır.
İndirimli fiyat hiçbir zaman ürünün maliyet tabanının altına inmez; bu nedenle bazı ürünlerde gerçek indirim oranı daha düşüktür. Ürün bazındaki oran discount_pct alanında gösterilir.
Alan adları ve saatlik kullanım ücretleri indirim kapsamı dışındadır.
Bayi indiriminin üzerine kupon veya grup indirimi uygulanmaz.
KDV, indirimli tutarın üzerine eklenir.
API siparişleri yalnızca cüzdan bakiyesinden ödenir (payment.method = "balance").
Kendi müşterilerinize dilediğiniz fiyattan satış yapabilirsiniz.
Liste fiyatı (aylık) 500,00 ₺
Bayi indirimi (bu üründe %30) −150,00 ₺
KDV (%20, indirimli tutar üzerinden) +70,00 ₺
Cüzdandan ödenecek 420,00 ₺
Örnek, indirimin tam uygulandığı bir ürün içindir; oranlar ürüne ve bayi türünüze göre değişir.
Uçtan uca
Tam akış örneği
Bir müşteriniz için VDS satın alıp erişim bilgilerini teslim etmek ve bir ay sonra yenilemek için gereken çağrılar.
Bayi fiyatlarını listeleyin
Ürünü ve dönemi seçin; reseller tutarı sizin net alış fiyatınızdır.
cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())
Siparişi önizleyin
total değerini bakiyenizle (GET /balance) karşılaştırın; yetmiyorsa önce bakiye yükleyin.
cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/orders/preview" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21"
}
}
]
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21"
}
}
]
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders/preview' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders/preview' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
},
body: JSON.stringify({
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21"
}
}
]
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/orders/preview" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
json={
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21" ,
},
},
],
},
timeout=30 ,
)
print (res.status_code, res.json())
Siparişi Idempotency-Key ile verin
Yanıt 201 ve payment.status: "paid" ise tutar cüzdanınızdan düşülmüş ve kurulum başlamıştır. Bağlantı koparsa aynı anahtar ve aynı gövdeyle tekrar deneyin.
cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/orders" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: siparis-a1042-7f3c9e2b" \
-d '{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21"
}
}
],
"payment" : {
"method" : "balance"
},
"terms" : true,
"notes" : "Müşteri ref: A-1042"
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21"
}
}
],
"payment" : {
"method" : "balance"
},
"terms" : true ,
"notes" : "Müşteri ref: A-1042"
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
'Idempotency-Key: siparis-a1042-7f3c9e2b' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
'Idempotency-Key' : 'siparis-a1042-7f3c9e2b' ,
},
body: JSON.stringify({
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21"
}
}
],
"payment" : {
"method" : "balance"
},
"terms" : true ,
"notes" : "Müşteri ref: A-1042"
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/orders" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
"Idempotency-Key" : "siparis-a1042-7f3c9e2b" ,
},
json={
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"requirements" : {
"7" : "21" ,
},
},
],
"payment" : {
"method" : "balance" ,
},
"terms" : True ,
"notes" : "Müşteri ref: A-1042" ,
},
timeout=30 ,
)
print (res.status_code, res.json())
Kurulumu takip edin
GET /orders/{id} yanıtındaki services dizisi dolup tüm hizmetler active olana kadar 15 saniyede bir sorgulayın.
cURL PHP Node.js Python
Kopyala Kopyalandı # jq gerekir
BASE="https://sunucuatlas.com/api/v1/client"
TOKEN="wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
until curl -s "$BASE/orders/10234" -H "Authorization: Bearer $TOKEN" \
| jq -e '.data.services | length > 0 and all(.status == "active")' > /dev/null; do
sleep 15
done
curl -s "$BASE/orders/10234" -H "Authorization: Bearer $TOKEN" | jq '.data.services' <?php
$base = 'https://sunucuatlas.com/api/v1/client' ;
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
do {
$ch = curl_init($base . '/orders/10234' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $token ],
]);
$order = json_decode (curl_exec($ch ), true )['data' ];
curl_close($ch );
$services = $order ['services' ];
$active = array_filter ($services , function ($s ) { return $s ['status' ] === 'active' ; });
$ready = $services && count ($active ) === count ($services );
if (!$ready ) {
sleep (15 );
}
} while (!$ready );
print_r (array_column ($services , 'id' ));const BASE = 'https://sunucuatlas.com/api/v1/client' ;
const headers = { Authorization: 'Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' };
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
(async () => {
let order;
for (;;) {
const res = await fetch (`${BASE}/orders/10234` , { headers });
order = (await res.json()).data;
const s = order.services;
if (s.length && s.every((x) => x.status === 'active' )) break ;
await sleep(15000 );
}
console.log(order.services.map((x) => x.id));
})();import time
import requests
BASE = "https://sunucuatlas.com/api/v1/client"
HEADERS = {"Authorization" : "Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }
while True :
res = requests.get(f"{BASE}/orders/10234" , headers=HEADERS, timeout=30 )
order = res.json()["data" ]
services = order["services" ]
if services and all (s["status" ] == "active" for s in services):
break
time.sleep(15 )
print ([s["id" ] for s in services])
Erişim bilgilerini alın
access nesnesindeki sunucu adresi, kullanıcı adı ve şifreyi müşterinize güvenli bir kanaldan iletin.
cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/services/77" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/services/77" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())
Yenileyin ve faturayı ödeyin
Yenileme faturası oluşturun (açık fatura varsa o döner), ardından dönen invoice_id ile faturayı cüzdandan ödeyin.
cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/renew" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/renew' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/renew' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/services/77/renew" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())
cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/invoices/55188/pay" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: fatura-55188-odeme" \
-d '{
"payment" : {
"method" : "balance"
}
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"payment" : {
"method" : "balance"
}
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/invoices/55188/pay' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
'Idempotency-Key: fatura-55188-odeme' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/invoices/55188/pay' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
'Idempotency-Key' : 'fatura-55188-odeme' ,
},
body: JSON.stringify({
"payment" : {
"method" : "balance"
}
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/invoices/55188/pay" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
"Idempotency-Key" : "fatura-55188-odeme" ,
},
json={
"payment" : {
"method" : "balance" ,
},
},
timeout=30 ,
)
print (res.status_code, res.json())
Uç noktalar
Sistem
Bağlantıyı ve API anahtarınızı doğrulayın.
Bağlantı testi Kimlik doğrulama gerekmez # GET /ping
API’nin erişilebilir olduğunu doğrular. Kimlik doğrulama gerektirmez; izleme (health check) için uygundur.
Parametreler Bu uç parametre almaz.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/ping" <?php
$ch = curl_init('https://sunucuatlas.com/api/v1/client/ping' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/ping' );
console.log(res.status, await res.json());
})();import requests
res = requests.get(
"https://sunucuatlas.com/api/v1/client/ping" ,
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"pong" : true ,
"version" : "v1" ,
"time" : "2026-12-05 14:30:00"
}
}Olası hatalar GET /whoami
İsteği yapan API anahtarını ve sahibini döndürür. id anahtarın, owner_id hesabın kimliğidir. Entegrasyonu kurarken anahtarın çalıştığını doğrulamak için kullanın.
Parametreler Bu uç parametre almaz.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/whoami" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/whoami' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/whoami' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/whoami" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"id" : 12 ,
"type" : "client" ,
"name" : "Mağaza entegrasyonu" ,
"permissions" : [
"*"
],
"last_access" : "2026-12-05 14:28:11" ,
"owner_id" : 4821
}
}Olası hatalar
Uç noktalar
Hesap & Bakiye
Hesap profiliniz, cüzdan bakiyeniz ve bakiye hareketleri.
GET /me
Anahtarın sahibi olan hesabın profilini ve güncel cüzdan bakiyesini döndürür. kind değeri individual veya corporate olur; şirket bilgileri company nesnesindedir.
Parametreler Bu uç parametre almaz.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/me" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/me' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/me' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/me" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"id" : 4821 ,
"kind" : "corporate" ,
"full_name" : "Ayşe Yılmaz" ,
"name" : "Ayşe" ,
"surname" : "Yılmaz" ,
"company" : {
"name" : "Örnek Bilişim Ltd. Şti." ,
"tax_number" : "1234567890" ,
"tax_office" : "Kadıköy"
},
"email" : "ayse@example.com" ,
"email_verified" : true ,
"phone" : "+905550000000" ,
"phone_verified" : true ,
"language" : "tr" ,
"country" : "TR" ,
"currency" : "TRY" ,
"balance" : {
"amount" : 2450.75 ,
"currency" : "TRY"
},
"created_at" : "2026-11-02" ,
"last_login_at" : "2026-12-05"
}
}Olası hatalar GET /balance
Cüzdan bakiyesini döndürür. API siparişleri yalnızca bu bakiyeden ödenir; sipariş öncesinde toplamı karşıladığını kontrol edin. wallet_empty ve low_balance bayrakları uyarı göstermek için kullanılabilir.
Parametreler Bu uç parametre almaz.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/balance" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/balance' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/balance' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/balance" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"balance" : {
"amount" : 2450.75 ,
"currency" : "TRY"
},
"wallet_empty" : false ,
"low_balance" : false
}
}Olası hatalar GET /balance/transactions
Bakiye yüklemelerini (up) ve harcamalarını (down) sayfalı olarak listeler. created_at ISO 8601 biçimindedir.
Parametreler Parametre Tür Zorunlu Açıklama type query string İsteğe bağlı up (yükleme) veya down (harcama).page query integer İsteğe bağlı Sayfa numarası (≥ 1, varsayılan 1). limit query integer İsteğe bağlı Sayfa başına kayıt (1–100, varsayılan 25).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/balance/transactions?type=down&limit=25" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/balance/transactions?type=down&limit=25' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/balance/transactions?type=down&limit=25' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/balance/transactions?type=down&limit=25" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"transaction_id" : 90311 ,
"type" : "down" ,
"amount" : {
"amount" : 420 ,
"currency" : "TRY"
},
"description" : "Fatura #55120 ödemesi" ,
"invoice_id" : 55120 ,
"created_at" : "2026-12-05T14:31:02+03:00"
}
],
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
}Olası hatalar
Uç noktalar
Bayi
Bayilik durumunuz ve size özel net alış fiyatları. Bu iki uç, istemci API’sine eklenen bayi uzantısıdır.
Bayilik durumu Bayi uzantısı # GET /reseller
Bayilik durumunuzu, türünüzü, indirim oranınızı ve aktivasyon için gereken bakiye ilerlemesini döndürür. status: pending, active, suspended, rejected veya none. rate türünüze göre ulaşılabilecek en yüksek indirim oranıdır; ürün bazındaki gerçek oran için GET /reseller/prices kullanın.
Parametreler Bu uç parametre almaz.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/reseller" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/reseller' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/reseller' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/reseller" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"status" : "active" ,
"kind" : "individual" ,
"rate" : 30 ,
"min_deposit" : {
"amount" : 2000 ,
"currency" : "TRY"
},
"deposit_progress" : {
"have" : {
"amount" : 2000 ,
"currency" : "TRY"
},
"left" : {
"amount" : 0 ,
"currency" : "TRY"
},
"reached" : true
},
"activated_at" : "2026-11-03"
}
}Olası hatalar Bayi fiyatları Bayi uzantısı # GET /reseller/prices
Her ürün ve dönem için liste fiyatını (list), size özel net alış fiyatını (reseller) ve uygulanan indirim oranını (discount_pct) döndürür. Maliyet tabanı uygulanmış nihai fiyattır; KDV hariçtir. Sayfalama GET /products ile aynıdır.
Örnekteki ikinci üründe indirim %22’de kalır: indirimli fiyat maliyet tabanının altına inmez.
Parametreler Parametre Tür Zorunlu Açıklama category query integer İsteğe bağlı Kategori kimliğine göre filtrele. search query string İsteğe bağlı Ürün adında ara. page query integer İsteğe bağlı Sayfa numarası (≥ 1, varsayılan 1). limit query integer İsteğe bağlı Sayfa başına kayıt (1–100, varsayılan 25).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"id" : 41 ,
"title" : "VDS Başlangıç" ,
"category" : {
"id" : 3 ,
"name" : "VDS Sunucular"
},
"pricing" : [
{
"cycle" : "monthly" ,
"list" : {
"amount" : 500 ,
"currency" : "TRY"
},
"reseller" : {
"amount" : 350 ,
"currency" : "TRY"
},
"discount_pct" : 30
},
{
"cycle" : "annually" ,
"list" : {
"amount" : 5000 ,
"currency" : "TRY"
},
"reseller" : {
"amount" : 3500 ,
"currency" : "TRY"
},
"discount_pct" : 30
}
]
},
{
"id" : 57 ,
"title" : "VDS Pro" ,
"category" : {
"id" : 3 ,
"name" : "VDS Sunucular"
},
"pricing" : [
{
"cycle" : "monthly" ,
"list" : {
"amount" : 900 ,
"currency" : "TRY"
},
"reseller" : {
"amount" : 702 ,
"currency" : "TRY"
},
"discount_pct" : 22
}
]
}
],
"meta" : {
"total" : 2 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
}Olası hatalar
Uç noktalar
Ürünler
Sipariş verilebilir ürünler, kategoriler, eklentiler ve sipariş gereksinimleri. Buradaki fiyatlar liste fiyatıdır.
GET /products/categories
Ürün kategorilerini döndürür. parent üst kategorinin kimliğidir; toplam kayıt sayısı meta.total içindedir.
Parametreler Bu uç parametre almaz.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/products/categories" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/products/categories' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/products/categories' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/products/categories" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"id" : 3 ,
"parent" : 0 ,
"type" : "server" ,
"name" : "VDS Sunucular"
},
{
"id" : 5 ,
"parent" : 0 ,
"type" : "server" ,
"name" : "Oyun Sunucuları"
}
],
"meta" : {
"total" : 2
}
}Olası hatalar GET /products
Ürünleri liste fiyatlarıyla döndürür; bayi indirimi uygulanmaz. Net alış fiyatı için GET /reseller/prices veya POST /orders/preview kullanın. Fiyatların para birimi meta.currency içindedir.
Parametreler Parametre Tür Zorunlu Açıklama category query integer İsteğe bağlı Kategori kimliğine göre filtrele. search query string İsteğe bağlı Ürün adında ara. type query string İsteğe bağlı Ürün türüne göre filtrele. page query integer İsteğe bağlı Sayfa numarası (≥ 1, varsayılan 1). limit query integer İsteğe bağlı Sayfa başına kayıt (1–100, varsayılan 25).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/products?category=3" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/products?category=3' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/products?category=3' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/products?category=3" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"id" : 41 ,
"type" : "server" ,
"title" : "VDS Başlangıç" ,
"tagline" : "2 vCPU · 4 GB RAM · 60 GB NVMe" ,
"category" : {
"id" : 3 ,
"name" : "VDS Sunucular"
},
"in_stock" : true ,
"stock" : null ,
"pricing" : [
{
"cycle" : "monthly" ,
"price" : {
"amount" : 500 ,
"currency" : "TRY"
},
"setup" : null ,
"promo" : false
},
{
"cycle" : "annually" ,
"price" : {
"amount" : 5000 ,
"currency" : "TRY"
},
"setup" : null ,
"promo" : false
}
]
}
],
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0 ,
"currency" : "TRY"
}
}Olası hatalar GET /products/{id}
Tek bir ürünü liste alanlarına ek olarak açıklama, adet kuralları (quantity), kullanıcı başına sipariş sınırı, eklentiler (addons), sipariş gereksinimleri (requirements) ve alan adı modu (domain.mode: none, chooser, required …) ile döndürür. Sipariş kalemindeki kimlikleri buradan alın.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Ürün kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/products/41" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/products/41' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/products/41' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/products/41" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"id" : 41 ,
"type" : "server" ,
"title" : "VDS Başlangıç" ,
"tagline" : "2 vCPU · 4 GB RAM · 60 GB NVMe" ,
"category" : {
"id" : 3 ,
"name" : "VDS Sunucular"
},
"in_stock" : true ,
"stock" : null ,
"pricing" : [
{
"cycle" : "monthly" ,
"price" : {
"amount" : 500 ,
"currency" : "TRY"
},
"setup" : null ,
"promo" : false
}
],
"description" : "NVMe disk, DDoS koruması ve tam root erişimi." ,
"quantity" : {
"allowed" : false ,
"mode" : "single"
},
"order_limit_per_user" : 0 ,
"addons" : [
{
"id" : 14 ,
"name" : "İşlemci" ,
"description" : "Ek vCPU çekirdeği" ,
"field_type" : "select" ,
"required" : false ,
"options" : [
{
"id" : 31 ,
"name" : "+2 vCPU" ,
"cycle" : "monthly" ,
"price" : {
"amount" : 120 ,
"currency" : "TRY"
}
}
]
}
],
"requirements" : [
{
"id" : 7 ,
"name" : "İşletim sistemi" ,
"field_type" : "select" ,
"required" : true ,
"options" : [
{
"id" : 21 ,
"name" : "Ubuntu 24.04"
},
{
"id" : 22 ,
"name" : "Windows Server 2022"
}
]
}
],
"domain" : {
"mode" : "none"
}
}
}Olası hatalar
Uç noktalar
Siparişler
Sepeti önizleyin, cüzdandan ödenen sipariş oluşturun ve kurulumu takip edin.
Sipariş kalemi nesnesi
items dizisinin her elemanı bu yapıdadır. Bir istekte en fazla 20 kalem gönderilebilir.
Sipariş kalemi nesnesi Parametre Tür Zorunlu Açıklama product_idinteger Zorunlu Ürün kimliği. cyclestring Zorunlu Faturalama dönemi (ör. monthly). quantityinteger İsteğe bağlı Adet, varsayılan 1. domain.optionstring İsteğe bağlı owned (kendi alan adınız) veya none.domain.namestring İsteğe bağlı Alan adı. addonsobject İsteğe bağlı Eklenti kimliğinden seçenek kimliğine eşleme: {"<addon_id>": "<option_id>"} veya çoklu seçimde ["<id>", …]. requirementsobject İsteğe bağlı Gereksinim alanı kimliğinden değere eşleme: {"<field_id>": "değer"}.
POST /orders/preview
Hiçbir kayıt oluşturmadan sepeti hesaplar: kalem tutarları, bayi indirimi (discount), KDV (tax) ve ödenecek toplam (total). Tüm tutarlar para nesnesidir. Sipariş vermeden önce çağırın ve total değerini bakiyenizle karşılaştırın.
Parametreler Parametre Tür Zorunlu Açıklama items body array Zorunlu Sipariş kalemleri (en fazla 20). Yapı için aşağıdaki Sipariş kalemi nesnesine bakın. billing_profile_id body integer İsteğe bağlı Faturalama profili kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/orders/preview" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21"
}
}
]
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21"
}
}
]
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders/preview' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders/preview' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
},
body: JSON.stringify({
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21"
}
}
]
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/orders/preview" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
json={
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21" ,
},
},
],
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"items" : [
{
"kind" : "product" ,
"product_id" : 41 ,
"name" : "VDS Başlangıç" ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"domain" : null ,
"unit_price" : {
"amount" : 500 ,
"currency" : "TRY"
},
"setup" : null ,
"total" : {
"amount" : 500 ,
"currency" : "TRY"
}
}
],
"subtotal" : {
"amount" : 500 ,
"currency" : "TRY"
},
"discount" : {
"amount" : 150 ,
"currency" : "TRY"
},
"tax" : {
"amount" : 70 ,
"currency" : "TRY"
},
"fee" : null ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
}
}
}Olası hatalar Sipariş oluştur Idempotency-Key önerilir # POST /orders
Siparişi oluşturur ve tutarı cüzdanınızdan tahsil eder. Bakiye toplamı karşılamıyorsa hiçbir kayıt oluşturulmadan 422 insufficient_balance döner. Ödeme alındığında hizmetler otomatik kurulur. Başarılı yanıt 201 kodludur.
Her sipariş için benzersiz bir Idempotency-Key gönderin. Zaman aşımı veya bağlantı hatasında aynı anahtar ve aynı gövdeyle tekrar deneyin; çift sipariş oluşmaz. payment.status değeri paid veya failed olur, hata durumunda payment.error eklenir.
Parametreler Parametre Tür Zorunlu Açıklama Idempotency-Key header string Önerilir 8–191 karakterlik benzersiz anahtar. Tekrar denemede aynı anahtarı ve aynı gövdeyi gönderin. items body array Zorunlu Sipariş kalemleri (en fazla 20). payment.method body string Zorunlu Her zaman balance. terms body boolean Zorunlu Hizmet sözleşmesini onaylamak için true. notes body string İsteğe bağlı Sipariş notu (ör. kendi müşteri referansınız).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/orders" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: siparis-a1042-7f3c9e2b" \
-d '{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21"
}
}
],
"payment" : {
"method" : "balance"
},
"terms" : true,
"notes" : "Müşteri ref: A-1042"
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21"
}
}
],
"payment" : {
"method" : "balance"
},
"terms" : true ,
"notes" : "Müşteri ref: A-1042"
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
'Idempotency-Key: siparis-a1042-7f3c9e2b' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
'Idempotency-Key' : 'siparis-a1042-7f3c9e2b' ,
},
body: JSON.stringify({
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21"
}
}
],
"payment" : {
"method" : "balance"
},
"terms" : true ,
"notes" : "Müşteri ref: A-1042"
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/orders" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
"Idempotency-Key" : "siparis-a1042-7f3c9e2b" ,
},
json={
"items" : [
{
"product_id" : 41 ,
"cycle" : "monthly" ,
"quantity" : 1 ,
"requirements" : {
"7" : "21" ,
},
},
],
"payment" : {
"method" : "balance" ,
},
"terms" : True ,
"notes" : "Müşteri ref: A-1042" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 201 Yanıt Kopyala Kopyalandı {
"data" : {
"order_id" : 10234 ,
"number" : "10234" ,
"status" : "inprocess" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"payment" : {
"method" : "balance" ,
"status" : "paid"
},
"invoice" : {
"invoice_id" : 55120 ,
"number" : "55120" ,
"status" : "paid" ,
"state" : "paid" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"created_at" : "2026-12-05" ,
"paid_at" : "2026-12-05" ,
"due_date" : "2026-12-05"
}
}
}Olası hatalar GET /orders
Siparişlerinizi sayfalı olarak listeler.
Parametreler Parametre Tür Zorunlu Açıklama status query string İsteğe bağlı waiting, inprocess, active veya cancelled.page query integer İsteğe bağlı Sayfa numarası (≥ 1, varsayılan 1). limit query integer İsteğe bağlı Sayfa başına kayıt (1–100, varsayılan 25).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/orders?status=active" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders?status=active' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders?status=active' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/orders?status=active" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"id" : 10234 ,
"number" : "10234" ,
"status" : "active" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"payment_method" : "balance" ,
"invoice_id" : 55120 ,
"items_count" : 1 ,
"created_at" : "2026-12-05"
}
],
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
}Olası hatalar GET /orders/{id}
Liste alanlarına ek olarak kalemleri, siparişten oluşan hizmetleri (services), fatura özetini ve notları döndürür. Kurulumu takip etmek için hizmetler active olana kadar bu ucu aralıklarla sorgulayın.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Sipariş kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/orders/10234" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/orders/10234' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/orders/10234' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/orders/10234" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"id" : 10234 ,
"number" : "10234" ,
"status" : "active" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"payment_method" : "balance" ,
"invoice_id" : 55120 ,
"items_count" : 1 ,
"created_at" : "2026-12-05" ,
"items" : [
{
"name" : "VDS Başlangıç" ,
"quantity" : 1 ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
}
}
],
"services" : [
{
"id" : 77 ,
"name" : "VDS Başlangıç" ,
"type" : "server" ,
"status" : "active"
}
],
"invoice" : {
"invoice_id" : 55120 ,
"number" : "55120" ,
"status" : "paid" ,
"state" : "paid" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"created_at" : "2026-12-05" ,
"paid_at" : "2026-12-05" ,
"due_date" : "2026-12-05"
},
"notes" : "Müşteri ref: A-1042"
}
}Olası hatalar
Uç noktalar
Hizmetler
Aktif hizmetler, erişim bilgileri, yenileme, iptal, araçlar ve şifre değişikliği.
GET /services
Hizmetlerinizi sayfalı olarak listeler.
Parametreler Parametre Tür Zorunlu Açıklama status query string İsteğe bağlı active, pending, suspended, expired veya cancelled.search query string İsteğe bağlı Hizmet adında veya sunucu adresinde ara. page query integer İsteğe bağlı Sayfa numarası (≥ 1, varsayılan 1). limit query integer İsteğe bağlı Sayfa başına kayıt (1–100, varsayılan 25).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/services?status=active" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services?status=active' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services?status=active' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/services?status=active" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"id" : 77 ,
"type" : "server" ,
"name" : "VDS Başlangıç" ,
"status" : "active" ,
"host" : "203.0.113.77" ,
"product_id" : 41 ,
"auto_renew" : false ,
"price" : {
"amount" : 350 ,
"currency" : "TRY"
},
"cycle" : "monthly" ,
"created_at" : "2026-12-05" ,
"due_date" : "2027-01-05"
}
],
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
}Olası hatalar GET /services/{id}
Liste alanlarına ek olarak ürünü, sipariş kimliğini, erişim bilgilerini (access), yenileme seçeneklerini (renewal) ve varsa iptal talebini (cancellation) döndürür. renewal.cycles fiyatları bayi indirimi uygulanmış tutarlardır.
Erişim bilgileri gizli veridir: yalnızca sunucu tarafında işleyin, kayıt (log) dosyalarına yazmayın.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/services/77" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/services/77" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"id" : 77 ,
"type" : "server" ,
"name" : "VDS Başlangıç" ,
"status" : "active" ,
"host" : "203.0.113.77" ,
"product_id" : 41 ,
"auto_renew" : false ,
"price" : {
"amount" : 350 ,
"currency" : "TRY"
},
"cycle" : "monthly" ,
"created_at" : "2026-12-05" ,
"due_date" : "2027-01-05" ,
"product" : {
"id" : 41 ,
"name" : "VDS Başlangıç"
},
"order_id" : 10234 ,
"access" : {
"domain" : null ,
"hostname" : "vds77.example.net" ,
"ip" : "203.0.113.77" ,
"assigned_ips" : [
"203.0.113.78"
],
"username" : "root" ,
"password" : "XXXXXXXXXXXX" ,
"server" : "node-1"
},
"renewal" : {
"available" : true ,
"cycles" : [
{
"cycle" : "monthly" ,
"price" : {
"amount" : 350 ,
"currency" : "TRY"
}
},
{
"cycle" : "annually" ,
"price" : {
"amount" : 3500 ,
"currency" : "TRY"
}
}
]
},
"cancellation" : null
}
}Olası hatalar Yenileme faturası oluştur # POST /services/{id}/renew
Hizmet için yenileme faturası oluşturur ve 201 ile existing: false döndürür. Açık bir yenileme faturası zaten varsa onu 200 ve existing: true ile döndürür. Faturayı POST /invoices/{id}/pay ile ödeyin.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/renew" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/renew' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/renew' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/services/77/renew" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 201 Yanıt Kopyala Kopyalandı {
"data" : {
"invoice_id" : 55188 ,
"number" : "55188" ,
"status" : "unpaid" ,
"state" : "unpaid" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"created_at" : "2026-12-29" ,
"paid_at" : null ,
"due_date" : "2027-01-05" ,
"existing" : false
}
}Olası hatalar POST /services/{id}/cancellation
Hizmet için iptal talebi oluşturur ve 201 ile iptal nesnesini döndürür.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği. urgency body string Zorunlu now (hemen) veya period-ending (dönem sonunda).reason body string Zorunlu not-needed, too-expensive, switching, missing-features veya other.reason_detail body string İsteğe bağlı Neden açıklaması. note body string İsteğe bağlı Ek not.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/cancellation" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"urgency" : "period-ending" ,
"reason" : "not-needed" ,
"reason_detail" : "Müşteri projeyi kapattı."
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"urgency" : "period-ending" ,
"reason" : "not-needed" ,
"reason_detail" : "Müşteri projeyi kapattı."
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/cancellation' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/cancellation' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
},
body: JSON.stringify({
"urgency" : "period-ending" ,
"reason" : "not-needed" ,
"reason_detail" : "Müşteri projeyi kapattı."
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/services/77/cancellation" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
json={
"urgency" : "period-ending" ,
"reason" : "not-needed" ,
"reason_detail" : "Müşteri projeyi kapattı." ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 201 Yanıt Kopyala Kopyalandı {
"data" : {
"status" : "pending" ,
"urgency" : "period-ending" ,
"reason" : "not-needed" ,
"requested_at" : "2026-12-05"
}
}Olası hatalar DELETE /services/{id}/cancellation
Bekleyen iptal talebini geri alır. DELETE gönderemeyen istemciler POST ve X-Http-Method-Override: DELETE başlığını kullanabilir.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X DELETE "https://sunucuatlas.com/api/v1/client/services/77/cancellation" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/cancellation' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'DELETE' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/cancellation' , {
method: 'DELETE' ,
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.delete(
"https://sunucuatlas.com/api/v1/client/services/77/cancellation" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"revoked" : true ,
"service_id" : 77
}
}Olası hatalar GET /services/{id}/tools
Hizmette kullanılabilen araçları listeler. Modül destekliyorsa güç araçları start-server, stop-server ve restart-server anahtarlarıyla gelir.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/services/77/tools" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/tools' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/tools' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/services/77/tools" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"key" : "start-server" ,
"group" : "power" ,
"label" : "Başlat" ,
"capabilities" : [
"index"
]
},
{
"key" : "stop-server" ,
"group" : "power" ,
"label" : "Durdur" ,
"capabilities" : [
"index"
]
},
{
"key" : "restart-server" ,
"group" : "power" ,
"label" : "Yeniden başlat" ,
"capabilities" : [
"index"
]
}
]
}Olası hatalar POST /services/{id}/tools/{tool}/{action}
Bir aracı çalıştırır. Örnek: sunucuyu yeniden başlatmak için POST /services/77/tools/restart-server/index.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği. tool path string Zorunlu Araç anahtarı (GET /services/{id}/tools yanıtındaki key). action path string Zorunlu Eylem adı (güç araçlarında index).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/tools/restart-server/index" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/tools/restart-server/index' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/tools/restart-server/index' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/services/77/tools/restart-server/index" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"status" : "successful" ,
"message" : "Sunucu yeniden başlatılıyor."
}
}Olası hatalar Hizmet şifresini değiştir # POST /services/{id}/password
Hizmetin erişim şifresini değiştirir.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Hizmet kimliği. password body string Zorunlu Yeni şifre.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/password" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-d '{
"password" : "YeniSifre_2026x"
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"password" : "YeniSifre_2026x"
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/services/77/password' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/services/77/password' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
},
body: JSON.stringify({
"password" : "YeniSifre_2026x"
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/services/77/password" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
json={
"password" : "YeniSifre_2026x" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"changed" : true ,
"service_id" : 77
}
}Olası hatalar
Uç noktalar
Faturalar
Faturaları listeleyin, ayrıntısını görün ve cüzdandan ödeyin.
Fatura özeti nesnesi
Fatura listeleri, sipariş ve yenileme yanıtları bu özeti kullanır.
Fatura özeti nesnesi Parametre Tür Zorunlu Açıklama invoice_idinteger Zorunlu Fatura kimliği. numberstring Zorunlu Fatura numarası. statusstring Zorunlu paid, unpaid, refund veya cancelled.statestring Zorunlu paid, unpaid, overdue, refunded veya cancelled; vadesi geçmiş faturalar overdue olur.totalmoney Zorunlu Fatura toplamı. created_atdate Zorunlu Oluşturma tarihi. paid_atdate|null Zorunlu Ödeme tarihi. due_datedate Zorunlu Son ödeme tarihi.
GET /invoices
Faturalarınızı sayfalı olarak listeler. Her kayıt fatura özeti, ilk kalem (first_item) ve kalan borç (amount_due) içerir.
Parametreler Parametre Tür Zorunlu Açıklama status query string İsteğe bağlı paid, unpaid, overdue, refunded veya cancelled.page query integer İsteğe bağlı Sayfa numarası (≥ 1, varsayılan 1). limit query integer İsteğe bağlı Sayfa başına kayıt (1–100, varsayılan 25).
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/invoices?status=unpaid" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/invoices?status=unpaid' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/invoices?status=unpaid' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/invoices?status=unpaid" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : [
{
"invoice_id" : 55188 ,
"number" : "55188" ,
"status" : "unpaid" ,
"state" : "unpaid" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"created_at" : "2026-12-29" ,
"paid_at" : null ,
"due_date" : "2027-01-05" ,
"first_item" : "VDS Başlangıç (2027-01-05 - 2027-02-05)" ,
"amount_due" : {
"amount" : 420 ,
"currency" : "TRY"
}
}
],
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
}Olası hatalar GET /invoices/{id}
Fatura özetine ek olarak kalemleri, tutar dökümünü (summary: ara toplam, bayi indirimi, KDV, toplam, ödenen, kalan) ve ödeme hareketlerini döndürür.
Parametreler Parametre Tür Zorunlu Açıklama id path integer Zorunlu Fatura kimliği.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl "https://sunucuatlas.com/api/v1/client/invoices/55188" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" <?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/invoices/55188' );
curl_setopt_array($ch , [
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
],
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/invoices/55188' , {
headers: {
Authorization: `Bearer ${token}` ,
},
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.get(
"https://sunucuatlas.com/api/v1/client/invoices/55188" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"invoice_id" : 55188 ,
"number" : "55188" ,
"status" : "unpaid" ,
"state" : "unpaid" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"created_at" : "2026-12-29" ,
"paid_at" : null ,
"due_date" : "2027-01-05" ,
"items" : [
{
"item_id" : 81200 ,
"description" : "VDS Başlangıç" ,
"service_id" : 77 ,
"cycle" : "monthly" ,
"period_start" : "2027-01-05" ,
"period_end" : "2027-02-05" ,
"quantity" : 1 ,
"unit_price" : {
"amount" : 500 ,
"currency" : "TRY"
},
"total" : {
"amount" : 500 ,
"currency" : "TRY"
}
}
],
"summary" : {
"subtotal" : {
"amount" : 500 ,
"currency" : "TRY"
},
"discounts" : {
"reseller" : {
"amount" : 150 ,
"currency" : "TRY"
},
"coupon" : null
},
"tax" : {
"rate" : 20 ,
"amount" : {
"amount" : 70 ,
"currency" : "TRY"
}
},
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"paid" : {
"amount" : 0 ,
"currency" : "TRY"
},
"amount_due" : {
"amount" : 420 ,
"currency" : "TRY"
}
},
"transactions" : []
}
}Olası hatalar Faturayı öde Idempotency-Key önerilir # POST /invoices/{id}/pay
Faturayı cüzdan bakiyesinden öder. Bakiye yetersizse insufficient_balance (ayrıntılarda required ve available), fatura ödenebilir durumda değilse invoice_not_payable döner.
Parametreler Parametre Tür Zorunlu Açıklama Idempotency-Key header string Önerilir 8–191 karakterlik benzersiz anahtar. Tekrar denemede aynı anahtarı ve aynı gövdeyi gönderin. id path integer Zorunlu Fatura kimliği. payment.method body string Zorunlu Her zaman balance.
Örnek istek cURL PHP Node.js Python
Kopyala Kopyalandı curl -X POST "https://sunucuatlas.com/api/v1/client/invoices/55188/pay" \
-H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: fatura-55188-odeme" \
-d '{
"payment" : {
"method" : "balance"
}
}'<?php
$token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
$body = <<<'JSON'
{
"payment" : {
"method" : "balance"
}
}
JSON;
$ch = curl_init('https://sunucuatlas.com/api/v1/client/invoices/55188/pay' );
curl_setopt_array($ch , [
CURLOPT_CUSTOMREQUEST => 'POST' ,
CURLOPT_RETURNTRANSFER => true ,
CURLOPT_TIMEOUT => 30 ,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . $token ,
'Content-Type: application/json' ,
'Idempotency-Key: fatura-55188-odeme' ,
],
CURLOPT_POSTFIELDS => $body ,
]);
$response = curl_exec($ch );
$status = curl_getinfo($ch , CURLINFO_HTTP_CODE);
curl_close($ch );
echo $status , PHP_EOL;
print_r (json_decode ($response , true ));const token = 'wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' ;
(async () => {
const res = await fetch ('https://sunucuatlas.com/api/v1/client/invoices/55188/pay' , {
method: 'POST' ,
headers: {
Authorization: `Bearer ${token}` ,
'Content-Type' : 'application/json' ,
'Idempotency-Key' : 'fatura-55188-odeme' ,
},
body: JSON.stringify({
"payment" : {
"method" : "balance"
}
}),
});
console.log(res.status, await res.json());
})();import requests
TOKEN = "wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
res = requests.post(
"https://sunucuatlas.com/api/v1/client/invoices/55188/pay" ,
headers={
"Authorization" : f"Bearer {TOKEN}" ,
"Idempotency-Key" : "fatura-55188-odeme" ,
},
json={
"payment" : {
"method" : "balance" ,
},
},
timeout=30 ,
)
print (res.status_code, res.json())Örnek yanıt 200 Yanıt Kopyala Kopyalandı {
"data" : {
"invoice" : {
"invoice_id" : 55188 ,
"number" : "55188" ,
"status" : "paid" ,
"state" : "paid" ,
"total" : {
"amount" : 420 ,
"currency" : "TRY"
},
"created_at" : "2026-12-29" ,
"paid_at" : "2026-12-29" ,
"due_date" : "2027-01-05" ,
"amount_due" : {
"amount" : 0 ,
"currency" : "TRY"
}
},
"payment" : {
"method" : "balance" ,
"status" : "paid"
}
}
}Olası hatalar