Lewati ke konten utama

updateICollectionRow

Edit sebuah catatan dalam koleksi.

Deskripsi

Ini mengembalikan sebuah Promise yang menyelesaikan menjadi objek ICollectionRow.

IntegrationCollections.updateICollectionRow(

marker*, id*, body*, langCode

);

Skema parameter

Skema

marker(diperlukan): string
Pengidentifikasi teks dari koleksi
contoh: "collection1"

id(diperlukan): number
Pengidentifikasi baris dalam koleksi
contoh: 12

body(diperlukan): object
Objek untuk memperbarui catatan dalam koleksi
contoh:

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

langCode: string
Kode bahasa. Default: "en_US"
contoh: "en_US"

Contoh

Contoh minimal


const body = {
"formIdentifier": "collection-form",
"formData": [
{
"marker": "collection_marker",
"type": "string",
"value": "Marker koleksi"
}
]
};

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

Contoh respons

{
"id": 797,
"createdDate": "2026-06-07T14:41:50.718Z",
"updatedDate": "2026-06-07T14:41:51.360Z",
"collectionId": 1,
"langCode": "en_US",
"formData": [
{
"marker": "c_marker",
"type": "string",
"value": "Value updated"
}
],
"entityType": null,
"entityId": null,
"formIdentifier": "collection_form"
}

Skema respons

Skema: ICollectionRow

id: number
Pengidentifikasi objek.
contoh: 1

createdDate: string
Tanggal pembuatan catatan.
contoh: "2023-01-01T00:00:00Z"

updatedDate: string
Tanggal pembaruan terakhir catatan.
contoh: "2023-01-02T00:00:00Z"

collectionId: number | null
collectionId yang terkait dengan baris koleksi.
contoh: "produk", "pesanan", "dll"

formData: ICollectionFormData[]
Array objek data formulir yang terkait dengan baris koleksi.
contoh:

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

formData.marker: string
Pengidentifikasi teks (marker) dari field formulir.
contoh: "collection_marker"

formData.type: string
Tipe dari field formulir, seperti "teks", "angka", "tanggal", "dll".
contoh: "angka"

formData.value: string
Nilai dari field formulir, yang bisa berupa "string", "angka", "tanggal", "dll".
contoh: "Marker koleksi"

entityType: string | null
Tipe entitas yang terkait dengan baris koleksi.
contoh: "produk", "pesanan", "dll"

entityId: number | null
Pengidentifikasi entitas yang terkait dengan baris koleksi.
contoh: 12345

attributeSetIdentifier: string | null
Pengidentifikasi set atribut yang digunakan oleh formulir yang terlampir pada baris koleksi, atau null jika tidak berlaku.
contoh: "attributeSet1" atau null

total: string
Jumlah total.
contoh: "1"