Aan de slag
Snelstart
Plaats uw eerste bestelling via de API in vier stappen.
Vraag het resellerprogramma aan
Vul het aanvraagformulier in (particulier of bedrijf). Zodra uw walletsaldo 2.000 ₺ bereikt (bestaand tegoed of totale opwaarderingen na de aanvraag), wordt uw reselleraccount automatisch geactiveerd . Activering gebeurt eenmalig; latere uitgaven deactiveren uw reselleraccount niet.
Maak een API-sleutel aan
Maak in het resellerpaneel een nieuwe sleutel aan. De sleutel begint met wck_ en wordt slechts één keer getoond ; sla hem direct op een veilige plek op. U kunt maximaal 20 sleutels per account aanmaken en elke sleutel beperken tot specifieke IP-adressen.
Verstuur uw eerste verzoek
GET /me retourneert uw account en saldo. Ontvangt u het antwoord 200, dan werkt uw sleutel.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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())
Plaats uw eerste bestelling
Bekijk eerst met POST /orders/preview het nettobedrag en verstuur daarna met dezelfde items POST /orders. Gebruik bij een bestelling altijd een unieke Idempotency-Key.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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
Kopiëren Gekopieerd 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())
Basisbeginselen
Authenticatie
Voeg bij elk verzoek uw API-sleutel als Bearer-token toe in de header Authorization. Clients die deze header niet kunnen instellen, kunnen de header X-Api-Key gebruiken. Alleen GET /ping vereist geen authenticatie.
Verzoekheaders Kopiëren Gekopieerd Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
# alternatif
X-Api-Key: wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Sleutelformaat: wck_ + 32 tekens (0-9A-Za-z). De sleutel wordt alleen bij het aanmaken één keer getoond; in het systeem wordt alleen de hash (SHA-256) opgeslagen, daarom kan een verloren sleutel niet worden hersteld.
Sleutels worden in het resellerpaneel aangemaakt en ingetrokken. Per account kunnen maximaal 20 sleutels worden ingesteld.
Voor elke sleutel kunt u een optionele IP-toelatingslijst (volledige IP-adressen) instellen. Verzoeken van adressen die niet op de lijst staan, krijgen 403 ip_not_allowed terug.
De API werkt alleen voor actieve resellers ; andere accounts krijgen 403 client_api_not_allowed terug.
Zet uw sleutel niet in client-side code zoals een browser, mobiele app of openbare repository. Verstuur verzoeken altijd vanaf uw eigen server; lekt de sleutel uit, trek hem dan direct in via het panel en maak een nieuwe aan.
Structuur van verzoeken en antwoorden
De API ontvangt en retourneert JSON met UTF-8-codering. Gebruik bij verzoeken met een body Content-Type: application/json. Alle paden zijn relatief ten opzichte van de base URL: https://sunucuatlas.com/api/v1/client/orders.
Succesvol antwoord
Data staat altijd in het veld data (object, array of null). Bij gepagineerde lijsten wordt meta toegevoegd; dit is alleen aanwezig wanneer nodig. De statuscode is 200, bij verzoeken die een nieuw record aanmaken 201.
200 Succesvol antwoord Kopiëren Gekopieerd {
"data" : {
"id" : 77 ,
"status" : "active"
},
"meta" : {
"total" : 1 ,
"page" : 1 ,
"limit" : 25 ,
"next_page" : 0
}
} Foutantwoord
Bij fouten bevat de body één error-object: een machineleesbare code, een voor mensen leesbare message en, indien aanwezig, details met aanvullende informatie. Baseer beslissingen in uw integratie altijd op het veld code.
422 Foutantwoord Kopiëren Gekopieerd {
"error" : {
"code" : "insufficient_balance" ,
"message" : "Bakiye yetersiz." ,
"details" : {
"required" : {
"amount" : 420 ,
"currency" : "TRY"
},
"available" : {
"amount" : 180.5 ,
"currency" : "TRY"
}
}
}
} Methode-override en CORS
Clients die geen PATCH, PUT of DELETE kunnen versturen, kunnen het verzoek als POST versturen en de header X-Http-Method-Override: PATCH|PUT|DELETE toevoegen. Voor CORS retourneert de API Access-Control-Allow-Origin: * en beantwoordt OPTIONS-verzoeken met 204; gebruik uw sleutel desondanks niet in de browser.
Foutcodes
De HTTP-statuscode geeft de categorie van de fout aan, error.code de exacte oorzaak. De fouten 401, 403 en 429 kunnen bij alle eindpunten met authenticatie voorkomen.
Foutcodes
Code HTTP Betekenis
bad_request400 Het verzoek kon niet worden verwerkt (bijv. ongeldige JSON-body).
operation_failed400 De bewerking kon niet worden voltooid; de reden staat in het veld message.
missing_token401 De header Authorization of X-Api-Key is niet meegestuurd.
invalid_token401 De sleutel is ongeldig of onbekend.
key_revoked401 De sleutel is ingetrokken. Maak in het panel een nieuwe sleutel aan.
owner_inactive401 Het account dat eigenaar is van de sleutel is niet actief.
ip_not_allowed403 Het verzoek komt van een adres dat niet op de IP-toelatingslijst van de sleutel staat.
client_api_not_allowed403 Het account is geen actieve reseller; geen API-toegang.
insufficient_scope403 De sleutel heeft geen rechten voor deze bewerking.
not_found404 Het opgevraagde record is niet gevonden.
endpoint_not_found404 Dit eindpunt bestaat niet; controleer het pad en de versie.
method_not_allowed405 Het eindpunt ondersteunt deze HTTP-methode niet.
idempotency_in_flight409 Een verzoek met dezelfde Idempotency-Key wordt nog verwerkt; probeer het over korte tijd opnieuw.
idempotency_key_reuse422 Dezelfde Idempotency-Key is gebruikt met een andere body.
validation_failed422 Een of meer velden zijn ongeldig; details staan in details.
insufficient_balance422 Wallettegoed ontoereikend. De bedragen details.required en details.available worden geretourneerd.
cycle_invalid422 Het product wordt niet met deze periode verkocht. Geldige perioden staan in details.allowed.
product_not_orderable422 Het product kan momenteel niet worden besteld.
out_of_stock422 Het product is niet op voorraad.
addon_invalid422 De add-on is ongeldig voor dit product.
addon_option_invalid422 De add-on-optie is ongeldig.
requirement_missing422 Een verplichte bestelvereiste (requirements) ontbreekt.
terms_required422 Akkoord met de voorwaarden (terms: true) is niet meegestuurd.
payment_method_invalid422 Ongeldige betaalmethode; alleen balance wordt geaccepteerd.
invoice_not_payable422 De factuur kan niet worden betaald.
not_renewable422 De dienst kan niet worden verlengd.
cancellation_exists422 Er is al een annuleringsverzoek voor deze dienst.
tool_action_failed422 De toolactie is mislukt.
password_too_short422 Het wachtwoord is te kort.
rate_limited429 Limiet voor verzoeken per minuut overschreden; wacht Retry-After seconden.
too_many_auth_failures429 Te veel mislukte authenticatiepogingen; wacht even.
server_error500 Onverwachte serverfout. Probeer het opnieuw; houdt het aan, neem dan contact op met support.
Idempotentie
Voeg aan POST-verzoeken de header Idempotency-Key (8–191 tekens) toe, zodat u een verzoek bij een netwerkfout of time-out veilig kunt herhalen. Stuur hem altijd mee bij POST /orders en POST /invoices/{id}/pay.
Idempotentiegedrag
Status Resultaat
Dezelfde sleutel en dezelfde body, binnen 24 uur De bewerking wordt niet opnieuw uitgevoerd; het eerste antwoord wordt ongewijzigd geretourneerd en de header Idempotency-Replayed: true wordt toegevoegd.
Dezelfde sleutel, andere body 422 idempotency_key_reuse
Eerste verzoek wordt nog verwerkt 409 idempotency_in_flight; probeer het over korte tijd opnieuw.
Genereer de sleutel één keer per bewerking (bijv. uit uw eigen bestelnummer of een UUID) en wijzig hem niet bij nieuwe pogingen.
Verzoeklimiet
Per API-sleutel geldt een limiet van 60 verzoeken per minuut (vast venster van 60 seconden). Elk geauthenticeerd antwoord bevat headers met uw resterende quotum.
Headers voor de verzoeklimiet
Header Omschrijving
X-RateLimit-LimitTotaal aantal toegestane verzoeken in het venster (60).
X-RateLimit-RemainingResterend aantal toegestane verzoeken in het venster.
X-RateLimit-ResetTijdstip waarop het venster wordt gereset (Unix-tijdstempel).
Retry-AfterAlleen bij 429-antwoorden: het aantal seconden dat u moet wachten voordat u het opnieuw probeert.
429 Bij overschrijding van de limiet Kopiëren Gekopieerd 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." }} Voer statusopvragingen (polling) om de paar seconden uit en wacht bij ontvangst van 429 zo lang als Retry-After aangeeft. Herhaalde mislukte authenticatiepogingen worden tijdelijk geblokkeerd met too_many_auth_failures.
Factureringsperioden
In bestelitems en prijslijsten krijgt het veld cycle een van de onderstaande waarden. De perioden die een product aanbiedt, staan in de array pricing; als een niet-aangeboden periode wordt verstuurd, wordt 422 cycle_invalid geretourneerd en staan de geldige waarden in details.allowed.
Factureringsperioden
Waarde Periode
hourlyGebruik per uur
monthlyMaandelijks
quarterly3 maanden
semiannually6 maanden
annuallyJaarlijks
biennially2 jaar
triennially3 jaar
onetimeEenmalig
Resellerprijzen
De resellerkorting wordt automatisch toegepast op alle bestellingen die u via de API en het panel plaatst. Haal de exacte nettoprijs altijd op via GET /reseller/prices of POST /orders/preview.
Particuliere reseller tot 30% korting
Bedrijfsreseller tot 35% korting
De korting geldt voor producten, add-ons en installatiekosten.
De afgeprijsde prijs zakt nooit onder de kostprijsgrens van het product; daarom is het werkelijke kortingspercentage bij sommige producten lager. Het percentage per product wordt weergegeven in het veld discount_pct.
Domeinnamen en kosten voor gebruik per uur vallen buiten de korting.
Bovenop de resellerkorting worden geen coupons of groepskortingen toegepast.
De btw wordt berekend over het afgeprijsde bedrag.
API-bestellingen worden uitsluitend betaald uit het wallettegoed (payment.method = "balance").
U kunt aan uw eigen klanten verkopen tegen elke prijs die u wilt.
Catalogusprijs (per maand) 500,00 ₺
Resellerkorting (30% bij dit product) −150,00 ₺
Btw (20%, over het afgeprijsde bedrag) +70,00 ₺
Te betalen uit de wallet 420,00 ₺
Het voorbeeld geldt voor een product waarop de volledige korting van toepassing is; percentages verschillen per product en per resellertype.
End-to-end
Voorbeeld van de volledige flow
De aanroepen die nodig zijn om voor een klant een VDS te kopen, de toegangsgegevens te leveren en deze na een maand te verlengen.
Vraag de resellerprijzen op
Kies het product en de periode; het bedrag reseller is uw netto inkoopprijs.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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())
Bekijk een voorbeeld van de bestelling
Vergelijk de waarde total met uw saldo (GET /balance); is dat niet genoeg, waardeer dan eerst uw tegoed op.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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())
Plaats de bestelling met een Idempotency-Key
Is het antwoord 201 en payment.status: "paid", dan is het bedrag van uw wallet afgeschreven en is de installatie gestart. Valt de verbinding weg, probeer het dan opnieuw met dezelfde sleutel en dezelfde body.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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())
Volg de installatie
Vraag GET /orders/{id} elke 15 seconden op totdat de array services in het antwoord gevuld is en alle diensten active zijn.
cURL PHP Node.js Python
Kopiëren Gekopieerd # 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])
Haal de toegangsgegevens op
Geef het serveradres, de gebruikersnaam en het wachtwoord uit het object access via een veilig kanaal door aan uw klant.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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())
Verleng en betaal de factuur
Maak een verlengingsfactuur aan (als er al een openstaande factuur is, wordt die geretourneerd) en betaal de factuur daarna met de geretourneerde invoice_id uit de wallet.
cURL PHP Node.js Python
Kopiëren Gekopieerd 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
Kopiëren Gekopieerd 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())
Eindpunten
Systeem
Controleer de verbinding en uw API-sleutel.
Verbindingstest Geen authenticatie nodig # GET /ping
Controleert of de API bereikbaar is. Vereist geen authenticatie; geschikt voor monitoring (health check).
Parameters Dit eindpunt accepteert geen parameters.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : {
"pong" : true ,
"version" : "v1" ,
"time" : "2026-12-05 14:30:00"
}
}Mogelijke fouten GET /whoami
Retourneert de API-sleutel die het verzoek doet en de eigenaar ervan. id is de ID van de sleutel, owner_id die van het account. Gebruik dit bij het opzetten van de integratie om te controleren of de sleutel werkt.
Parameters Dit eindpunt accepteert geen parameters.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : {
"id" : 12 ,
"type" : "client" ,
"name" : "Mağaza entegrasyonu" ,
"permissions" : [
"*"
],
"last_access" : "2026-12-05 14:28:11" ,
"owner_id" : 4821
}
}Mogelijke fouten
Eindpunten
Account & Saldo
Uw accountprofiel, wallettegoed en tegoedtransacties.
GET /me
Retourneert het profiel en het actuele wallettegoed van het account dat eigenaar is van de sleutel. De waarde van kind is individual of corporate; bedrijfsgegevens staan in het object company.
Parameters Dit eindpunt accepteert geen parameters.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}Mogelijke fouten GET /balance
Retourneert het wallettegoed. API-bestellingen worden uitsluitend uit dit tegoed betaald; controleer vóór het bestellen of het het totaal dekt. De flags wallet_empty en low_balance kunnen worden gebruikt om een waarschuwing te tonen.
Parameters Dit eindpunt accepteert geen parameters.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : {
"balance" : {
"amount" : 2450.75 ,
"currency" : "TRY"
},
"wallet_empty" : false ,
"low_balance" : false
}
}Mogelijke fouten GET /balance/transactions
Geeft opwaarderingen (up) en uitgaven (down) van het tegoed gepagineerd weer. created_at heeft het formaat ISO 8601.
Parameters Parameter Type Verplicht Omschrijving type query string Optioneel up (opwaardering) of down (uitgave).page query integer Optioneel Paginanummer (≥ 1, standaard 1). limit query integer Optioneel Records per pagina (1–100, standaard 25).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten
Eindpunten
Reseller
Uw resellerstatus en uw persoonlijke netto inkoopprijzen. Deze twee eindpunten zijn de resellerextensie van de client-API.
Resellerstatus Resellerextensie # GET /reseller
Retourneert uw resellerstatus, uw type, uw kortingspercentage en de voortgang van het tegoed dat nodig is voor activering. status: pending, active, suspended, rejected of none. rate is het hoogst haalbare kortingspercentage voor uw type; gebruik voor het werkelijke percentage per product GET /reseller/prices.
Parameters Dit eindpunt accepteert geen parameters.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}Mogelijke fouten Resellerprijzen Resellerextensie # GET /reseller/prices
Retourneert per product en periode de catalogusprijs (list), uw persoonlijke netto inkoopprijs (reseller) en het toegepaste kortingspercentage (discount_pct). Dit is de definitieve prijs na toepassing van de kostprijsgrens, exclusief btw. De paginering werkt hetzelfde als bij GET /products.
Bij het tweede product in het voorbeeld blijft de korting op 22%: de afgeprijsde prijs zakt niet onder de kostprijsgrens.
Parameters Parameter Type Verplicht Omschrijving category query integer Optioneel Filteren op categorie-ID. search query string Optioneel Zoeken in de productnaam. page query integer Optioneel Paginanummer (≥ 1, standaard 1). limit query integer Optioneel Records per pagina (1–100, standaard 25).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten
Eindpunten
Producten
Bestelbare producten, categorieën, add-ons en bestelvereisten. De prijzen hier zijn catalogusprijzen.
GET /products/categories
Retourneert de productcategorieën. parent is de ID van de bovenliggende categorie; het totale aantal records staat in meta.total.
Parameters Dit eindpunt accepteert geen parameters.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : [
{
"id" : 3 ,
"parent" : 0 ,
"type" : "server" ,
"name" : "VDS Sunucular"
},
{
"id" : 5 ,
"parent" : 0 ,
"type" : "server" ,
"name" : "Oyun Sunucuları"
}
],
"meta" : {
"total" : 2
}
}Mogelijke fouten GET /products
Retourneert producten met catalogusprijzen ; er wordt geen resellerkorting toegepast. Gebruik voor de netto inkoopprijs GET /reseller/prices of POST /orders/preview. De valuta van de prijzen staat in meta.currency.
Parameters Parameter Type Verplicht Omschrijving category query integer Optioneel Filteren op categorie-ID. search query string Optioneel Zoeken in de productnaam. type query string Optioneel Filteren op producttype. page query integer Optioneel Paginanummer (≥ 1, standaard 1). limit query integer Optioneel Records per pagina (1–100, standaard 25).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}Mogelijke fouten GET /products/{id}
Retourneert één product met, naast de lijstvelden, de beschrijving, aantalregels (quantity), de bestellimiet per gebruiker, add-ons (addons), bestelvereisten (requirements) en de domeinnaammodus (domain.mode: none, chooser, required …). Haal hier de ID’s voor het bestelitem op.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Product-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}
}Mogelijke fouten
Eindpunten
Bestellingen
Bekijk de winkelwagen, maak bestellingen aan die uit de wallet worden betaald en volg de installatie.
Bestelitem-object
Elk element van de array items heeft deze structuur. Per verzoek kunnen maximaal 20 items worden verstuurd.
Bestelitem-object Parameter Type Verplicht Omschrijving product_idinteger Verplicht Product-ID. cyclestring Verplicht Factureringsperiode (bijv. monthly). quantityinteger Optioneel Aantal, standaard 1. domain.optionstring Optioneel owned (uw eigen domeinnaam) of none.domain.namestring Optioneel Domeinnaam. addonsobject Optioneel Koppeling van add-on-ID naar optie-ID: {"<addon_id>": "<option_id>"} of bij meervoudige keuze ["<id>", …]. requirementsobject Optioneel Koppeling van vereisteveld-ID naar waarde: {"<field_id>": "değer"}.
POST /orders/preview
Berekent de winkelwagen zonder iets aan te maken: itembedragen, resellerkorting (discount), btw (tax) en het te betalen totaal (total). Alle bedragen zijn geldobjecten. Roep dit aan voordat u bestelt en vergelijk total met uw saldo.
Parameters Parameter Type Verplicht Omschrijving items body array Verplicht Bestelitems (maximaal 20). Zie het Bestelitem-object hieronder voor de structuur. billing_profile_id body integer Optioneel ID van het factureringsprofiel.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}
}Mogelijke fouten Bestelling aanmaken Idempotency-Key aanbevolen # POST /orders
Maakt de bestelling aan en schrijft het bedrag af van uw wallet. Als het saldo het totaal niet dekt, wordt zonder iets aan te maken 422 insufficient_balance geretourneerd. Na ontvangst van de betaling worden de diensten automatisch geïnstalleerd. Een succesvol antwoord heeft statuscode 201 .
Stuur voor elke bestelling een unieke Idempotency-Key mee. Probeer het bij een time-out of verbindingsfout opnieuw met dezelfde sleutel en dezelfde body; er ontstaat geen dubbele bestelling. payment.status is paid of failed; bij een fout wordt payment.error toegevoegd.
Parameters Parameter Type Verplicht Omschrijving Idempotency-Key header string Aanbevolen Unieke sleutel van 8–191 tekens. Stuur bij een nieuwe poging dezelfde sleutel en dezelfde body. items body array Verplicht Bestelitems (maximaal 20). payment.method body string Verplicht Altijd balance. terms body boolean Verplicht true om de servicevoorwaarden te accepteren.notes body string Optioneel Bestelnotitie (bijv. uw eigen klantreferentie).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 201 Antwoord Kopiëren Gekopieerd {
"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"
}
}
}Mogelijke fouten GET /orders
Geeft uw bestellingen gepagineerd weer.
Parameters Parameter Type Verplicht Omschrijving status query string Optioneel waiting, inprocess, active of cancelled.page query integer Optioneel Paginanummer (≥ 1, standaard 1). limit query integer Optioneel Records per pagina (1–100, standaard 25).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten GET /orders/{id}
Retourneert naast de lijstvelden de items, de uit de bestelling ontstane diensten (services), het factuuroverzicht en de notities. Vraag dit eindpunt periodiek op totdat de diensten active zijn om de installatie te volgen.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Bestel-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}Mogelijke fouten
Eindpunten
Diensten
Actieve diensten, toegangsgegevens, verlenging, annulering, tools en wachtwoordwijziging.
GET /services
Geeft uw diensten gepagineerd weer.
Parameters Parameter Type Verplicht Omschrijving status query string Optioneel active, pending, suspended, expired of cancelled.search query string Optioneel Zoeken in de dienstnaam of het serveradres. page query integer Optioneel Paginanummer (≥ 1, standaard 1). limit query integer Optioneel Records per pagina (1–100, standaard 25).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten GET /services/{id}
Retourneert naast de lijstvelden het product, de bestel-ID, de toegangsgegevens (access), de verlengingsopties (renewal) en, indien aanwezig, het annuleringsverzoek (cancellation). De prijzen in renewal.cycles zijn bedragen waarop de resellerkorting al is toegepast.
Toegangsgegevens zijn vertrouwelijk: verwerk ze alleen aan de serverkant en schrijf ze niet naar logbestanden.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten Verlengingsfactuur aanmaken # POST /services/{id}/renew
Maakt een verlengingsfactuur voor de dienst aan en retourneert 201 met existing: false. Als er al een openstaande verlengingsfactuur is, wordt die geretourneerd met 200 en existing: true. Betaal de factuur met POST /invoices/{id}/pay.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 201 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten Annuleringsverzoek aanmaken # POST /services/{id}/cancellation
Maakt een annuleringsverzoek voor de dienst aan en retourneert 201 met het annuleringsobject.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID. urgency body string Verplicht now (direct) of period-ending (aan het einde van de periode).reason body string Verplicht not-needed, too-expensive, switching, missing-features of other.reason_detail body string Optioneel Toelichting op de reden. note body string Optioneel Aanvullende notitie.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 201 Antwoord Kopiëren Gekopieerd {
"data" : {
"status" : "pending" ,
"urgency" : "period-ending" ,
"reason" : "not-needed" ,
"requested_at" : "2026-12-05"
}
}Mogelijke fouten Annuleringsverzoek intrekken # DELETE /services/{id}/cancellation
Trekt het openstaande annuleringsverzoek in. Clients die geen DELETE kunnen versturen, kunnen POST met de header X-Http-Method-Override: DELETE gebruiken.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : {
"revoked" : true ,
"service_id" : 77
}
}Mogelijke fouten GET /services/{id}/tools
Geeft de tools die voor de dienst beschikbaar zijn. Als de module het ondersteunt, worden de power-tools geleverd met de sleutels start-server, stop-server en restart-server.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
]
}
]
}Mogelijke fouten POST /services/{id}/tools/{tool}/{action}
Voert een tool uit. Voorbeeld: om de server te herstarten POST /services/77/tools/restart-server/index.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID. tool path string Verplicht Toolsleutel (key uit het antwoord van GET /services/{id}/tools). action path string Verplicht Actienaam (bij power-tools index).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : {
"status" : "successful" ,
"message" : "Sunucu yeniden başlatılıyor."
}
}Mogelijke fouten Wachtwoord van dienst wijzigen # POST /services/{id}/password
Wijzigt het toegangswachtwoord van de dienst.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Dienst-ID. password body string Verplicht Nieuw wachtwoord.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"data" : {
"changed" : true ,
"service_id" : 77
}
}Mogelijke fouten
Eindpunten
Facturen
Bekijk facturen, open de details en betaal ze uit de wallet.
Factuuroverzicht-object
Factuurlijsten en antwoorden op bestellingen en verlengingen gebruiken dit overzicht.
Factuuroverzicht-object Parameter Type Verplicht Omschrijving invoice_idinteger Verplicht Factuur-ID. numberstring Verplicht Factuurnummer. statusstring Verplicht paid, unpaid, refund of cancelled.statestring Verplicht paid, unpaid, overdue, refunded of cancelled; vervallen facturen krijgen de status overdue.totalmoney Verplicht Factuurtotaal. created_atdate Verplicht Aanmaakdatum. paid_atdate|null Verplicht Betaaldatum. due_datedate Verplicht Uiterste betaaldatum.
GET /invoices
Geeft uw facturen gepagineerd weer. Elk record bevat het factuuroverzicht, het eerste item (first_item) en het openstaande bedrag (amount_due).
Parameters Parameter Type Verplicht Omschrijving status query string Optioneel paid, unpaid, overdue, refunded of cancelled.page query integer Optioneel Paginanummer (≥ 1, standaard 1). limit query integer Optioneel Records per pagina (1–100, standaard 25).
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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
}
}Mogelijke fouten GET /invoices/{id}
Retourneert naast het factuuroverzicht de items, de bedragspecificatie (summary: subtotaal, resellerkorting, btw, totaal, betaald, resterend) en de betalingstransacties.
Parameters Parameter Type Verplicht Omschrijving id path integer Verplicht Factuur-ID.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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" : []
}
}Mogelijke fouten Factuur betalen Idempotency-Key aanbevolen # POST /invoices/{id}/pay
Betaalt de factuur uit het wallettegoed. Bij onvoldoende saldo volgt insufficient_balance (met in de details required en available); als de factuur niet betaalbaar is, wordt invoice_not_payable geretourneerd.
Parameters Parameter Type Verplicht Omschrijving Idempotency-Key header string Aanbevolen Unieke sleutel van 8–191 tekens. Stuur bij een nieuwe poging dezelfde sleutel en dezelfde body. id path integer Verplicht Factuur-ID. payment.method body string Verplicht Altijd balance.
Voorbeeldverzoek cURL PHP Node.js Python
Kopiëren Gekopieerd 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())Voorbeeldantwoord 200 Antwoord Kopiëren Gekopieerd {
"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"
}
}
}Mogelijke fouten