تخطَّ إلى المحتوى

هذه الوثائق متاحة حاليًا باللغة الإنجليزية فقط.

وثائق المطورينAPI referenceAccount

Get the balance

Available, plan, purchased and reserved credits.

GEThttps://runner.cargoduo.com/v1/balance

المصادقة

مفتاح API من نوع Bearer بالصلاحيةaccount:readاعرف المزيد

مثال على الطلب

curl -X GET "https://runner.cargoduo.com/v1/balance" \
  -H "Authorization: Bearer $CARGODUO_API_KEY"

مثال على الاستجابة

200 OK · Balance
{
  "available_credits": 147.75,
  "subscription_credits": 98.5,
  "subscription_expires_at": "2026-11-07T00:00:00Z",
  "purchased_credits": 50,
  "reserved_credits": 0.75
}

الاستجابات

  • 200OKBalance.
    الاسمالنوعمطلوبالوصف
    available_creditsnumber · credits
    number · credits
    لا

    What new jobs can use (subscription + purchased − reserved).

    subscription_creditsnumber · credits
    number · credits
    لا

    Monthly subscription credits left (spent first; expire at subscription_expires_at).

    subscription_expires_atstring | null
    string | null
    لا

    When the monthly credits expire (RFC 3339).

    purchased_creditsnumber · credits
    number · credits
    لا

    Credits from packs (never expire).

    reserved_creditsnumber · credits
    number · credits
    لا

    Held by queued/running jobs.

  • 401Unauthorizedunauthorizedkey_revokedkey_expired
    • unauthorizedMissing, malformed or unknown API key.
    • key_revokedThe key was revoked.
    • key_expiredThe key passed its expiry date.
    الاسمالنوعمطلوبالوصف
    errorErrorBodyمطلوب
    ErrorBody
    نعم
    كل رموز الأخطاء
  • 403Forbiddenip_not_allowedsubscription_inactiveaccount_inactivescope_missing
    • ip_not_allowedThe calling IP is not on the key's allowlist.
    • subscription_inactiveThe organization has no active subscription that includes the API.
    • account_inactiveThe organization is suspended, or has no owner whose account is active.
    • scope_missingThe key lacks a scope this endpoint needs.
    الاسمالنوعمطلوبالوصف
    errorErrorBodyمطلوب
    ErrorBody
    نعم
    كل رموز الأخطاء
  • 429Too many requestsrate_limited
    • rate_limitedToo many requests in the current minute, hour or day (per key or per organization), or more than 60 failed authentications per minute from your IP address.
    الاسمالنوعمطلوبالوصف
    errorErrorBodyمطلوب
    ErrorBody
    نعم
    كل رموز الأخطاء
  • 500Internal server errorinternal_error
    • internal_errorSomething failed on our side.
    الاسمالنوعمطلوبالوصف
    errorErrorBodyمطلوب
    ErrorBody
    نعم
    كل رموز الأخطاء
  • 503Service unavailableapi_disabled
    • api_disabledThe API is temporarily disabled (maintenance) or switched off for the organization.
    الاسمالنوعمطلوبالوصف
    errorErrorBodyمطلوب
    ErrorBody
    نعم
    كل رموز الأخطاء