انتقل إلى المحتوى الرئيسي

getAllOrdersByMarker

الحصول على جميع الطلبات من كائن تخزين الطلبات الذي أنشأه المستخدم. 🔐 تتطلب هذه الطريقة التفويض.

الوصف

تقوم هذه الطريقة بالحصول على جميع كائنات تخزين الطلبات بواسطة العلامة. ستضيف الطريقة اللغة الافتراضية إلى جسم الطلب. إذا كنت ترغب في تغيير اللغة، فقط مررها كوسيط ثانٍ. تُرجع وعدًا (Promise) يتم حله إلى كائن IOrdersByMarkerEntity.

Orders.getAllOrdersByMarker(

marker, langCode, offset, limit

);

مخطط المعاملات

المخطط

marker(required): string
معرف نصي لكائن تخزين الطلب
مثال: "order_storage_1"

langCode: string
رمز اللغة. الافتراضي: "en_US"
مثال: "en_US"

offset: number
معامل الإزاحة. الافتراضي: 0
مثال: 0

limit: number
معامل الحد. الافتراضي: 30
مثال: 30

أمثلة

مثال بسيط

const response = await Orders.getAllOrdersByMarker('my-order');

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

const response = await Orders.getAllOrdersByMarker('my-order', 'en_US', 0, 30);

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

{
"items": [
{
"id": 276,
"storageId": 1,
"createdDate": "2025-09-30T20:32:45.338Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "نقدي"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
},
{
"id": 275,
"storageId": 1,
"createdDate": "2025-09-30T20:31:44.881Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "نقدي"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
},
{
"id": 274,
"storageId": 1,
"createdDate": "2025-09-30T17:36:19.027Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "نقدي"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
},
"..."
],
"total": 83
}

مخطط الاستجابة

المخطط: IOrdersByMarkerEntity

items: IOrderByMarkerEntity[]
مصفوفة من كائنات تخزين الطلبات.
مثال:

[
{
"id": 55,
"storageId": 1,
"createdDate": "2025-03-22T21:12:42.371Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "نقدي"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
}
]

total: number
إجمالي عدد السجلات الموجودة.
مثال: 100