getICollectionRowsById
Get the rows of a collection by collection ID, one page at a time.
Description
Fetches the rows of the collection with the given id. Resolves to an ICollectionRowsResponce: the rows are in items, and total holds the number of rows in the whole collection. Returns up to userQuery.limit rows (30 by default); use offset to page through the rest.
.getICollectionRowsById(
,
,
);
Parameters schema
Schema
id(required): number
Collection ID.
example: 1
langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"
userQuery: ICollectionQuery
Optional query parameters.
example:
{
"limit": 30,
"offset": 0,
"entityType": "orders",
"entityId": 1
}
userQuery.limit: number
Maximum number of records to return. Default: 30.
userQuery.offset: number
Number of records to skip. Default: 0. offset + limit must not exceed 200; a larger window is rejected with 400.
userQuery.entityType: string
Type of the linked entity. Filters rows only when entityId is also set; on its own it is ignored.
example: "orders"
userQuery.entityId: number
ID of the linked entity. Filters rows only when entityType is also set; on its own it is ignored.
example: 1
Examples
Minimal example
const result = await IntegrationCollections.getICollectionRowsById(1);
Example with userQuery
const userQuery = { limit: 30, offset: 0 };
const result = await IntegrationCollections.getICollectionRowsById(1, 'en_US', userQuery);
Example response
{
"items": [
{
"id": 1,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:52.627Z",
"updatedDate": "2026-10-27T09:01:53.242Z",
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Item name"
}
],
"attributeSetIdentifier": null
},
{
"id": 2,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:53.057Z",
"updatedDate": "2026-10-27T09:02:08.429Z",
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Item name"
}
],
"attributeSetIdentifier": null
},
{
"id": 3,
"entityId": null,
"entityType": null,
"createdDate": "2025-02-25T07:05:54.003Z",
"updatedDate": "2026-10-27T09:02:09.104Z",
"formData": [
{
"marker": "name_1",
"type": "string",
"value": "Item name 2"
}
],
"attributeSetIdentifier": null
}
],
"total": 214
}
Response schema
Schema: ICollectionRowsResponce
items: ICollectionRow[]
Rows of the collection.
example:
[
{
"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
Row ID.
example: 1
items.createdDate: string
Creation date of the record.
example: "2023-01-01T00:00:00Z"
items.updatedDate: string
Date the record was last updated.
example: "2023-01-02T00:00:00Z"
items.collectionId: number | null
ID of the collection the row belongs to.
example: 1
items.formData: ICollectionFormData[]
Form fields of the collection row.
example:
[
{
"marker": "name_1",
"type": "string",
"value": "Value"
}
]
items.entityType: string | null
Type of the entity the collection row is linked to.
example: "product"
items.entityId: number | null
ID of the entity the collection row is linked to.
example: 12345
items.attributeSetIdentifier: string | null
Marker of the attribute set used by the form attached to the collection row, or null if there is none.
example: "attributeSet1" or null
items.langCode: string | null
Language code the row was stored under.
example: "en_US"
items.formIdentifier: string | null
Marker of the form sent in body.formIdentifier. Returned only by updateICollectionRow.
example: "collection_form"
items.total: string
Internal count returned only by getICollectionRowByMarkerAndId; always "1". Don't rely on it.
example: "1"
total: number
Total number of found records.
example: 10