Skip to main content

updateICollectionRow

Update a row in a collection.

Description​

Updates a row by collection marker and row id, and resolves to the updated ICollectionRow.

formData replaces the row's stored data as a whole. A flat array is saved under langCode only, and values stored under other languages are removed. To keep several languages, send formData keyed by language, for example { "en_US": [...], "fr_FR": [...] }.

.updateICollectionRow(

, , ,

);

Parameters schema​

Schema

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

id(required): number
Row ID in the collection.
example: 12

body(required): object
New row data: the form marker and field values.
example:

{
"formIdentifier": "collection-form",
"formData": [
{
"marker": "collection_marker",
"type": "string",
"value": "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.updateICollectionRow("test_collection", 12, body);

Example response​

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

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"