Nhảy đến nội dung

getAllOrdersByMarker

Lấy tất cả các đơn hàng từ đối tượng lưu trữ đơn hàng được tạo bởi người dùng. 🔐 Phương thức này yêu cầu ủy quyền?.

Orders?.getAllOrdersByMarker( marker?, langCode?, offset?, limit? );

Ví dụ tối thiểu

const value = await Orders.getAllOrdersByMarker('my-order')
Schema

marker(bắt buộc): string
Định danh văn bản của đối tượng lưu trữ đơn hàng
ví dụ: "order_storage_1"

langCode: string
Mã ngôn ngữ. Mặc định: "en_US"
ví dụ: "en_US"

offset: number
Tham số offset. Mặc định: 0
ví dụ: 0

limit: number
Tham số limit. Mặc định: 30
ví dụ: 30

Phương thức này lấy tất cả các đối tượng lưu trữ đơn hàng theo marker. Phương thức sẽ thêm ngôn ngữ mặc định vào thân yêu cầu. Nếu bạn muốn thay đổi ngôn ngữ, chỉ cần truyền nó với tham số thứ hai.

Ví dụ phản hồi

{
"items": [
{
"id": 233,
"storageId": 1,
"createdDate": "2025-07-21T09:40:08.552Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Tiền mặt"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
},
{
"id": 232,
"storageId": 1,
"createdDate": "2025-07-21T01:54:32.065Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Tiền mặt"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
},
{
"id": 231,
"storageId": 1,
"createdDate": "2025-07-21T01:49:51.641Z",
"statusIdentifier": "inProgress",
"formIdentifier": "orderForm",
"formData": [
{
"marker": "order_name",
"value": "Ivan",
"type": "string"
}
],
"attributeSetIdentifier": "order_form",
"totalSum": "300.00",
"currency": "",
"paymentAccountIdentifier": "cash",
"paymentAccountLocalizeInfos": {
"title": "Tiền mặt"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
},
"..."
],
"total": 40
}
Schema

items: IOrderByMarkerEntity[]
Mảng các đối tượng lưu trữ đơn hàng.
ví dụ:

[
{
"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": "Tiền mặt"
},
"products": [
{
"id": 2957,
"title": "Cosmo",
"sku": null,
"previewImage": null,
"price": 150,
"quantity": 2
}
],
"isCompleted": false
}
]

total: number
Tổng số bản ghi được tìm thấy.
ví dụ: 100