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.

Mô tả

Phương thức này lấy tất 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. Nó trả về một Promise mà sẽ giải quyết thành một đối tượng IOrdersByMarkerEntity.

Orders.getAllOrdersByMarker(

marker, langCode, offset, limit

);

Sơ đồ tham số

Sơ đồ

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

Ví dụ

Ví dụ tối thiểu

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

Ví dụ với các thuộc tính

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

Ví dụ phản hồi

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

Sơ đồ phản hồi

Sơ đồ: IOrdersByMarkerEntity

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