Skip to main content

createICollectionRow

Create a row in a collection.

Description​

Creates a row in the collection with the given marker and resolves to the new ICollectionRow.

.createICollectionRow(

, ,

);

Parameters schema​

Schema

marker(required): string
Marker of the collection.
example: "collection1"

body(required): ICollectionFormObject
Row data: the form marker and field values.
example:

{
"formIdentifier": "collection-form",
"formData": [
{
"marker": "collection_marker",
"type": "string",
"value": "Collection marker"
}
]
}

body.formIdentifier(required): string
Marker of the form.
example: "collection-form"

body.formData(required): ICollectionFormData[] | Record<string, ICollectionFormData[]>
Field values: a flat array [{ marker, type, value }] (as in the example), or the same array wrapped in a language code — { "en_US": [...] }. The platform stores both; the SDK sends the value as is.
example:

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

formData.marker(required): string
Text identifier (marker) of the form field.
example: "collection_marker"

formData.type(required): string
Attribute type of the form field, for example string, integer or date.
example: "number"

formData.value(required): string
Value of the form field.
example: "Collection marker"

langCode: string
Language code. Default: the langCode passed to defineOneEntry ("en_US" if none).
example: "en_US"

Examples​

Minimal example​


const body = {
,
{
,
,
}
]
};

const response = await IntegrationCollections.createICollectionRow('test_collection', body);

Example response​

{
"formData": [
{
"marker": "c_marker",
"type": "string",
"value": "Value"
}
],
"collectionId": 1,
"langCode": "en_US",
"createdDate": "2026-10-27T09:15:04.121Z",
"updatedDate": "2026-10-27T09:15:04.121Z",
"entityType": null,
"entityId": null,
"id": 929
}

Response schema​

Schema: ICollectionRow

id: number
Row ID.
example: 1

createdDate: string
Creation date of the record.
example: "2023-01-01T00:00:00Z"

updatedDate: string
Date the record was last updated.
example: "2023-01-02T00:00:00Z"

collectionId: number | null
ID of the collection the row belongs to.
example: 1

formData: ICollectionFormData[]
Form fields of the collection row.
example:

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

formData.marker: string
Text identifier (marker) of the form field.
example: "collection_marker"

formData.type: string
Attribute type of the form field, for example string, integer or date.
example: "number"

formData.value: string
Value of the form field.
example: "Collection marker"

entityType: string | null
Type of the entity the collection row is linked to.
example: "product"

entityId: number | null
ID of the entity the collection row is linked to.
example: 12345

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

langCode: string | null
Language code the row was stored under.
example: "en_US"

formIdentifier: string | null
Marker of the form sent in body.formIdentifier. Returned only by updateICollectionRow.
example: "collection_form"

total: string
Internal count returned only by getICollectionRowByMarkerAndId; always "1". Don't rely on it.
example: "1"