Chuyển đến nội dung chính

getICollectionRowsByMarker

Lấy tất cả các bản ghi từ bộ sưu tập.

Mô tả

Hàm này trả về một Promise mà khi hoàn thành sẽ trả về một đối tượng ICollectionRowsResponce.

IntegrationCollections.getICollectionRowsByMarker(

marker*, langCode

);

Sơ đồ tham số

Sơ đồ

marker(bắt buộc): string
Định danh văn bản của bộ sưu tập
ví dụ: "collection1"

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

Ví dụ

Ví dụ tối thiểu

const result = await IntegrationCollections.getICollectionRowsByMarker('test_collection');

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

const result = await IntegrationCollections.getICollectionRowsByMarker('test_collection', 'en_US');

Ví dụ phản hồi

{
"items": [
{
"id": 1,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:52.627Z",
"updatedDate": "2025-02-25T07:05:52.627Z",
"formData": [
{
"marker": "naimenovanie_1",
"type": "string",
"value": "Наименование"
}
],
"attributeSetIdentifier": null
},
{
"id": 2,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:53.057Z",
"updatedDate": "2025-02-25T07:05:53.057Z",
"formData": [
{
"marker": "naimenovanie_1",
"type": "string",
"value": "Наименование"
}
],
"attributeSetIdentifier": null
},
{
"id": 3,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:54.003Z",
"updatedDate": "2025-02-25T07:05:54.460Z",
"formData": [
{
"marker": "naimenovanie_1",
"type": "string",
"value": "Наименование 2"
}
],
"attributeSetIdentifier": null
},
"..."
],
"total": 214
}

Sơ đồ phản hồi

Sơ đồ: ICollectionRowsResponce

items: ICollectionRow[]
Mảng các đối tượng hàng trong bộ sưu tập.
ví dụ:

[
{
"id": 1,
"createdDate": "2025-06-06T19:08:54.616Z",
"updatedDate": "2025-06-06T19:08:54.616Z",
"entityId": null,
"entityType": null,
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Value"
}
],
"attributeSetIdentifier": null
}
]

items.id: number
Định danh của đối tượng.
ví dụ: 1

items.createdDate: string
Ngày tạo bản ghi.
ví dụ: "2023-01-01T00:00:00Z"

items.updatedDate: string
Ngày cập nhật cuối cùng của bản ghi.
ví dụ: "2023-01-02T00:00:00Z"

items.collectionId: number | null
collectionId liên kết với hàng trong bộ sưu tập.
ví dụ: "product", "order", "v.v."

items.formData: ICollectionFormData[]
Mảng các đối tượng dữ liệu biểu mẫu liên kết với hàng trong bộ sưu tập.
ví dụ:

[
{
"marker": "name_1",
"type": "string",
"value": "Value"
}
]

items.entityType: string | null
Loại thực thể liên kết với hàng trong bộ sưu tập.
ví dụ: "product", "order", "v.v."

items.entityId: number | null
Định danh của thực thể liên kết với hàng trong bộ sưu tập.
ví dụ: 12345

items.attributeSetIdentifier: string | null
Định danh của bộ thuộc tính được sử dụng bởi biểu mẫu gắn với hàng trong bộ sưu tập, hoặc null nếu không áp dụng.
ví dụ: "attributeSet1" hoặc null

items.total: string
Tổng số lượng.
ví dụ: "1"

total: number
Tổng số bản ghi tìm thấy.
ví dụ: 10