> ## Documentation Index
> Fetch the complete documentation index at: https://docs.acedata.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# الحصول على قائمة طلبات منصة AceDataCloud

> Platform API guide - Ace Data Cloud

إرجاع طلبات شحن رصيد الحساب على شكل صفحات، وهو مناسب للعثور على معرّف الطلب، وعرض حالة الدفع، وتسوية الحسابات.

## التحضير

أنشئ [Account Token](https://platform.acedata.cloud/documents/platform-token)، واحصل على UUID الحساب الحالي من `GET /api/v1/platform-tokens/me/`.

```shell theme={null}
export PLATFORM_TOKEN='رمز الحساب الخاص بك'
export USER_ID='UUID الحساب الخاص بك'
```

## نظرة عامة على الواجهة

| البند | المحتوى |
| - | - |
| الطريقة | `GET` |
| URL | `https://platform.acedata.cloud/api/v1/orders/` |
| المصادقة | Account Token، يتطلب OAuth token صلاحية `orders:read` |
| الترقيم | `count` + `items` |

يجب على المستخدمين العاديين تمرير `user_id` الخاص بهم؛ وإلا فقد يتم إرجاع `403` عند مواجهة كائنات غير مصرح بها أثناء الترقيم.

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

| المعامل | النوع | مطلوب | الوصف |
| - | - | - | - |
| `user_id` | UUID | مطلوب للمستخدمين العاديين | الحساب الذي ينتمي إليه الطلب؛ يدعم تكرار المعامل |
| `pay_way` | string | لا | التصفية حسب طريقة الدفع؛ يدعم القيم المكررة أو المفصولة بفواصل |
| `state` | string | لا | التصفية حسب الحالة؛ يدعم القيم المكررة أو المفصولة بفواصل |
| `created_at_from/to` | datetime | لا | نطاق وقت الإنشاء |
| `finished_at_from/to` | datetime | لا | نطاق وقت الإكمال |
| `limit` / `offset` | integer | لا | الترقيم |
| `ordering` | string | لا | `created_at`، أو `-created_at`، أو `finished_at`، أو `-finished_at` |

لا تدعم القائمة الحالية التصفية حسب `application_id` أو `service_id` أو `package_id` أو `payment_method` أو `tag`؛ واسم حقل طريقة الدفع هو `pay_way`.

```shell theme={null}
curl --get 'https://platform.acedata.cloud/api/v1/orders/' \
  --data-urlencode "user_id=${USER_ID}" \
  --data-urlencode 'state=Paid,Finished' \
  --data-urlencode 'pay_way=Stripe' \
  --data-urlencode 'limit=100' \
  -H "Authorization: Bearer ${PLATFORM_TOKEN}"
```

## توضيح الاستجابة

الاستجابة هي `{count, items}`. تتضمن عناصر القائمة المباشرة `id` و`user_id` و`application_id/application_ids` و`package_id/package_ids` و`price` و`amount` و`discount` و`remaining_amount` و`state` و`pay_way` و`pay_id` و`pay_url` و`finished_at` و`expired_at` و`invoice` و`metadata` وحقول الوقت.

* الحالات الفعلية هي `Pending` و`Paid` و`Finished` و`Expired` و`Failed` و`Refunded`، ولا توجد `Cancelled`.
* أسماء الحقول هي `pay_way` و`finished_at` و`discount` و`price`، وليست `payment_method` أو `paid_at` أو `discount_rate` أو `final_price`.
* `price` هو السعر النهائي المسجل للطلب؛ وقد تكون تفاصيل العملة والتسوية ضمن metadata خاضعة للتحكم، ولا يمكن استنتاجها ذاتيًا من طريقة الدفع فقط.

## الواجهات ذات الصلة

* [إنشاء طلب شحن رصيد](https://platform.acedata.cloud/documents/platform-order-create)
* [الحصول على تفاصيل الطلب](https://platform.acedata.cloud/documents/platform-order-detail)
* [دفع الطلب](https://platform.acedata.cloud/documents/platform-order-pay)
* [تحديث حالة الطلب](https://platform.acedata.cloud/documents/platform-order-refresh)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.