@Thomas_Chiroux, @Mike929 & @Bailey_Simrell - It actually is a PUT request that you need to do with the live = true param with ONLY the base required fields that the system assigns to the collection:
In my case (standard CMS collection), that would mean: name, slug, _draft & _archived. Here is the js if that helps:
const options = {
url: `https://api.webflow.com/collections/${bundle.inputData.collection_id}/items/${bundle.inputData.item_id}`,
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': `Bearer ${bundle.authData.access_token}`,
'Accept-Version': '1.0.0'
},
params: {
'live': true
},
body: {
'fields': {
'name': `${bundle.inputData.item_name}`,
'slug': `${bundle.inputData.item_slug}`,
'_draft': false,
'_archived': false
}
}
}
return z.request(options)
.then((response) => {
response.throwForStatus();
const results = response.json;
return results;
});
If you’re building something like this in Zapier or integromat, you’ll need to pass of that info in so you either need to build dynamic inputs that do calls in the background OR do a leading call to just pull the item’s info (much easier). PUT + base config (fields) + live=true is what the API interprets as a base change rather than a content change (my phrase, not webflow’s - but I think you get what I mean).
Hopefully that helps you on your quest! I don’t have an ecomm site and I know that ecomm collections are a little different, but there should be some analog if it isn’t exactly this. Cheers.
-Bry