Ana içeriğe geç

getOrderByMarkerAndId

Kullanıcı tarafından oluşturulan sipariş depolama nesnesinden bir siparişi marker ve id ile almak. 🔐 Bu yöntem yetkilendirme? gerektirir.

Orders?.getOrderByMarkerAndId( marker?, id?, langCode? );

Minimal örnek

const value = await Orders.getOrderByMarkerAndId('my-order', 1764)
Şema

marker(gerekli): string
Sipariş depolama nesnesinin metin tanımlayıcısı
örnek: "order_storage_1"

id(gerekli): number
Sipariş nesnesinin ID'si
örnek: 12345

langCode: string
Dil kodu. Varsayılan: "en_US"
örnek: "en_US"

Bu yöntem, bir sipariş depolama nesnesini marker ve id ile alır.

Örnek yanıt

{
"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
}
Şema

id: number
Nesne tanımlayıcısı.
örnek: 125

storageId: number
Sipariş depolama nesnesinin tanımlayıcısı.
örnek: 1

createdDate: string
Siparişin oluşturulduğu tarih.
örnek: "2023-10-01T12:00:00Z"

statusIdentifier: string
Sipariş durumunun metin tanımlayıcısı.
örnek: "order-status-1"

formIdentifier: string
Formun metin tanımlayıcısı.
örnek: "bar-orders-form"

formData: IOrdersFormData[]
Sipariş deposuna bağlı form tarafından gönderilen veriler.
örnek:

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

attributeSetIdentifier: string | null
Özellik setinin metin tanımlayıcısı.
örnek: "attribute-set-1"

totalSum: string
Toplam sipariş tutarı.
örnek: "100.00"

currency: string
Siparişin ödenmesinde kullanılan para birimi.
örnek: "USD"

paymentAccountIdentifier: string | null
Sipariş ödemesi için metinsel tanımlayıcı.
örnek: "payment-1"

paymentAccountLocalizeInfos: Record<string, any>
Yerelleştirmeyi dikkate alarak ödeme hesabı adı.
örnek:

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

products: IOrderProducts[]
Siparişe eklenen ürünlerin dizisi.
örnek:

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

isCompleted: boolean
Siparişin tamamlandığını gösterir.
örnek: true