الانتقال إلى المحتوى الرئيسي
GET
/
v3
/
gift-cards
/
list
قائمة الطلبات
curl --request GET \
  --url https://api.oneclickdz.com/v3/gift-cards/list \
  --header 'X-Access-Token: <api-key>'

Documentation Index

Fetch the complete documentation index at: https://docs.oneclickdz.com/llms.txt

Use this file to discover all available pages before exploring further.

نظرة عامة

يعيد قائمة مقسَّمة إلى صفحات لجميع طلبات بطاقات الهدايا والمنتجات الرقمية مع إمكانية التصفية حسب التاريخ.

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

page
integer
افتراضي:1
رقم الصفحة (الحد الأدنى: 1)
pageSize
integer
افتراضي:20
العناصر في الصفحة (الحد الأدنى: 1، الحد الأقصى: 100)
from
string
تاريخ البداية (ISO 8601)
to
string
تاريخ النهاية (ISO 8601)

أمثلة

curl "https://api.oneclickdz.com/v3/gift-cards/list?page=1&pageSize=20" \
  -H "X-Access-Token: YOUR_API_KEY"

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

{
  "success": true,
  "data": {
    "items": [
      {
        "_id": "69001dc60c7d0ff0c542d96f",
        "quantity": 1,
        "price_per_card": 0,
        "time": "2025-10-28T01:35:02.224Z",
        "fulfilled_quantity": 1,
        "fulfilled_amount": 0,
        "cards": [
          {
            "value": "SANDBOX-CARD-1",
            "serial": "SANDBOX-1"
          }
        ],
        "status": "FULFILLED",
        "product": "string",
        "type": "string"
      },
      {
        "_id": "68fcdd7cd712569c624e05ee",
        "quantity": 1,
        "price_per_card": 2000,
        "time": "2025-10-25T14:23:56.515Z",
        "fulfilled_quantity": 0,
        "fulfilled_amount": 0,
        "cards": [],
        "status": "REFUNDED",
        "product": "6126393c6f57860f925a1983",
        "type": "6126393c6f57860f925a1984"
      }
    ],
    "pagination": {
      "page": 1,
      "pageSize": 5,
      "totalPages": 11,
      "totalResults": 55
    }
  },
  "meta": {
    "timestamp": "2025-10-29T00:36:53.030Z"
  }
}

التصفية

حسب نطاق التاريخ

curl "https://api.oneclickdz.com/v3/gift-cards/list?from=2025-10-01T00:00:00Z&to=2025-10-31T23:59:59Z" \
  -H "X-Access-Token: YOUR_API_KEY"

التصفية من جهة العميل

// Filter by status
const fulfilled = orders.filter((o) => o.status === "FULFILLED");
const refunded = orders.filter((o) => o.status === "REFUNDED");

// Calculate totals
const totalRevenue = orders
  .filter((o) => o.status === "FULFILLED")
  .reduce((sum, o) => sum + o.fulfilled_amount, 0);

روابط ذات صلة

تقديم طلب

إنشاء طلب جديد

التحقق من الطلب

عرض طلب محدد