Nhảy đến nội dung

getICollectionRowsById

Lấy tất cả các bản ghi thuộc về bộ sưu tập theo id 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.getICollectionRowsById(

id, langCode, userQuery

);

Sơ đồ tham số

Sơ đồ

id(bắt buộc): số
Id bộ sưu tập
ví dụ: 1

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

userQuery: bất kỳ
Tham số truy vấn tùy chọn
ví dụ:

{
"limit": 0,
"offset": 30,
"entityType": "orders",
"entityId": 1
}

Ví dụ

Ví dụ tối thiểu

const result = await IntegrationCollections.getICollectionRowsById(1);

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

const userQuery = '';
const result = await IntegrationCollections.getICollectionRowsById(1, 'en_US', userQuery);

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": 213
}

Sơ đồ phản hồi

Sơ đồ: ICollectionRowsResponce

items: ICollectionRow[]
Mảng các đối tượng hàng 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
}
]

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