Search
Search
addItems
addItems
Add new Items to a Collection.
await collection.addItems([ { slug: "eric", fieldData: { [nameField.id]: { type: "string", value: "Eric" }, [ageField.id]: { type: "number", value: 47 }, } } ]);
Parameters
items: CollectionItemInput[]
– An array of Items to add or update.
Returns
Promise<void>
Caveats
If an
id
is provided and matches an existing Item, that Item will be updated.Items without an
id
are created as new records.slug
should be unique.