getICollections
Get collections, one page at a time.
Description
Fetches collections (up to 30 by default; see userQuery) and resolves to an array of ICollectionEntity objects.
.getICollections(
,
);
Parameters schema
Schema
langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"
userQuery: ICollectionsListQuery
Optional query parameters.
example:
{
"limit": 30,
"offset": 0
}
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.
Examples
Minimal example
const result = await IntegrationCollections.getICollections();
Example with userQuery
const userQuery = { limit: 30, offset: 0 };
const result = await IntegrationCollections.getICollections('en_US', userQuery);
Example response
[
{
"id": 1,
"identifier": "test_collection",
"formId": 2,
"localizeInfos": {
"title": "test_collection"
},
"attributeSetId": null,
"selectedAttributeMarkers": null
}
]
Response schema
Schema: ICollectionEntity[]
id: number
Collection ID.
example: 1
identifier: string | null
Marker of the collection.
example: "collection1"
formId: number | null
ID of the form used by the collection.
example: 1234
localizeInfos: ILocalizeInfo
Localized data of the collection.
example:
{
"title": "Customer imports"
}
attributeSetId: number | null
ID of the attribute set used by the collection's form.
example: 1234 or null if not applicable
selectedAttributeMarkers: string | null
Markers of the form attributes shown as columns in the data table.
example: "collection_marker"