webflow / js-webflow-api

Node.js SDK for the Webflow Data API
https://www.npmjs.com/package/webflow-api
285 stars 92 forks source link

Validation Error: Invalid field type: Boolean #143

Open iksi opened 2 months ago

iksi commented 2 months ago

When attempting to create a boolean field on a collection using

await webflow.collections.fields.create(collection.id, {
    displayName: 'Has children',
    type: 'Boolean',
})

The following error is returned:

{"error":{"statusCode":400,"body":{"message":"Validation Error: Invalid field type: Boolean","code":"validation_error","externalReference":null,"details":[]}}}

When creating a switch field manually, the following is returned where the field type is “Switch”:

 {
    "id": "6259467f67141676b0e7327f1d73446d",
    "isEditable": true,
    "isRequired": false,
    "type": "Switch",
    "slug": "has-children",
    "displayName": "Has children",
    "helpText": null,
    "validations": null
}
zplata commented 1 month ago

Thanks @iksi - we're looking into this!