Lewati ke konten utama

createICollectionRow

Buat catatan dalam koleksi.

Deskripsi

Ini mengembalikan sebuah Promise yang menyelesaikan menjadi objek ICollectionRow.

IntegrationCollections.createICollectionRow(

marker*, body*, langCode

);

Skema parameter

Skema

marker(required): string
Pengidentifikasi teks koleksi
contoh: "collection1"

body(required): ICollectionFormObject
Objek untuk membuat catatan
contoh:

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

body.formIdentifier(required): string
Pengidentifikasi teks (marker) dari formulir.
contoh: "collection-form"

body.formData(required): Record<string, ICollectionFormData>
Objek di mana kunci adalah marker field formulir dan nilai adalah array dari objek ICollectionFormData.
contoh:

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

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

Contoh

Contoh minimal


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

const response = await IntegrationCollections.createICollectionRow(body);

Contoh respons

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

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: "product", "order", "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 "text", "number", "date", "dll".
contoh: "number"

formData.value: string
Nilai dari field formulir, yang bisa berupa "string", "number", "date", "dll".
contoh: "Collection marker"

entityType: string | null
Tipe entitas yang terkait dengan baris koleksi.
contoh: "product", "order", "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"