Missing required key "id" on update collection item
Hello,
If I try to update a collection item using webflow.collections.items.updateItem I got an error. Error: Missing required key "id"
But both the collection id and the item id passed to the function are correct.
await webflow.collections.items.updateItem(this.collection.id, id, {
fieldData: data,
});
Thanks
Hey @Paroca72 - thanks for raising this! We'll take a look at fixing this; in the meantime, if you set the id again in your
{
id: id,
fieldData: data,
}
payload, that should in the short-term hopefully allow the request to go through.
@Paroca72 check out the updated code snippet here https://github.com/webflow/js-webflow-api/blob/2f92f2921cab6171fada1e2899d4f2270e815351/src/api/resources/collections/resources/items/client/Client.ts#L486-L540
Now the id field is only required on the item directly