Zehir_V4 AI REST API

Masaüstü uygulamalarınızı veya özel sistemlerinizi Zehir_V4 ekosistemine bağlayın. Sistemimiz gelişmiş bir JSON API üzerinden yetkilendirme ve kredi kontrolü sağlar.

1. Kullanıcı Girişi (Login)

POST

Masaüstü yazılımından kullanıcı adı ve şifre ile hizmet kredilerini ve API tokenını getirir.

URL: https://starzyazilim.com.tr/api/login.php
Parametreler (x-www-form-urlencoded):
username Tuna kayıtlı kullanıcısı adı.
password Kullanıcıya özel şifre.
Response (JSON):
{
    "success": true,
    "token": "a1b2c3d4e5f6g7h8",
    "credits": 500,
    "username": "tuner_master"
}

2. Kredi Sorgulama

GET / POST

Aktif bir yetkilendirme anahtarı (Token) ile anlık hizmet kredisi durumunu sorgular.

URL: https://starzyazilim.com.tr/api/get_credits.php
Parametreler:
token API authorization token received from the Login endpoint. Can be sent via GET or POST.
Response (JSON):
{
    "success": true,
    "username": "tuner_master",
    "credits": 500,
    "logo_url": "https://www.starzyazilim.com.tr/uploads/logos/logo_1.png",
    "timestamp": 1712700000
}
EXAMPLE USAGE
GET /api/get_credits.php?token=a1b2c3d4e5f6g7h8

POST /api/get_credits.php
Content-Type: application/x-www-form-urlencoded
token=a1b2c3d4e5f6g7h8

3. İşlem Başlat (Analiz)

POST

Initiates an ECU file processing operation from the desktop software. Automatically deducts credits, logs the transaction, and returns the remaining credit information.

URL: https://starzyazilim.com.tr/api/log_transaction.php
Parameters (x-www-form-urlencoded):
token REQUIRED API authorization token obtained from the Login endpoint.
action REQUIRED Processing type. E.g.: Stage1, Stage2, DPF_Off, EGR_Off, Pop_Bang, AdBlue_Off, DTC_Removal
car OPTIONAL Vehicle brand and model. E.g.: BMW M4 Competition. First word is parsed as brand.
ecu OPTIONAL ECU type. E.g.: Bosch MED17.1.1, Siemens MSS65
cost OPTIONAL Credit amount to deduct (integer). Default: 0
file_name OPTIONAL Name of the processed file. Default: ai_process.bin
Success Response (JSON):
{
    "success": true,
    "message": "Transaction logged and credits deducted.",
    "remaining_credits": 450
}
Error Response (Insufficient Credits):
{
    "success": false,
    "message": "Insufficient credits"
}
FLOW DIAGRAM
1. Token Check 2. Credit Check 3. Deduct CP 4. Log Operation 5. Return Result

4. Hata Yönetimi

REFERENCE

All API responses are in JSON format. In case of errors, the success field returns false and the message field contains the error description.

General Error Format:
{
    "success": false,
    "message": "Error description here"
}
Error Reference Table:
Message Description Endpoint
Method not allowed Wrong HTTP method. Endpoint requires POST. login, log_transaction
Missing parameters Required parameters were not provided. login, log_transaction
Invalid credentials Username or password is incorrect. login
Token required Token parameter was not provided. get_credits
Invalid or expired token Token is invalid or expired. Re-authenticate via login. get_credits, log_transaction
Insufficient credits Not enough credits to complete the operation. log_transaction
Database error Server-side database error. Contact support. All
BEST PRACTICES
  • ✅ Always check the success field in every response
  • ✅ Verify credit status via get_credits before processing
  • ✅ Store your token securely, never expose it client-side
  • ✅ Re-authenticate via login when receiving "Invalid or expired token"
  • ✅ Rate limiting: Maximum 60 requests per minute recommended

API Information

INFO
Base URL https://starzyazilim.com.tr/api/
Response Format JSON (application/json)
Authentication Token-based (obtained from login endpoint)
SSL Required (HTTPS)
Support starzyazilim@gmail.com