The cURL "Create Collection Item" is wonky

Hi people

I am using the Webflow “add collection item” API to create new records in my “artworks” collection in Webflow.

my read only link:

https://preview.webflow.com/preview/davids-cool-project-9b22c-945b0baa74739?utm_medium=preview_link&utm_source=designer&utm_content=davids-cool-project-9b22c-945b0baa74739&preview=72b52f491bb66f2552b268bf00e8ac54&workflow=preview

To better understand the Webflow API requirements I used a GET collection item cURL to better understand how Webflow structures the field names and the values with each name. I used sample data to have something to work with.

Webflow has been giving me validation errors when using the cURL “create collection item” that made NO sense saying that my field names were not in the schema. I double checked and they were, but when I used the cURL ‘GET collection item’ SOME of the field names had changed: “-2” appended to some of them. This is way out in left field.

The CMS schema:

Following the path of least resistance I changed the values I input in the create collection item cURL - appending "-2’ to match. Previously I ran into the requirement that data types are important using APIs so I did make adjustments to that too.

Reference Webflow CMS API Reference

I would anticipate the field names in the schema and the API would be the same, ALWAYS!

THEN - after I changed some of the field names adding “-2” I got this error:

image.png

This whole thing is a frigging mess. If I knew how to AVOID the errors (good documentation) I could make adjustments accordingly. But this seems very very inconsistent and unpredictable.

I’d welcome your help in resolving these issues.

Thanks

David Richardson


Here is my public share link: LINK
(how to access public share link)

This could happen if you made changes to the CMS and then did not publish the live site.

The image you posted is broken so we can’t see the error you’ve received.

Double check that you’ve published the live site after changes. Also, I’d recommend moving away from cURL statements on the command line and instead use something like Insomnia: https://insomnia.rest/products/insomnia much less error prone and it saves all of your previous efforts.

Thank you Chris, I will check that out. I am using Xano as my backend but "probably " need to use Webflow as my front end. Webflow does not process subscriptions through their front end and subscriptions will be a substantial part of my business. I’ll be using foxy.io and they work with Webflow.

Along the lines above, I have been using the Webflow cURL GET collection Item and DELETE Collection Item. The DELETE too is wonky. The ONE item I have in the CMS keeps showing up “draft” after publishing. The GET cURL responds appropriately. But then DELETE cURL does nothing except respond that one item was deleted. Except in the CMS it is still looking bal act me! No changes. It still is “staged” even after publishing the CMS AND publishing the site. It’s a F**KING ZOMBIE :star_struck:

I checked out Insomnia and it may generate an API but I still have to use the Webflow protocols:
CMS collection id
the item id
and the Webflow APIKEY

The cURL responds like it’s working with a 200 response but nothing changes in the CMS. Damn frustrating!!!