Streaming live at 10am (PST)

API not accepting fields that can be found in Webflow

I am having this weird issue where the API is returning the following error, even though the fields are in webflow.

"msg": "Validation Failure",
"code": 400,
"name": "ValidationError",
"path": "/collections/5ec30089e5ad983217e86c24/items",
"err": "ValidationError: Validation Failure",
"problems": [
    "Field 'url': Field not described in schema",
    "Field 'longitude': Field not described in schema",
    "Field 'latitude': Field not described in schema"
],
"problem_data": [
    {
        "slug": "url",
        "msg": "Field not described in schema"
    },
    {
        "slug": "longitude",
        "msg": "Field not described in schema"
    },
    {
        "slug": "latitude",
        "msg": "Field not described in schema"
    }
],

The request I’m sending to Webflow:
{
“fields”:{
“name”:“A Place”,
“slug”:“a-place”,
“type”:“house”,
“address-line-1”:“19 Forster Crescent”,
“address-line-2”:"",
“suburb”:“YARRALUMLA”,
“state”:“ACT”,
“postcode”:“2600”,
“country”:“AUSTRALIA”,
“url”:“houses.realestate.com”,
“longitude”:149.117685,
“latitude”:-35.303123,
“_archived”:false,
“_draft”:false
}
}

I’m so stumped as to what to do. I’ve tried deleting them and using string instead of url. I’ve tried republishing them. I’ve tried pulling them on the Get Collection API (they don’t appear).

I might be misunderstanding here, but you can’t ask for specific fields in the query. Just the collection items (which will return all fields anyways).

Edit: Oh wait, you’re trying to post? tried using case sensitive field names?

Yes I’m trying to POST. Tried case sensitive field names. That doesn’t work

Any resolution? Having same issue

The field name that you see in the CMS Editor (in the designer) might not be the actual name of the field. You need to request the schema for that specific collection list and work with the slugs presented in the JSON response

https://developers.webflow.com/#get-collection-with-full-schema

3 Likes

It would be great is we could control the publish date from the API. Otherwise when I update it, it updates the publish date which is weird.

I’m helping a screen recorder CloudApp with their site and they need some major changes done to the blog so I’m trying to use the API to do them but because I’m not setting the Date Published values manually in the web interface it is just resetting the published date. Is there a field that I can hit that isn’t private that would allow me to prevent this issue?