Жұмысты бастау
DATASSL Reseller API v3.0 дилер тіркелгіңіз арқылы SSL сертификаты тапсырыстарын, шот операцияларын және несие төлемдерін бағдарламалық түрде басқаруға мүмкіндік береді.
Талаптар
- Белсенді дилер тіркелгісі және анықталған дилер тобы
- API кілті (дилер панеліңізден жасай аласыз)
- API erişimi açık olmalı (Panel > API & Entegrasyonlar)
Base URL
https://www.datassl.com/api/reseller/
Сұрау форматы
Барлық сұраныстар мен жауаптар JSON форматында.
Content-Type: application/json
Accept: application/json
Жалпы жауап құрылымы
// Başarılı
{
"success": true,
"message": "İşlem açıklaması",
...data
}
// Hata
{
"success": false,
"error": "Hata mesajı"
}
Сәйкестікті тексеру
Барлық API сұраныстарында келесі әдістердің бірін пайдаланыңыз:
1-әдіс: X-API-Key Header
X-API-Key: YOUR_API_KEY
2-әдіс: Bearer Token
Authorization: Bearer YOUR_API_KEY
API кілтін қалай алуға болады?
- Дилер панеліңізге кіріңіз
- API және интеграциялар бетін ашыңыз
- "API кілтін жасау" түймесін басыңыз
- Жасалған кілтті қауіпсіз жерде сақтаңыз
Барлық endpoint-тер
| Әдіс |
Endpoint |
Сипаттама |
| GET |
/products |
Өнім тізімі (сүзгі қолдауымен) |
| GET |
/products/{id} |
Өнім мәліметтері + SAN бағалары |
| GET |
/san-pricing/{id} |
SAN/Wildcard SAN бағалары |
| GET |
/orders |
Тапсырыстар тізімі (сүзгі қолдауымен) |
| GET |
/orders/{id} |
Тапсырыс мәліметі |
| POST |
/orders |
Жаңа тапсырыс жасау (SAN қолдауымен) |
| PUT |
/orders/{id} |
Тапсырыс операциялары (болдырмау) |
| POST |
/ssl/configure |
SSL баптау (CSR, DCV, әкімші деректері) |
| GET |
/ssl/{order_id} |
SSL күйін тексеру + растау мәліметтері |
| POST |
/ssl/resend-validation |
Тексеру хатын қайта жіберу |
| POST |
/ssl/change-dcv |
DCV әдісін өзгерту |
| POST |
/ssl/reissue |
Сертификатты қайта шығару (reissue) |
| POST |
/csr/decode |
CSR декодтау (домен, ұйым, SAN мәліметтері) |
| GET |
/invoices |
Шот-фактуралар тізімі |
| GET |
/invoices/{id} |
Шот-фактура мәліметтері |
| GET |
/credits |
Кредит балансы + операциялар тарихы |
| POST |
/credits |
Тапсырысты кредитпен төлеу |
| GET |
/balance |
Баланс және соңғы операциялар |
| GET |
/certificate/{order_id} |
Сертификат күйі туралы ақпарат |
| GET |
/certificate/{order_id}/download |
Сертификатты жүктеп алу (PEM + CA Bundle) |
| GET |
/account |
Тіркелгі ақпараты |
| GET |
/stats |
Статистика және графиктер |
Өнімдер
Топқа негізделген қолжетімділік: API тек дилер тобыңызға тағайындалған өнімдерді қайтарады. Бағалар топқа арналған арнайы бағалармен автоматты түрде есептеледі.
Өнімдер тізімі
GET /products
Сүзгі параметрлері
Brand |
Бренд сүзгісі (Sectigo, DigiCert, Thawte...) |
Type |
Түр сүзгісі (ssl, wildcard, multi-domain, code-signing) |
растау |
Тексеру түрі (dv, ov, ev) |
GET /products?brand=Sectigo&type=ssl&validation=dv
Жауап
{
"success": true,
"products": [
{
"id": 1,
"name": "Sectigo PositiveSSL",
"brand": "Sectigo",
"type": "ssl",
"validation_type": "dv",
"domain_type": "single",
"list_price": 49.99,
"list_pricing": { "1": 49.99, "2": 89.99, "3": 119.99 },
"reseller_price": 12.99,
"pricing": { "1": 12.99, "2": 22.99, "3": 29.99 },
"max_years": 3,
"warranty": "$50,000",
"san_enabled": false
}
],
"count": 25,
"group_id": 1,
"note": "Sadece grubunuza tanımlanmış ürünler listelenmektedir."
}
Өнім мәліметтері
GET /products/{id}
Бір өнім үшін SAN бағаларын, барлық көпжылдық бағаларды және барлық толық ақпаратты қайтарады.
SAN бағалары
GET /san-pricing/{product_id}
Өнімнің SAN және Wildcard SAN бағаларын толық қайтарады.
Тапсырыстар
Тапсырыстар тізімі
GET /orders
Сүзгі параметрлері
Status |
Күй сүзгісі (pending, processing, completed, cancelled) |
domain |
Домен іздеу |
limit |
Беттегі жазбалар саны (макс. 100, әдепкі 50) |
offset |
Бастапқы нүкте (беттеу) |
GET /orders?status=pending&limit=20&offset=0
Тапсырыс мәліметтері
GET /orders/{id}
Жаңа тапсырыс жасау
POST /orders
Body параметрлері
product_id * |
Өнім ID (тобыңызда анықталған болуы керек) |
domain * |
Домен атауы (код қолтаңбасынан басқа) |
period |
Мерзім (ай, әдепкі 12). Бұл жазылым мерзімі; сертификаттың жарамдылығы макс. 200 күн және автоматты түрде жаңартылады. |
san_count |
Қосымша SAN саны |
san_wildcard_count |
Қосымша Wildcard SAN саны |
Кредитпен автоматты төлеу
Тапсырыс жасалғанда сома кредит балансыңыздан автоматты түрде шегеріледі. Баланс жеткіліксіз болса, тапсырыс жасалмайды (HTTP 402).
// Örnek istek
{
"product_id": 1,
"domain": "example.com",
"period": 12,
"san_count": 2,
"san_wildcard_count": 0
}
Жауап
{
"success": true,
"message": "Sipariş başarıyla oluşturuldu",
"order_id": 12345,
"order_number": "ORD-2026-0042",
"domain": "example.com",
"base_price": 49.99,
"san_total": 15.98,
"discount_amount": 37.00,
"total": 28.97,
"status": "pending",
"payment_status": "paid",
"credit_used": 28.97,
"new_balance": 1221.03,
"invoice_number": "INV-2026-0078",
"auto_reissue_enabled": true,
"max_validity_days": 200,
"purchase_end_date": "2027-02-14",
"next_reissue_at": "2026-08-19"
}
Тапсырысты болдырмау
PUT /orders/{id}
// Body
{ "action": "cancel" }
Тек Pending немесе Processing күйіндегі тапсырыстардан бас тартуға болады.
Тапсырыс күйлері
Pending |
Күтуде (төлем күтілуде) |
Processing |
Өңделуде |
validation_pending |
Доменді тексеру күтілуде |
pending_configuration |
Баптау күтілуде |
Completed |
Аяқталды / Белсенді |
Cancelled |
Жойылды |
Expired |
Мерзімі өткен |
SSL басқару
SSL endpoint-тері тапсырыстан кейін сертификатты баптау, күйін тексеру, DCV өзгерту және reissue операциялары үшін қолданылады.
SSL баптау
POST /ssl/configure
Тапсырыс жасалғаннан кейін CSR және DCV деректерін жіберіп, SSL сертификатын баптаңыз.
order_id * |
Тапсырыс ID |
csr * |
Certificate Signing Request (PEM) |
dcv_method |
Тексеру әдісі: email, http, https, dns (әдепкі: email) |
approver_email |
Растау хаты (email DCV үшін) |
SSL күйін тексеру
GET /ssl/{order_id}
Нақты уақыттағы күйді, тексеру мәліметтерін (HTTP/DNS/Email нұсқаулары) және SAN тексеру ақпаратын қайтарады. Сертификат дайын болса, оны автоматты түрде сақтайды.
DCV әдісін өзгерту
POST /ssl/change-dcv
order_id * |
Тапсырыс ID |
dcv_method * |
Жаңа DCV әдісі: email, http, https, dns |
approver_email |
Жаңа растау хаты |
Тексеру хатын қайта жіберу
POST /ssl/resend-validation
{ "order_id": 12345 }
Сертификатты қайта шығару (Reissue)
POST /ssl/reissue
Автоматты жаңарту: 198 күн ережесі аясында сертификатыңыздың жарамдылық мерзімі аяқталмай тұрып жүйе reissue операциясын автоматты түрде орындайды. Қолмен reissue жасауды да осы endpoint арқылы орындауға болады.
order_id * |
Тапсырыс ID (белсенді сертификат қажет) |
csr |
Жаңа CSR (міндетті емес, бос болса, бар CSR пайдаланылады) |
dcv_method |
DCV әдісі |
approver_email |
Растау хаты |
CSR Decode
POST /csr/decode
{ "csr": "-----BEGIN CERTIFICATE REQUEST-----\n...\n-----END CERTIFICATE REQUEST-----" }
CSR-дан домен, ұйым, SAN тізімі және басқа мәліметтерді алады.
198 күн ережесі және автоматты жаңарту
CA/Browser Forum шешімі: 2026 жылғы 15 наурыздан бастап SSL/TLS сертификаттары ең көбі 200 күн (~6.5 ай) жарамды болуы мүмкін. Кодқа қол қою (Code Signing) сертификаттары бұл ережеге бұл ережеге бағынбайды.
Қалай жұмыс істейді?
Клиент 1 жылдық SSL сертификатын сатып алғанда:
- Сертификат макс. 200 күн жарамдылық мерзімімен беріледі
- Сертификат мерзімінің аяқталуына 14 күн қалғанда автоматты түрде қайта шығарылады (reissue)
- Сатып алу мерзімі (1/2/3 жыл) бойы бұл процесс қосымша ақысыз қайталанады
Тапсырыс жауабындағы жаңа өрістер
auto_reissue_enabled |
boolean — Автоматты жаңарту белсенді ме (код қолтаңбасынан басқа барлық SSL өнімдерінде true) |
max_validity_days |
integer — Сертификаттың ең ұзақ жарамдылық мерзімі (күн). Қазір: 200 |
purchase_end_date |
string (YYYY-MM-DD) — Жазылымның аяқталу күні (төленген кезеңнің соңы) |
next_reissue_at |
string (YYYY-MM-DD) — Sonraki otomatik yenileme tarihi |
reissue_count |
integer — Осы уақытқа дейін жасалған автоматты жаңартулар саны |
Жарамдылық кезеңдері (Жол картасы)
| Күні |
Макс. жарамдылық |
Күйі |
| 15 наурыз 2026 |
200 күн |
Белсенді |
| 15 наурыз 2027 |
100 күн |
Алдағы |
| 15 наурыз 2029 |
47 күн |
Алдағы |
Мысал сценарий: 1 жылдық DV SSL
// Sipariş oluşturuldu: 21 Mart 2026
// Abonelik süresi: 1 yıl (21 Mart 2027'ye kadar)
// 1. Sertifika: 21 Mar 2026 → 7 Eki 2026 (200 gün)
// Otomatik reissue: 23 Eyl 2026 (bitiş - 14 gün)
// 2. Sertifika: 23 Eyl 2026 → 11 Nis 2027 (200 gün)
// Abonelik 21 Mar 2027'de bitiyor → reissue yapılmaz
{
"order_id": 12345,
"period": 12,
"auto_reissue_enabled": true,
"max_validity_days": 200,
"purchase_end_date": "2027-03-21",
"next_reissue_at": "2026-09-23",
"reissue_count": 0,
"cert_valid_from": "2026-03-21",
"cert_valid_till": "2026-10-07"
}
Кодқа қол қою ерекшелігі: Code Signing және EV Code Signing сертификаттары 198 күн ережесінен босатылған. Бұл өнімдерде auto_reissue_enabled әрдайым false қайтарады.
Otomatik SSL (ACME) Abonelikleri
Sectigo ACME ve "Plan + Automate" ürünleri yıllık aboneliktir. Bu ürünlerde CSR ve doğrulama adımı yoktur; sertifikayı müşterinin sunucusundaki ACME istemcisi ya da AutoInstall SSL alır ve yeniler.
Ürünleri listeleme
Abonelik ürünleri yalnızca istendiğinde listelenir:
GET /products?include=acme
Bu ürünlerde şu alanlar döner: fulfillment: "acme_subscription", requires_csr: false, acme_type (caas = ACME istemcisi, ais = AutoInstall SSL), wildcard_only.
Abonelik siparişi
POST /orders
| Alan | Міндетті | Сипаттама |
product_id | Иә | Abonelik ürününün kimliği |
domain | Иә | Alan adı. wildcard_only ürünlerde *.example.com biçiminde. www adresi kendiliğinden eklenir. |
contact_email | ais үшін | Sertifika ve abonelik bildirimlerinin gideceği adres |
Sipariş tutarı bakiyenizden düşülür ve abonelik hemen oluşturulur. Abonelik oluşturulamazsa sipariş iptal edilir ve tutar bakiyenize iade edilir.
{
"success": true,
"order_id": 1234,
"status": "completed",
"fulfillment": "acme_subscription",
"acme": { "status": "created", "subscription_id": 12, "details_endpoint": "/orders/1234/acme" }
}
Орнату деректері
GET /orders/{order_id}/acme
ACME sunucu adresini ve EAB kimlik bilgilerini döndürür. Bilgiler sağlayıcıdan anlık alınır; EAB anahtarını parola gibi saklayın.
{
"success": true,
"acme": {
"status": "active",
"category": "caas",
"domains": [ { "id": "123", "name": "ornek.com" }, { "id": "124", "name": "www.ornek.com" } ],
"subscription": { "begin": "2026-10-04", "next_renewal": "2027-10-04", "end": null },
"account": { "eab_kid": "...", "eab_hmac_key": "...", "server_url": "https://acme.sectigo.com/v2/DV", "status": "pending" },
"autoinstall": null
}
}
AutoInstall ürünlerinde autoinstall.login_url alanı kurulum panelinin bağlantısını verir. GET /orders/{order_id} yanıtında da aboneliğin özeti (acme) yer alır.
Шот-фактуралар
Шот-фактуралар тізімі
GET /invoices
Status |
Күй сүзгісі (unpaid, paid, cancelled, sent) |
limit |
Беттегі жазбалар (макс. 100) |
offset |
Бастапқы нүкте |
Жауап
{
"success": true,
"invoices": [
{
"id": 78,
"invoice_number": "INV-2026-0078",
"order_number": "ORD-2026-0042",
"domain": "example.com",
"total": 28.97,
"currency": "USD",
"status": "unpaid",
"due_date": "2026-02-21",
"created_at": "2026-02-14 10:30:00"
}
],
"pagination": { "total": 156, "limit": 50, "offset": 0 }
}
Шот-фактура мәліметтері
GET /invoices/{id}
Кредит & Төлем
USD негізінде: Барлық кредит қалдықтары мен операциялар USD-мен жүргізіледі.
Кредит балансы & Операциялар тарихы
GET /credits
{
"success": true,
"balance": 1250.00,
"currency": "USD",
"transactions": [
{
"id": 45,
"amount": -28.97,
"type": "debit",
"description": "Sipariş ödemesi: ORD-2026-0042",
"balance_after": 1221.03,
"created_at": "2026-02-14 10:31:00"
},
{
"id": 44,
"amount": 500.00,
"type": "credit",
"description": "Kredi yükleme",
"balance_after": 1250.00,
"created_at": "2026-02-13 09:00:00"
}
],
"pagination": { "total": 45, "limit": 50, "offset": 0 }
}
Тапсырысты кредитпен төлеу
POST /credits
// İstek
{ "order_id": 12345 }
// Yanıt
{
"success": true,
"message": "Ödeme başarıyla alındı",
"order_id": 12345,
"amount_paid": 28.97,
"new_balance": 1221.03
}
Баланс жеткіліксіз болса, қате қайтарылады. Төлем алдында балансты тексеруді ұсынамыз.
Балансты тексеру (қысқа)
GET /balance
Соңғы 10 операциямен бірге баланс ақпаратын қайтарады.
Сертификат
Сертификат күйі
GET /certificate/{order_id}
{
"success": true,
"certificate": {
"order_id": 12345,
"domain": "example.com",
"product": "Sectigo PositiveSSL",
"brand": "Sectigo",
"status": "completed",
"valid_from": "2026-03-21",
"valid_till": "2026-10-07",
"has_certificate": true,
"has_ca_bundle": true,
"days_remaining": 200,
"is_expired": false,
"auto_reissue_enabled": true,
"max_validity_days": 200,
"next_reissue_at": "2026-09-23",
"purchase_end_date": "2027-03-21",
"reissue_count": 0
}
}
Сертификатты жүктеп алу
GET /certificate/{order_id}/download
{
"success": true,
"certificate": {
"domain": "example.com",
"valid_from": "2026-03-21",
"valid_till": "2026-10-07",
"certificate_pem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"ca_bundle": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
"private_key_note": "Private key sipariş oluşturulurken size iletilmiştir."
}
}
Статистика
GET /stats
Дилер тіркелгіңіз бойынша толық статистика мен график деректерін қайтарады.
{
"success": true,
"stats": {
"total_orders": 156,
"active_orders": 89,
"pending_orders": 3,
"total_revenue": 15420.00,
"monthly_revenue": 2340.00,
"credit_balance": 1250.00
},
"charts": {
"daily_sales": [
{ "date": "2026-02-13", "orders": 5, "revenue": 245.50 },
{ "date": "2026-02-14", "orders": 3, "revenue": 189.97 }
],
"brand_distribution": [
{ "brand": "Sectigo", "count": 78 },
{ "brand": "DigiCert", "count": 45 }
],
"status_distribution": {
"completed": 89,
"pending": 3,
"processing": 5,
"cancelled": 12
}
}
}
Тіркелгі ақпараты
GET /account
{
"success": true,
"reseller": {
"id": 42,
"name": "Bayi Adı",
"email": "bayi@example.com",
"company": "Örnek Şirket Ltd.",
"discount_rate": 30.0,
"credit_balance": 1250.00,
"stats": {
"order_count": 156,
"total_revenue": 15420.00
}
}
}
Қате кодтары
| Код |
Мағынасы |
Сипаттама |
| 400 |
Bad Request |
Параметрлер жарамсыз немесе толық емес |
| 401 |
Unauthorized |
API кілті жарамсыз немесе API қолжетімділігі өшірулі |
| 403 |
Forbidden |
Дилер тобы анықталмаған немесе өнімге қолжетімділік жоқ |
| 404 |
Табылмады |
Ресурс табылмады (тапсырыс, сертификат) |
| 405 |
Method Not Allowed |
Бұл endpoint үшін HTTP әдісіне қолдау көрсетілмейді |
| 500 |
Server Error |
Сервер қатесі |
Қате жауабы
{
"success": false,
"error": "Yetersiz bakiye. Gerekli: $28.97 Mevcut: $10.00"
}
Код мысалдары
<?php
class DataSSLClient {
private $apiKey;
private $baseUrl = 'https://www.datassl.com/api/reseller';
public function __construct($apiKey) {
$this->apiKey = $apiKey;
}
private function request($method, $endpoint, $data = null) {
$ch = curl_init($this->baseUrl . $endpoint);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Content-Type: application/json',
'X-API-Key: ' . $this->apiKey
]
]);
if ($method === 'POST') {
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
}
if ($method === 'PUT') {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
}
if ($method === 'DELETE') {
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
}
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
return json_decode($response, true);
}
// Ürünler
public function getProducts($filters = []) {
$query = $filters ? '?' . http_build_query($filters) : '';
return $this->request('GET', '/products' . $query);
}
public function getProduct($id) {
return $this->request('GET', '/products/' . $id);
}
// Siparişler
public function getOrders($filters = []) {
$query = $filters ? '?' . http_build_query($filters) : '';
return $this->request('GET', '/orders' . $query);
}
public function createOrder($data) {
return $this->request('POST', '/orders', $data);
}
public function cancelOrder($id) {
return $this->request('PUT', '/orders/' . $id, ['action' => 'cancel']);
}
// Faturalar
public function getInvoices($status = '') {
$query = $status ? '?status=' . $status : '';
return $this->request('GET', '/invoices' . $query);
}
// Kredi
public function getCredits() {
return $this->request('GET', '/credits');
}
public function payWithCredit($orderId) {
return $this->request('POST', '/credits', ['order_id' => $orderId]);
}
// Sertifika
public function getCertificateStatus($orderId) {
return $this->request('GET', '/certificate/' . $orderId);
}
public function downloadCertificate($orderId) {
return $this->request('GET', '/certificate/' . $orderId . '/download');
}
// Hesap & İstatistik
public function getAccount() { return $this->request('GET', '/account'); }
public function getBalance() { return $this->request('GET', '/balance'); }
public function getStats() { return $this->request('GET', '/stats'); }
}
// ─── Kullanım Örnekleri ───
$client = new DataSSLClient('YOUR_API_KEY');
// 1. Ürünleri listele
$products = $client->getProducts(['brand' => 'Sectigo', 'type' => 'ssl']);
// 2. Sipariş oluştur (kredi bakiyesinden otomatik kesilir)
$order = $client->createOrder([
'product_id' => 1,
'domain' => 'example.com',
'period' => 12,
'san_count' => 2
]);
// 3. Sipariş zaten ödenmiş, SSL yapılandırabilirsiniz
if ($order['success']) {
echo "Sipariş: " . $order['order_number'] . "\n";
echo "Tutar: $" . $order['total'] . "\n";
echo "Kalan bakiye: $" . $order['new_balance'] . "\n";
}
// 4. Sertifika indir
$cert = $client->downloadCertificate(12345);
if ($cert['success']) {
file_put_contents('certificate.pem', $cert['certificate']['certificate_pem']);
file_put_contents('ca-bundle.pem', $cert['certificate']['ca_bundle']);
}
?>
import requests
class DataSSLClient:
def __init__(self, api_key):
self.api_key = api_key
self.base_url = 'https://www.datassl.com/api/reseller'
self.headers = {
'Content-Type': 'application/json',
'X-API-Key': api_key
}
def get_products(self, **filters):
return requests.get(f'{self.base_url}/products', params=filters, headers=self.headers).json()
def create_order(self, data):
return requests.post(f'{self.base_url}/orders', json=data, headers=self.headers).json()
def cancel_order(self, order_id):
return requests.put(f'{self.base_url}/orders/{order_id}', json={'action': 'cancel'}, headers=self.headers).json()
def get_invoices(self, status=''):
params = {'status': status} if status else {}
return requests.get(f'{self.base_url}/invoices', params=params, headers=self.headers).json()
def pay_with_credit(self, order_id):
return requests.post(f'{self.base_url}/credits', json={'order_id': order_id}, headers=self.headers).json()
def get_certificate(self, order_id):
return requests.get(f'{self.base_url}/certificate/{order_id}', headers=self.headers).json()
def download_certificate(self, order_id):
return requests.get(f'{self.base_url}/certificate/{order_id}/download', headers=self.headers).json()
def get_stats(self):
return requests.get(f'{self.base_url}/stats', headers=self.headers).json()
def get_balance(self):
return requests.get(f'{self.base_url}/balance', headers=self.headers).json()
# ─── Kullanım ───
client = DataSSLClient('YOUR_API_KEY')
# Ürünleri listele
products = client.get_products(brand='Sectigo', type='ssl')
for p in products.get('products', []):
print(f"{p['name']} - ${p['reseller_price']}")
# Sipariş oluştur + öde
order = client.create_order({
'product_id': 1,
'domain': 'example.com'
})
if order['success']:
payment = client.pay_with_credit(order['order_id'])
print(f"Ödendi: ${payment['amount_paid']} | Bakiye: ${payment['new_balance']}")
# İstatistikler
stats = client.get_stats()
print(f"Bu ay gelir: ${stats['stats']['monthly_revenue']}")
const axios = require('axios');
class DataSSLClient {
constructor(apiKey) {
this.client = axios.create({
baseURL: 'https://www.datassl.com/api/reseller',
headers: { 'Content-Type': 'application/json', 'X-API-Key': apiKey }
});
}
async getProducts(filters = {}) {
return (await this.client.get('/products', { params: filters })).data;
}
async createOrder(data) {
return (await this.client.post('/orders', data)).data;
}
async cancelOrder(id) {
return (await this.client.put(`/orders/${id}`, { action: 'cancel' })).data;
}
async getInvoices(status = '') {
return (await this.client.get('/invoices', { params: { status } })).data;
}
async payWithCredit(orderId) {
return (await this.client.post('/credits', { order_id: orderId })).data;
}
async getCertificate(orderId) {
return (await this.client.get(`/certificate/${orderId}`)).data;
}
async downloadCertificate(orderId) {
return (await this.client.get(`/certificate/${orderId}/download`)).data;
}
async getStats() { return (await this.client.get('/stats')).data; }
async getBalance() { return (await this.client.get('/balance')).data; }
async getAccount() { return (await this.client.get('/account')).data; }
}
// ─── Kullanım ───
(async () => {
const client = new DataSSLClient('YOUR_API_KEY');
// Ürünler
const { products } = await client.getProducts({ brand: 'Sectigo' });
products.forEach(p => console.log(`${p.name} - $${p.reseller_price}`));
// Sipariş + Ödeme
const order = await client.createOrder({
product_id: 1, domain: 'example.com',
san_count: 2
});
if (order.success) {
const payment = await client.payWithCredit(order.order_id);
console.log(`Ödendi: $${payment.amount_paid}`);
}
// İstatistik
const stats = await client.getStats();
console.log(`Toplam sipariş: ${stats.stats.total_orders}`);
})();
# ─── Ürünler ───
curl -X GET "https://www.datassl.com/api/reseller/products?brand=Sectigo&type=ssl" \
-H "X-API-Key: YOUR_API_KEY"
# ─── Sipariş Oluştur ───
curl -X POST "https://www.datassl.com/api/reseller/orders" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{
"product_id": 1,
"domain": "example.com",
"san_count": 2
}'
# ─── Sipariş İptal ───
curl -X PUT "https://www.datassl.com/api/reseller/orders/12345" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{ "action": "cancel" }'
# ─── Faturalar ───
curl -X GET "https://www.datassl.com/api/reseller/invoices?status=unpaid" \
-H "X-API-Key: YOUR_API_KEY"
# ─── Kredi ile Öde ───
curl -X POST "https://www.datassl.com/api/reseller/credits" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{ "order_id": 12345 }'
# ─── Sertifika Durumu ───
curl -X GET "https://www.datassl.com/api/reseller/certificate/12345" \
-H "X-API-Key: YOUR_API_KEY"
# ─── Sertifika İndir ───
curl -X GET "https://www.datassl.com/api/reseller/certificate/12345/download" \
-H "X-API-Key: YOUR_API_KEY"
# ─── İstatistikler ───
curl -X GET "https://www.datassl.com/api/reseller/stats" \
-H "X-API-Key: YOUR_API_KEY"
# ─── Bakiye ───
curl -X GET "https://www.datassl.com/api/reseller/balance" \
-H "X-API-Key: YOUR_API_KEY"
# ─── Hesap Bilgileri ───
curl -X GET "https://www.datassl.com/api/reseller/account" \
-H "X-API-Key: YOUR_API_KEY"
WHMCS модулі
WHMCS арқылы DATASSL өнімдерін оңай сата аласыз. Addon + Server модуль құрылымымен толық интеграция.
WHMCS Addon + Server Module v5.9.0
Толық басқару панелі, өнім құрастырушы, тапсырыстарды синхрондау және автоматты провизиялау.
- WHMCS 7.x / 8.x / 9.x үйлесімді
- Addon панелі: өнім құрастырушы, тапсырыстарды басқару, статистика
- Өнімдерді жаппай қосу және автоматты баға қою
- Cron арқылы тапсырыстарды автоматты синхрондау
- Әкімші және клиент интерфейсі
- Сервер қосу қажет емес - API кірістірілген түрде келеді
Орнату
- ZIP файлын жүктеп алып, ашыңыз
- Екі қалтаны WHMCS каталогыңызға көшіріңіз:
modules/addons/datassl → Addon paneli
modules/servers/datassl → Provisioning модулі
- WHMCS Admin → Setup → Addon Modules → "DATASSL SSL Certificates" → Activate
- Access Control бөлімінен әкімші рөлдерін таңдаңыз
- Addons → DATASSL → Өнім құрастырушы арқылы өнімдерді қосыңыз
Сервер қосу немесе API кілтін енгізу қажет емес. API деректері модульге кірістірілген түрде келеді.