همهٔ سیستم‌ها عملیاتی‌اند

مرجع API · نسخهٔ v1

API کیف پول

موجودی، هزینهٔ جاری ساعتی و ماهانه و تاریخچهٔ تراکنش‌ها. این گروه با شناسهٔ wallet در فایل OpenAPI آمده و ۲ endpoint دارد.

نمونه‌های curl توکن را از متغیر محیطی IRANCLAUD_TOKEN می‌خوانند؛ ساخت توکن و تنظیم این متغیر در راهنمای شروع سریع آمده است.

GET /api/v1/wallet #

Wallet balance and current hourly/monthly cost

دسترسی لازم: wallet:read محدودیت نرخ: خواندن
پاسخ‌ها (۴)
  • 200 Balance and cost summary. Amounts are in cents of Toman (divide by 100). data: balance_centscurrencyvm_hourly_centsbackup_hourly_centsforeign_hourly_centstotal_hourly_centstotal_monthly_centsrunway_days
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks wallet:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/wallet"
GET /api/v1/wallet/transactions #

Wallet transaction history (newest first)

دسترسی لازم: wallet:read محدودیت نرخ: خواندن
پارامترهای Query (۳)
limit integer
اختیاری Max items (1-200, default 50; out-of-range values are clamped)
offset integer
اختیاری Skip first N items (default 0)
type string
اختیاری Exact transaction type, e.g. topup, refund, debit_hourly, debit_traffic_topup, debit_backup_storage
پاسخ‌ها (۴)
  • 200 Transactions; meta.total is the full count for the filter data[]: typeamount_centsnotecreated_at
  • 401 unauthenticated — Authorization header missing or not "Bearer …"; token_invalid — token unknown, expired, revoked or the account is not active
  • 403 scope_missing — the token lacks wallet:read (details.required_scope)
  • 429 rate_limited — read limit reached; wait Retry-After seconds (details.retry_after_sec)
نمونهٔ curl
curl
curl \
  -H "Authorization: Bearer $IRANCLAUD_TOKEN" \
  "https://iranclaud.ir/api/v1/wallet/transactions"

همهٔ گروه‌های API