Create New Collection Item : err”:”ValidationError: ‘fields’ is required”

Hi,

I’m trying to maintain my Webflow CMS through Google Sheets.

The reason is is that I’m importing affiliate product data from an affiliate marketplace’s API into Google Sheets then want to create and continually update those products in the CMS. My plan is to import affiliate product data → write to sheets → post to Webflow CMS → retrieve newly created ID → write to correct Google sheets row so it can be updated later if there’s any changes. I should note that ‘products’ are being stored in CMS because they just link to other site checkouts.

Here’s the log of the data I’m trying to post to Webflow:
fields={
_draft=false,
brand=SSENSE,
gender=women,
featured=false,
slug=by-far-sac-embosse-facon-croco-noir-mini,
Buy=OOPS! The offer you're looking for has expired.,
image=https://res.cloudinary.com/ssenseweb/image/upload/b_white%2Cc_lpad%2Cg_center%2Ch_960%2Cw_960/c_scale%2Ch_680/f_auto%2Cdpr_1.0/v572/201289F046005_1.jpg,
_archived=false,
name=BY FAR Sac embosse facon croco noir Mini, Price=450.0
}

Here’s the error I’m getting:
{“msg”:“Validation Failure”,“code”:400,“name”:“ValidationError”,“path”:“/collections/5e24e3e1992bfadd6331cd93/items”,“err”:“ValidationError: Validation Failure”,“problems”:[“Field ‘Price’: Field not described in schema”,“Field ‘Buy’: Field not described in schema”,“Field ‘image’: Field not described in schema”,“Field ‘brand’: Expected value to be an ItemRef: ‘SSENSE’”],“problem_data”:[{“slug”:“Price”,“msg”:“Field not described in schema”},{“slug”:“Buy”,“msg”:“Field not described in schema”},{“slug”:“image”,“msg”:“Field not described in schema”},{“slug”:“brand”,“msg”:“Expected value to be an ItemRef”,“value”:“‘SSENSE’”}],“extensions”:{“input”:{“collection_id”:{“_bsontype”:“ObjectID”,“id”:{“0”:94,“1”:36,“2”:227,“3”:225,“4”:153,“5”:43,“6”:250,“7”:221,“8”:99,“9”:49,“10”:205,“11”:147}},“item_id”:null,“target”:“staging”,“mode”:“staging”,“need_staging”:true,“need_live”:false,“need_collections”:false,“need_staging_draft”:false,“isPatchMode”:false,“isSilentMode”:false,“skipInvalidFiles”:false},“meta”:{“authType”:“oauth_user”,“userId”:{“_bsontype”:“ObjectID”,“id”:{“0”:94,“1”:19,“2”:202,“3”:112,“4”:119,“5”:92,“6”:73,“7”:24,“8”:3,“9”:24,“10”:194,“11”:167}}}}}

Here’s the log of the collection schema:
{“_id”:“5e24e3e1992bfadd6331cd93”,“lastUpdated”:“2020-04-22T05:14:55.460Z”,“createdOn”:“2020-01-19T23:18:57.134Z”,“name”:“Products”,“slug”:“products”,“singularName”:“Product”,“fields”:[{“name”:“Price”,“slug”:“price”,“type”:“Number”,“required”:false,“editable”:true,“helpText”:“”,“id”:“d090fd001ca2eac75b6b1dc88508cd11”,“validations”:{“format”:“decimal”,“precision”:2,“allowNegative”:false,“minValue”:0,“maxValue”:100000}},{“name”:“Buy”,“slug”:“purchase-link”,“type”:“Link”,“required”:false,“editable”:true,“helpText”:“”,“id”:“4c6f3bfef59084006f3bfa3bcf4acc34”,“validations”:{}},{“name”:“Image”,“slug”:“main-image”,“type”:“ImageRef”,“required”:false,“editable”:true,“helpText”:“”,“id”:“e89df56f4003b2d3b156c3dd7dd660c5”,“validations”:{}},{“name”:“Brand”,“slug”:“brand”,“type”:“ItemRef”,“required”:false,“editable”:true,“helpText”:“”,“id”:“6266f7fe980fae363d0b455eb13f61c1”,“validations”:{“collectionId”:“5e155ed0d6f7918868a45678”}},{“name”:“Gender”,“slug”:“gender”,“type”:“PlainText”,“required”:false,“editable”:true,“helpText”:“”,“id”:“37eb7771bf914f57ce9a37a0fce8f174”,“validations”:{“singleLine”:true}},{“name”:“Featured”,“slug”:“featured”,“type”:“Bool”,“required”:false,“editable”:true,“helpText”:“”,“id”:“8ae20ed887cd36e0caa5bd3fd03a6ba4”,“validations”:{}},{“name”:“Name”,“slug”:“name”,“type”:“PlainText”,“required”:true,“editable”:true,“id”:“01cc8d98a3c899190814528be90a1566”,“validations”:{“maxLength”:256}},{“name”:“Slug”,“slug”:“slug”,“type”:“PlainText”,“required”:true,“editable”:true,“unique”:true,“id”:“873c5a51cc082b75f07e0d59df12b1f2”,“validations”:{“maxLength”:256,“pattern”:{},“messages”:{“pattern”:“Must be alphanumerical and not contain any spaces or special characters”,“maxLength”:“Must be less than 256 characters”}}},{“name”:“Archived”,“slug”:“_archived”,“type”:“Bool”,“required”:true,“editable”:true,“id”:“c5531eedcdaf49f318c2998a5ad8f1ae”,“default”:false},{“name”:“Draft”,“slug”:“_draft”,“type”:“Bool”,“required”:true,“editable”:true,“id”:“a66a92a223112f694ca27183e01409ad”,“default”:false},{“name”:“Created On”,“slug”:“created-on”,“type”:“Date”,“required”:false,“editable”:false,“id”:“4356954c61b791cd509fbae54de84c19”},{“name”:“Updated On”,“slug”:“updated-on”,“type”:“Date”,“required”:false,“editable”:false,“id”:“ea51b36938b62a43fc522d9e5c16e152”},{“name”:“Published On”,“slug”:“published-on”,“type”:“Date”,“required”:false,“editable”:false,“id”:“3c40f056582785c7fdfbf8e0036630ce”},{“name”:“Created By”,“slug”:“created-by”,“type”:“User”,“required”:false,“editable”:false,“id”:“acdcf81ba7c45e1533befee10a73507f”},{“name”:“Updated By”,“slug”:“updated-by”,“type”:“User”,“required”:false,“editable”:false,“id”:“aea89f3a39321068c29fef588b394663”},{“name”:“Published By”,“slug”:“published-by”,“type”:“User”,“required”:false,“editable”:false,“id”:“d01d90806883b221184987dfcec580ff”}]}

I’m thinking it has something to do with an incorrect schema, but I seem to be following the CMS API for creating a new item. Any help would be greatly appreciated!

Have you thought about using Zapier to get it in to Webflow? I’ve had validation errors doing this before using zapier and it was down to a reference field in Webflow and either not providing the right webflow ID to select the reference field (like a category) or just using the name of the reference field instead of the webflow ID.