GET/api/v2/account/wallet/transactions
حركات المحفظة
سجل مدين ودائن مع الرصيد بعد كل حركة، ومنح الرسائل المجانية. لا تُعاد وسائل دفع أو أسرار.
مثال الاستجابة
لقطة تتضمن منح الرسائل المجانية
{
"success": true,
"data": {
"transactions": [
{
"id": "6800bbb123def4567890aaaa",
"amount": 0.12,
"type": "debit",
"source": "usage",
"description": "SMS send",
"balanceAfter": 4.88,
"messageCount": 1,
"walletTopupDiscountPercent": null,
"walletTopupDiscountCouponCode": null,
"createdAt": "2026-07-20T14:22:00.000Z"
},
{
"id": "6800ccc123def4567890bbbb",
"amount": 10,
"type": "credit",
"source": "admin_topup",
"description": "Admin top-up",
"balanceAfter": 5,
"messageCount": null,
"walletTopupDiscountPercent": null,
"walletTopupDiscountCouponCode": null,
"createdAt": "2026-07-18T09:00:00.000Z"
}
],
"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"
}
]
},
"total": 2,
"balance": 4.88,
"skip": 0,
"limit": 100
}
}سجل المحفظة بدون منح مجانية
{
"success": true,
"data": {
"transactions": [
{
"id": "6800bbb123def4567890aaaa",
"amount": 0.12,
"type": "debit",
"source": "usage",
"description": "SMS send",
"balanceAfter": 4.88,
"messageCount": 1,
"walletTopupDiscountPercent": null,
"walletTopupDiscountCouponCode": null,
"createdAt": "2026-07-20T14:22:00.000Z"
},
{
"id": "6800ccc123def4567890bbbb",
"amount": 10,
"type": "credit",
"source": "admin_topup",
"description": "Admin top-up",
"balanceAfter": 5,
"messageCount": null,
"walletTopupDiscountPercent": null,
"walletTopupDiscountCouponCode": null,
"createdAt": "2026-07-18T09:00:00.000Z"
}
],
"freeMessageGrants": {
"summary": {
"totals": {
"granted": 0,
"consumed": 0,
"reserved": 0,
"withdrawn": 0,
"remaining": 0,
"activeRemaining": 0
},
"activeGrantCount": 0,
"grantCount": 0,
"byScope": []
},
"grants": []
},
"total": 2,
"balance": 4.88,
"skip": 0,
"limit": 100
}
}طلب HTTP
GET /api/v2/account/wallet/transactions
ترويسات الطلب
| الترويسة | النوع | الوصف |
|---|---|---|
| X-API-Key | string | مفتاح Rasel API. أرسله في كل طلب موثّق ما عدا الويب هوك الوارد. * |
معاملات الاستعلام
| الحقل | النوع | الوصف |
|---|---|---|
| skip | integer | عدد الصفوف المراد تخطيها. الافتراضي 0. |
| limit | integer | حجم الصفحة. عادة 1–50 لسياق المحادثة و1–500 لقوائم الحساب. |
| fromDate | string | تاريخ البداية ضمن النطاق (YYYY-MM-DD). |
| toDate | string | تاريخ النهاية ضمن النطاق (YYYY-MM-DD). |
| type | credit | debit | قيمة الفلتر. في المحادثات: all أو direct أو group. في حركات المحفظة: credit أو debit. |
| source | admin_topup | usage | topup_request | default_plan_bonus | trial_balance | admin_withdrawal | subscription_refund | subscription_payment | coupon | send_failure_refund | مصدر حركة المحفظة مثل usage أو admin_topup أو topup_request. في رفع الوسائط هو أصل الأصل المخزّن. |
حقول الاستجابة
| الحقل | النوع | الوصف | مثال |
|---|---|---|---|
| success | boolean | صحيح عندما ينجح الإجراء، أو عندما ينجح مستلم واحد على الأقل في الدفعة. | true |
| data | object | الحمولة الأساسية لمسارات القائمة واللقطة. |
رموز الحالة
| الحالة | الوصف |
|---|---|
| 200 | نجاح. |
| 401 | مفتاح API مفقود أو غير صالح. |
| 403 | الهاتف غير موثّق، أو الصلاحية ناقصة، أو الحساب لا يستطيع تنفيذ هذا الإجراء. |
| 429 | تم تجاوز حد المعدل، أو وصل عدد محاولات التحقق إلى الحد الأقصى. |
جرّب الطلب
الاستجابة
نفّذ طلباً لعرض الاستجابة.