30% off your first order (monthly billing) — applied automatically in the cart:
%30off your first order (monthly)

The discount is applied automatically in the cart to monthly-billed products on your first order (no code needed). Valid once per account for hosting, server and application products; not valid for domain names. On longer terms you also get: 3-month billing with 10% off, yearly billing: get 12 months, pay for 10.

Explore plans
EN · $ USD

Reseller API

Reseller API documentation

Manage products, reseller prices, orders and your services from your own system. Authentication uses a Bearer key, and responses are in JSON format.

https://sunucuatlas.com/api/v1/client

Sunucu Atlas · Developer documentation · v1

Reseller API

Sell products from your own site at your personal reseller price, pay for orders automatically from your wallet and manage services with a single REST API.

Base URL https://sunucuatlas.com/api/v1/client
  • JSON / RESTUTF-8, consistent response structure
  • Bearer tokenOptional IP restriction
  • 60 requests/minper API key
  • Wallet paymentsOrders are paid from balance

Getting started

Quick start

Place your first order via the API in four steps.

  1. Apply to become a reseller

    Fill in the application form (individual or company). Once your wallet balance reaches 2.000 ₺ (existing balance or total top-ups since applying), your reseller account is activated automatically. Activation is one-time; later spending won't downgrade your reseller account.

  2. Create an API key

    Create a new key from the reseller panel. The key starts with wck_ and is shown only once; save it somewhere safe right away. You can create up to 20 keys per account and restrict each key to specific IP addresses.

  3. Send your first request

    GET /me returns your account and balance. If you get a 200 response, your key is working.

    curl "https://sunucuatlas.com/api/v1/client/me" \
      -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  4. Place your first order

    First check the net amount with POST /orders/preview, then send POST /orders with the same items. Always use a unique Idempotency-Key for orders.

    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"
          }
        ]
      }'
    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
      }'

Basics

Authentication

Send your API key with every request as a Bearer token in the Authorization header. Clients that can't set this header can use the X-Api-Key header instead. Only GET /ping requires no authentication.

Request headers
Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

# alternatif
X-Api-Key: wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  • Key format: wck_ + 32 characters (0-9A-Za-z). The key is shown only once, when it is created; only its hash (SHA-256) is stored, so a lost key cannot be recovered.
  • Keys are created and revoked in the reseller panel. Up to 20 keys can be defined per account.
  • You can define an optional IP allowlist (exact IP addresses) for each key. Requests from addresses not on the list receive 403 ip_not_allowed.
  • The API works only for active reseller accounts; other accounts receive 403 client_api_not_allowed.

Never put your key in client-side code such as a browser, mobile app or public repository. Always send requests from your own server; if the key leaks, revoke it in the panel immediately and create a new one.

Request and response structure

The API accepts and returns UTF-8 encoded JSON. For requests with a body, use Content-Type: application/json. All paths are relative to the base URL: https://sunucuatlas.com/api/v1/client/orders.

Successful response

Data is always in the data field (an object, an array or null). Paginated lists add meta; it is only present when needed. The status code is 200, or 201 for requests that create a new record.

200Successful response
{
  "data": {
    "id": 77,
    "status": "active"
  },
  "meta": {
    "total": 1,
    "page": 1,
    "limit": 25,
    "next_page": 0
  }
}

Error response

On errors, the body contains a single error object: a machine-readable code, a human-readable message and, where available, details with additional information. In your integration, always base decisions on the code field.

422Error response
{
  "error": {
    "code": "insufficient_balance",
    "message": "Bakiye yetersiz.",
    "details": {
      "required": {
        "amount": 420,
        "currency": "TRY"
      },
      "available": {
        "amount": 180.5,
        "currency": "TRY"
      }
    }
  }
}

Method override and CORS

Clients that can't send PATCH, PUT or DELETE can send the request as POST and add the X-Http-Method-Override: PATCH|PUT|DELETE header. For CORS, the API returns Access-Control-Allow-Origin: * and answers OPTIONS requests with 204; even so, never use your key in a browser.

Error codes

The HTTP status code indicates the class of error, while error.code indicates the exact cause. 401, 403 and 429 errors can be returned by any endpoint that requires authentication.

Error codes
CodeHTTPMeaning
bad_request400The request could not be parsed (e.g. invalid JSON body).
operation_failed400The operation could not be completed; the reason is in the message field.
missing_token401No Authorization or X-Api-Key header was sent.
invalid_token401The key is invalid or not recognized.
key_revoked401The key has been revoked. Create a new key in the panel.
owner_inactive401The account that owns the key is not active.
ip_not_allowed403The request came from an address that isn't on the key's IP allowlist.
client_api_not_allowed403The account is not an active reseller; no API access.
insufficient_scope403The key isn't authorized for this operation.
not_found404The requested record was not found.
endpoint_not_found404No such endpoint; check the path and version.
method_not_allowed405The endpoint doesn't support this HTTP method.
idempotency_in_flight409A request with the same Idempotency-Key is still being processed; try again shortly.
idempotency_key_reuse422The same Idempotency-Key was used with a different body.
validation_failed422One or more fields are invalid; details are in details.
insufficient_balance422Insufficient wallet balance. The details.required and details.available amounts are returned.
cycle_invalid422The product isn't sold with this billing cycle. Valid cycles are in details.allowed.
product_not_orderable422The product can't be ordered at the moment.
out_of_stock422The product is out of stock.
addon_invalid422The add-on is not valid for this product.
addon_option_invalid422Invalid add-on option.
requirement_missing422A mandatory order requirement (requirements) is missing.
terms_required422Terms acceptance (terms: true) was not sent.
payment_method_invalid422Invalid payment method; only balance is accepted.
invoice_not_payable422The invoice is not payable.
not_renewable422The service can't be renewed.
cancellation_exists422A cancellation request already exists for this service.
tool_action_failed422The tool action failed.
password_too_short422The password is too short.
rate_limited429Per-minute request limit exceeded; wait Retry-After seconds.
too_many_auth_failures429Too many failed authentication attempts; wait a while.
server_error500Unexpected server error. Try again; if it persists, contact support.

Pagination

List endpoints accept the page (≥ 1, default 1) and limit (1–100, default 25) query parameters. The meta object in the response gives the total record count and the next page; on the last page, next_page is 0.

Example
GET /services?page=2&limit=50

"meta": { "total": 134, "page": 2, "limit": 50, "next_page": 3 }

To fetch all records, keep requesting the next page until next_page is 0.

Idempotency

To safely retry a request after a network error or timeout, add an Idempotency-Key header (8–191 characters) to POST requests. Always send it with POST /orders and POST /invoices/{id}/pay requests.

Idempotency behavior
StatusResult
Same key and same body, within 24 hoursThe operation is not repeated; the original response is returned as-is with the Idempotency-Replayed: true header added.
Same key, different body422 idempotency_key_reuse
First request still in progress409 idempotency_in_flight; try again shortly.

Generate the key once per operation (e.g. from your own order number or a UUID) and don't change it when retrying.

Rate limit

Each API key is limited to 60 requests per minute (fixed 60-second window). Every authenticated response includes headers showing your remaining quota.

Rate limit headers
HeaderDescription
X-RateLimit-LimitTotal requests allowed in the window (60).
X-RateLimit-RemainingRequests remaining in the window.
X-RateLimit-ResetWhen the window resets (Unix timestamp).
Retry-AfterOnly in 429 responses: seconds to wait before retrying.
429When the limit is exceeded
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."}}

Poll for status every few seconds, and when you receive 429, wait for the Retry-After period. Repeated failed authentication attempts are temporarily blocked with too_many_auth_failures.

Money and date format

Money

All amounts are objects containing a number and a currency. amount is a decimal number (not a string).

Money object
{"amount": 123.45, "currency": "TRY"}

Date

Dates use the YYYY-MM-DD format. created_at in wallet transactions uses ISO 8601 format.

Example
"due_date":   "2027-01-05"
"created_at": "2026-12-05T14:31:02+03:00"

Billing cycles

In order items and price lists, the cycle field takes one of the values below. The cycles a product offers are listed in the pricing array; if you send a cycle that isn't offered, 422 cycle_invalid is returned and the valid values come in details.allowed.

Billing cycles
ValueBilling period
hourlyHourly usage
monthlyMonthly
quarterly3 months
semiannually6 months
annuallyAnnual
biennially2 years
triennially3 years
onetimeOne-time

Reseller pricing

The reseller discount is applied automatically to all orders you place via the API and the panel. Always get the exact net price from GET /reseller/prices or POST /orders/preview.

Individual resellerup to 30%discount
Company resellerup to 35%discount
  • The discount applies to products, add-ons and setup fees.
  • The discounted price never goes below the product's cost floor, so the actual discount rate is lower on some products. The per-product rate is shown in the discount_pct field.
  • Domains and hourly usage charges are not covered by the discount.
  • No coupon or group discount is applied on top of the reseller discount.
  • VAT is added on top of the discounted amount.
  • API orders are paid only from the wallet balance (payment.method = "balance").
  • You can sell to your own customers at whatever price you like.
List price (monthly)500,00 ₺
Reseller discount (30% on this product)−150,00 ₺
VAT (20%, on the discounted amount)+70,00 ₺
Payable from wallet420,00 ₺

This example is for a product where the full discount applies; rates vary by product and your reseller type.

End to end

End-to-end flow example

The calls needed to buy a VDS for one of your customers, hand over the access details and renew it a month later.

  1. List reseller prices

    Choose the product and cycle; the reseller amount is your net purchase price.

    curl "https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS" \
      -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  2. Preview the order

    Compare total with your balance (GET /balance); if it's not enough, top up your balance first.

    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"
            }
          }
        ]
      }'
  3. Place the order with an Idempotency-Key

    If the response is 201 with payment.status: "paid", the amount has been deducted from your wallet and setup has started. If the connection drops, retry with the same key and the same body.

    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"
      }'
  4. Track the setup

    Poll GET /orders/{id} every 15 seconds until the services array in the response is populated and all services are active.

    # 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'
  5. Get the access details

    Pass the server address, username and password from the access object to your customer over a secure channel.

    curl "https://sunucuatlas.com/api/v1/client/services/77" \
      -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  6. Renew and pay the invoice

    Create a renewal invoice (if an open invoice exists, that one is returned), then pay the invoice from your wallet using the returned invoice_id.

    curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/renew" \
      -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    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"
        }
      }'

Endpoints

System

Verify the connection and your API key.

Connection test

No authentication required#
GET/ping

Checks that the API is reachable. Requires no authentication; suitable for monitoring (health checks).

Parameters

This endpoint takes no parameters.

Example request

curl "https://sunucuatlas.com/api/v1/client/ping"

Example response

200If the response is
{
  "data": {
    "pong": true,
    "version": "v1",
    "time": "2026-12-05 14:30:00"
  }
}

Possible errors

Key info

#
GET/whoami

Returns the API key making the request and its owner. id is the key's ID, owner_id is the account's ID. Use it while setting up your integration to verify that the key works.

Parameters

This endpoint takes no parameters.

Example request

curl "https://sunucuatlas.com/api/v1/client/whoami" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "data": {
    "id": 12,
    "type": "client",
    "name": "Mağaza entegrasyonu",
    "permissions": [
      "*"
    ],
    "last_access": "2026-12-05 14:28:11",
    "owner_id": 4821
  }
}

Possible errors

Endpoints

Account & Balance

Your account profile, wallet balance and balance transactions.

Account details

#
GET/me

Returns the profile and current wallet balance of the account that owns the key. kind is individual or corporate; company details are in the company object.

Parameters

This endpoint takes no parameters.

Example request

curl "https://sunucuatlas.com/api/v1/client/me" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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"
  }
}

Possible errors

Wallet balance

#
GET/balance

Returns the wallet balance. API orders are paid only from this balance; check that it covers the total before ordering. The wallet_empty and low_balance flags can be used to show warnings.

Parameters

This endpoint takes no parameters.

Example request

curl "https://sunucuatlas.com/api/v1/client/balance" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "data": {
    "balance": {
      "amount": 2450.75,
      "currency": "TRY"
    },
    "wallet_empty": false,
    "low_balance": false
  }
}

Possible errors

Wallet transactions

#
GET/balance/transactions

Lists balance top-ups (up) and spending (down), paginated. created_at uses ISO 8601 format.

Parameters

ParameterTypeRequiredDescription
type querystringOptionalup (top-up) or down (spending).
page queryintegerOptionalPage number (≥ 1, default 1).
limit queryintegerOptionalRecords per page (1–100, default 25).

Example request

curl "https://sunucuatlas.com/api/v1/client/balance/transactions?type=down&limit=25" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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
  }
}

Possible errors

Endpoints

Reseller

Your reseller status and your personal net purchase prices. These two endpoints are the reseller extension added to the client API.

Reseller status

Reseller extension#
GET/reseller

Returns your reseller status, type, discount rate and the balance progress required for activation. status: pending, active, suspended, rejected or none. rate is the highest discount rate available for your type; for the actual per-product rate, use GET /reseller/prices.

Parameters

This endpoint takes no parameters.

Example request

curl "https://sunucuatlas.com/api/v1/client/reseller" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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"
  }
}

Possible errors

Reseller prices

Reseller extension#
GET/reseller/prices

Returns, for each product and cycle, the list price (list), your personal net purchase price (reseller) and the applied discount rate (discount_pct). This is the final price with the cost floor applied, excluding VAT. Pagination works the same as for GET /products.

In the example, the discount on the second product stays at 22%: the discounted price never goes below the cost floor.

Parameters

ParameterTypeRequiredDescription
category queryintegerOptionalFilter by category ID.
search querystringOptionalSearch in product name.
page queryintegerOptionalPage number (≥ 1, default 1).
limit queryintegerOptionalRecords per page (1–100, default 25).

Example request

curl "https://sunucuatlas.com/api/v1/client/reseller/prices?search=VDS" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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
  }
}

Possible errors

Endpoints

Products

Orderable products, categories, add-ons and order requirements. Prices here are list prices.

Product categories

#
GET/products/categories

Returns product categories. parent is the parent category's ID; the total record count is in meta.total.

Parameters

This endpoint takes no parameters.

Example request

curl "https://sunucuatlas.com/api/v1/client/products/categories" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "data": [
    {
      "id": 3,
      "parent": 0,
      "type": "server",
      "name": "VDS Sunucular"
    },
    {
      "id": 5,
      "parent": 0,
      "type": "server",
      "name": "Oyun Sunucuları"
    }
  ],
  "meta": {
    "total": 2
  }
}

Possible errors

List products

#
GET/products

Returns products at list prices; the reseller discount is not applied. For the net purchase price, use GET /reseller/prices or POST /orders/preview. The currency of the prices is in meta.currency.

Parameters

ParameterTypeRequiredDescription
category queryintegerOptionalFilter by category ID.
search querystringOptionalSearch in product name.
type querystringOptionalFilter by product type.
page queryintegerOptionalPage number (≥ 1, default 1).
limit queryintegerOptionalRecords per page (1–100, default 25).

Example request

curl "https://sunucuatlas.com/api/v1/client/products?category=3" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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"
  }
}

Possible errors

Product details

#
GET/products/{id}

Returns a single product with, in addition to the list fields, its description, quantity rules (quantity), per-user order limit, add-ons (addons), order requirements (requirements) and domain mode (domain.mode: none, chooser, required …). Get the IDs for order items here.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredProduct ID.

Example request

curl "https://sunucuatlas.com/api/v1/client/products/41" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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"
    }
  }
}

Possible errors

Endpoints

Orders

Preview the cart, create orders paid from your wallet and track setup.

Order item object

Each element of the items array has this structure. Up to 20 items can be sent per request.

Order item object
ParameterTypeRequiredDescription
product_idintegerRequiredProduct ID.
cyclestringRequiredBilling cycle (e.g. monthly).
quantityintegerOptionalQuantity, default 1.
domain.optionstringOptionalowned (your own domain) or none.
domain.namestringOptionalDomain name.
addonsobjectOptionalMapping from add-on ID to option ID: {"<addon_id>": "<option_id>"} or, for multiple selection, ["<id>", …].
requirementsobjectOptionalMapping from requirement field ID to value: {"<field_id>": "değer"}.

Order preview

#
POST/orders/preview

Calculates the cart without creating any records: line amounts, reseller discount (discount), VAT (tax) and the total payable (total). All amounts are money objects. Call it before placing an order and compare total with your balance.

Parameters

ParameterTypeRequiredDescription
items bodyarrayRequiredOrder items (up to 20). See the Order item object below for the structure.
billing_profile_id bodyintegerOptionalBilling profile ID.

Example request

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"
        }
      }
    ]
  }'

Example response

200If the response is
{
  "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"
    }
  }
}

Possible errors

Create order

Idempotency-Key recommended#
POST/orders

Creates the order and charges the amount to your wallet. If the balance doesn't cover the total, 422 insufficient_balance is returned and no records are created. Once payment is received, services are set up automatically. A successful response returns 201.

Send a unique Idempotency-Key for each order. On a timeout or connection error, retry with the same key and the same body; no duplicate order is created. payment.status is paid or failed; on failure, payment.error is added.

Parameters

ParameterTypeRequiredDescription
Idempotency-Key headerstringRecommendedUnique key of 8–191 characters. When retrying, send the same key and the same body.
items bodyarrayRequiredOrder items (up to 20).
payment.method bodystringRequiredAlways balance.
terms bodybooleanRequiredtrue to accept the terms of service.
notes bodystringOptionalOrder note (e.g. your own customer reference).

Example request

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"
  }'

Example response

201If the response is
{
  "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"
    }
  }
}

Possible errors

List orders

#
GET/orders

Lists your orders, paginated.

Parameters

ParameterTypeRequiredDescription
status querystringOptionalwaiting, inprocess, active or cancelled.
page queryintegerOptionalPage number (≥ 1, default 1).
limit queryintegerOptionalRecords per page (1–100, default 25).

Example request

curl "https://sunucuatlas.com/api/v1/client/orders?status=active" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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
  }
}

Possible errors

Order details

#
GET/orders/{id}

In addition to the list fields, returns the items, the services created by the order (services), the invoice summary and notes. To track setup, poll this endpoint periodically until the services are active.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredOrder ID.

Example request

curl "https://sunucuatlas.com/api/v1/client/orders/10234" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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"
  }
}

Possible errors

Endpoints

Services

Active services, access details, renewal, cancellation, tools and password changes.

List services

#
GET/services

Lists your services, paginated.

Parameters

ParameterTypeRequiredDescription
status querystringOptionalactive, pending, suspended, expired or cancelled.
search querystringOptionalSearch in service name or server address.
page queryintegerOptionalPage number (≥ 1, default 1).
limit queryintegerOptionalRecords per page (1–100, default 25).

Example request

curl "https://sunucuatlas.com/api/v1/client/services?status=active" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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
  }
}

Possible errors

Service details

#
GET/services/{id}

In addition to the list fields, returns the product, order ID, access details (access), renewal options (renewal) and any cancellation request (cancellation). renewal.cycles prices have the reseller discount applied.

Access details are confidential: process them only on the server side and never write them to log files.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.

Example request

curl "https://sunucuatlas.com/api/v1/client/services/77" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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
  }
}

Possible errors

Create renewal invoice

#
POST/services/{id}/renew

Creates a renewal invoice for the service and returns it with 201 and existing: false. If an open renewal invoice already exists, it is returned with 200 and existing: true. Pay the invoice with POST /invoices/{id}/pay.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.

Example request

curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/renew" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

201If the response is
{
  "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
  }
}

Possible errors

Create cancellation request

#
POST/services/{id}/cancellation

Creates a cancellation request for the service and returns the cancellation object with 201.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.
urgency bodystringRequirednow (immediately) or period-ending (at the end of the period).
reason bodystringRequirednot-needed, too-expensive, switching, missing-features or other.
reason_detail bodystringOptionalReason description.
note bodystringOptionalAdditional note.

Example request

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ı."
  }'

Example response

201If the response is
{
  "data": {
    "status": "pending",
    "urgency": "period-ending",
    "reason": "not-needed",
    "requested_at": "2026-12-05"
  }
}

Possible errors

Withdraw cancellation request

#
DELETE/services/{id}/cancellation

Withdraws the pending cancellation request. Clients that can't send DELETE can use POST with the X-Http-Method-Override: DELETE header.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.

Example request

curl -X DELETE "https://sunucuatlas.com/api/v1/client/services/77/cancellation" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "data": {
    "revoked": true,
    "service_id": 77
  }
}

Possible errors

Service tools

#
GET/services/{id}/tools

Lists the tools available for the service. If the module supports it, power tools are provided under the keys start-server, stop-server and restart-server.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.

Example request

curl "https://sunucuatlas.com/api/v1/client/services/77/tools" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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"
      ]
    }
  ]
}

Possible errors

Run tool

#
POST/services/{id}/tools/{tool}/{action}

Runs a tool. Example: to restart the server, POST /services/77/tools/restart-server/index.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.
tool pathstringRequiredTool key (from the GET /services/{id}/tools response: key).
action pathstringRequiredAction name (index for power tools).

Example request

curl -X POST "https://sunucuatlas.com/api/v1/client/services/77/tools/restart-server/index" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "data": {
    "status": "successful",
    "message": "Sunucu yeniden başlatılıyor."
  }
}

Possible errors

Change service password

#
POST/services/{id}/password

Changes the service's access password.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredService ID.
password bodystringRequiredNew password.

Example request

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"
  }'

Example response

200If the response is
{
  "data": {
    "changed": true,
    "service_id": 77
  }
}

Possible errors

Endpoints

Invoices

List invoices, view their details and pay them from your wallet.

Invoice summary object

Invoice lists, order responses and renewal responses use this summary.

Invoice summary object
ParameterTypeRequiredDescription
invoice_idintegerRequiredInvoice ID.
numberstringRequiredInvoice number.
statusstringRequiredpaid, unpaid, refund or cancelled.
statestringRequiredpaid, unpaid, overdue, refunded or cancelled; invoices past their due date become overdue.
totalmoneyRequiredInvoice total.
created_atdateRequiredCreation date.
paid_atdate|nullRequiredPayment date.
due_datedateRequiredDue date.

List invoices

#
GET/invoices

Lists your invoices, paginated. Each record includes the invoice summary, the first item (first_item) and the remaining amount due (amount_due).

Parameters

ParameterTypeRequiredDescription
status querystringOptionalpaid, unpaid, overdue, refunded or cancelled.
page queryintegerOptionalPage number (≥ 1, default 1).
limit queryintegerOptionalRecords per page (1–100, default 25).

Example request

curl "https://sunucuatlas.com/api/v1/client/invoices?status=unpaid" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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
  }
}

Possible errors

Invoice details

#
GET/invoices/{id}

In addition to the invoice summary, returns the items, the amount breakdown (summary: subtotal, reseller discount, VAT, total, paid, remaining) and payment transactions.

Parameters

ParameterTypeRequiredDescription
id pathintegerRequiredInvoice ID.

Example request

curl "https://sunucuatlas.com/api/v1/client/invoices/55188" \
  -H "Authorization: Bearer wck_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example response

200If the response is
{
  "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": []
  }
}

Possible errors

Pay invoice

Idempotency-Key recommended#
POST/invoices/{id}/pay

Pays the invoice from the wallet balance. If the balance is insufficient, insufficient_balance is returned (with required and available in the details); if the invoice can't be paid, invoice_not_payable is returned.

Parameters

ParameterTypeRequiredDescription
Idempotency-Key headerstringRecommendedUnique key of 8–191 characters. When retrying, send the same key and the same body.
id pathintegerRequiredInvoice ID.
payment.method bodystringRequiredAlways balance.

Example request

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"
    }
  }'

Example response

200If the response is
{
  "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"
    }
  }
}

Possible errors