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

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

بشكل افتراضي، يمكنك استرداد 10 كائنات. وذلك بسبب حد السجلات في إعدادات أذونات الوحدة.
لعمل الترقيم بشكل صحيح، تحتاج إلى تكوين أذونات الوحدة وفقًا لاحتياجاتك في القسم المقابل.

أمثلة

مثال بسيط

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

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

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

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

{
"items": [
{
"id": 551,
"storageId": 1,
"createdDate": "2026-04-15T14:20:29.645Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "300",
"totalSumRaw": "300",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2,
"isGift": false
}
],
"paymentUrl": null,
"discountConfig": {
"orderDiscounts": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 300,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 300
},
"isPartial": false,
"isCompleted": null
},
{
"id": 550,
"storageId": 1,
"createdDate": "2026-04-14T14:53:59.484Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "300",
"totalSumRaw": "300",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2,
"isGift": false
}
],
"paymentUrl": null,
"discountConfig": {
"orderDiscounts": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 300,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 300
},
"isPartial": false,
"isCompleted": null
},
{
"id": 549,
"storageId": 1,
"createdDate": "2026-04-14T13:22:58.354Z",
"statusIdentifier": "inProgress",
"statusLocalizeInfos": {
"title": "In progress"
},
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"paymentStrategy": "once",
"totalSum": "300",
"totalSumRaw": "300",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2,
"isGift": false
}
],
"paymentUrl": null,
"discountConfig": {
"orderDiscounts": [],
"productDiscounts": [],
"coupon": null,
"settings": {
"allowStacking": false,
"maxDiscountValue": null,
"allowGiftStacking": false,
"maxBonusPaymentPercent": null,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"giftRefundPolicy": "KEEP_GIFT"
},
"additionalDiscountsMarkers": [],
"totalRaw": 300,
"totalSumWithDiscount": 300,
"excludedGiftProductIds": [],
"bonus": {
"availableBalance": 0,
"maxBonusDiscount": 0,
"minBonusAmount": null,
"minOrderAmountForBonus": null,
"bonusApplied": 0
},
"bonusApplied": 0,
"totalDue": 300
},
"isPartial": false,
"isCompleted": null
},
"..."
],
"total": 357
}

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

المخطط: 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": "Cash"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
}
]

items.id: number
معرف الكائن.
مثال: 125

items.storageId: number
معرف كائن تخزين الطلب.
مثال: 1

items.createdDate: string
تاريخ إنشاء الطلب.
مثال: "2023-10-01T12:00:00Z"

items.statusIdentifier: string
معرف نصي لحالة الطلب.
مثال: "order-status-1"

items.formIdentifier: string
معرف نصي للنموذج.
مثال: "bar-orders-form"

items.formData: IOrdersFormData[]
البيانات المقدمة من النموذج المرتبط بمخزن الطلب.
مثال:

[
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
]

formData.marker: string
علامة حقل النموذج.
مثال: "name_1"

formData.type: string
نوع القيمة.
مثال: "string"

formData.value: string
القيمة.
مثال: "Name"

items.attributeSetIdentifier: string | null
معرف نصي لمجموعة السمات.
مثال: "attribute-set-1"

items.totalSum: string
إجمالي مبلغ الطلب.
مثال: "100.00"

items.currency: string
العملة المستخدمة لدفع الطلب.
مثال: "USD"

items.paymentAccountIdentifier: string | null
معرف نصي لدفع الطلب.
مثال: "payment-1"

items.paymentAccountLocalizeInfos: ILocalizeInfo
اسم حساب الدفع مع مراعاة التوطين.
مثال:

{
"title": "Cash"
}

items.products: IOrderProducts[]
مصفوفة من المنتجات المضافة إلى الطلب.
مثال:

[
{
"id": 1,
"name": "Product 1",
"quantity": 2
}
]

products.id: number
معرف المنتج.
مثال: 2957

products.quantity: number
كمية المنتج.
مثال: 1

products.title: string
عنوان المنتج.
مثال: "Cosmo"

products.sku: string | null
SKU المنتج.
مثال: "SKU"

products.previewImage: IPicture | null
صورة المعاينة للمنتج.
مثال:

{
"filename": "image.jpg",
"downloadLink": "https://example.com/image.jpg",
"size": 102400,
"previewLink": "https://example.com/image-preview.jpg"
}

previewImage.filename: string
اسم الملف.
مثال: "image.jpg"

previewImage.downloadLink: string
رابط URL لتنزيل الصورة.
مثال: "https://example.com/image.jpg"

previewImage.size: number
حجم الصورة بالبايت.
مثال: 102400

previewImage.previewLink: string
رابط URL لمعاينة الصورة.
مثال: "https://example.com/image-preview.jpg"

products.price: number
سعر المنتج.
مثال: 150

products.isGift: boolean
ما إذا كان المنتج هدية.
مثال: false

items.paymentUrl: string | null
رابط الدفع.
مثال: "https://example.com/pay/123"

items.isCompleted: boolean | null
تشير إلى أن الطلب قد اكتمل.
مثال: true

items.statusLocalizeInfos: ILocalizeInfo
اسم الحالة المحلي.

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