getICollectionById
Get a collection by ID.
Description
Fetches a collection by id and resolves to an ICollectionEntity.
.getICollectionById(
,
);
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"
Examples
Minimal example
const result = await IntegrationCollections.getICollectionById(1);
Example with langCode
const result = await IntegrationCollections.getICollectionById(1, 'en_US');
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"