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

getOrderByMarkerAndId

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

الطلبات?.getOrderByMarkerAndId( marker?, id?, langCode? );

مثال بسيط

const value = await Orders.getOrderByMarkerAndId('my-order', 1764)
المخطط

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

id(required): number
معرف كائن الطلب
مثال: 12345

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

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

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

{
"id": 205,
"storageId": 1,
"createdDate": "2025-07-18T05:51:09.924Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"type": "string",
"value": "Ivan"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "50.00",
"currency": "usd",
"paymentAccountIdentifier": "stripe",
"paymentAccountLocalizeInfos": {
"title": "Stripe"
},
"products": [
{
"id": 2954,
"title": "Box",
"sku": null,
"previewImage": null,
"price": 50,
"quantity": 1
}
],
"isCompleted": false
}
المخطط

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

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

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

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

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

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

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

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

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

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

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

paymentAccountLocalizeInfos: Record<string, any>
اسم حساب الدفع مع مراعاة الترجمة المحلية.
مثال:

{
"en_US": "USD Payment",
"ru_RU": "Оплата в долларах США"
}

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

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

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