Rasel / Docs
AR
GET/api/v2/account/subscriptions

سجل الاشتراكات

فترات الاشتراك والرسوم مع ترقيم الصفحات، بالإضافة إلى freeMessageGrants. الحقول الداخلية الحساسة محذوفة.

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

لقطة تتضمن منح الرسائل المجانية

{
  "success": true,
  "data": {
    "subscriptions": [
      {
        "id": "6800sub123def4567890cccc",
        "status": "active",
        "startAt": "2026-07-01T00:00:00.000Z",
        "endAt": "2026-08-01T00:00:00.000Z",
        "billingCycleMonths": 1,
        "isTrial": false,
        "periodMessageLimit": 1000,
        "periodChannelLimits": null,
        "bonusMessagesGranted": 0,
        "poolSuppressedByCoupon": false,
        "plan": {
          "id": "6800plan123def4567890dddd",
          "name": "Growth",
          "monthlyPrice": 49
        },
        "createdAt": "2026-07-01T00:00:00.000Z"
      }
    ],
    "charges": [],
    "freeMessageGrants": {
      "summary": {
        "totals": {
          "granted": 100,
          "consumed": 10,
          "reserved": 0,
          "withdrawn": 0,
          "remaining": 90,
          "activeRemaining": 90
        },
        "activeGrantCount": 1,
        "grantCount": 1,
        "byScope": [
          {
            "channel": "sms_local",
            "providerKey": null,
            "messageType": "all",
            "granted": 100,
            "consumed": 10,
            "reserved": 0,
            "withdrawn": 0,
            "remaining": 90,
            "activeRemaining": 90,
            "grantCount": 1
          }
        ]
      },
      "grants": [
        {
          "id": "6800abc123def4567890fedc",
          "channel": "sms_local",
          "providerKey": null,
          "messageType": "all",
          "initialQuantity": 100,
          "consumedQuantity": 10,
          "reservedQuantity": 0,
          "withdrawnQuantity": 0,
          "remainingQuantity": 90,
          "status": "active",
          "cycleStart": "2026-07-01T00:00:00.000Z",
          "cycleEnd": "2026-08-01T00:00:00.000Z",
          "expiresAt": "2026-08-31T23:59:59.000Z",
          "reason": "admin_gift",
          "userNote": "Complimentary SMS gift from support",
          "subscriptionId": null,
          "createdAt": "2026-07-15T10:00:00.000Z"
        }
      ]
    },
    "totalSubscriptions": 1,
    "totalCharges": 0,
    "skip": 0,
    "limit": 100
  }
}

طلب HTTP

GET /api/v2/account/subscriptions

ترويسات الطلب

الترويسةالنوعالوصف
X-API-Keystringمفتاح Rasel API. أرسله في كل طلب موثّق ما عدا الويب هوك الوارد. *

معاملات الاستعلام

الحقلالنوعالوصف
skipintegerعدد الصفوف المراد تخطيها. الافتراضي 0.
limitintegerحجم الصفحة. عادة 1–50 لسياق المحادثة و1–500 لقوائم الحساب.
statuspending | active | scheduled | expired | paused | cancelled | upgrade_pendingحالة التسليم أو السجل. في الإرسال: sent أو queued أو scheduled. في الموارد الأخرى هي فلتر الحالة أو قيمتها.
includecharges | subscriptionsالافتراضي يشمل الاشتراكات والرسوم معاً. استخدم subscriptions لإخفاء الرسوم.

حقول الاستجابة

الحقلالنوعالوصفمثال
successbooleanصحيح عندما ينجح الإجراء، أو عندما ينجح مستلم واحد على الأقل في الدفعة.true
dataobjectالحمولة الأساسية لمسارات القائمة واللقطة.

رموز الحالة

الحالةالوصف
200نجاح.
401مفتاح API مفقود أو غير صالح.
403الهاتف غير موثّق، أو الصلاحية ناقصة، أو الحساب لا يستطيع تنفيذ هذا الإجراء.
429تم تجاوز حد المعدل، أو وصل عدد محاولات التحقق إلى الحد الأقصى.

جرّب الطلب

الاستجابة

نفّذ طلباً لعرض الاستجابة.