GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — PATCH doesn't allow custom data fields · Issue #23 · webflow/webflow-python

PATCH doesn't allow custom data fields #23

New issue
Copy link
New issue
Copy link
Open
Open
PATCH doesn't allow custom data fields#23
Copy link

Description

@vanwars
vanwars
opened on Oct 17, 2024
Issue body actions

Hello, I'm new to the WebFlow python client, but I'm trying to programmatically update a CMS item in a collection, including some custom fields I defined. However, when I issue the following request (as suggested here: https://developers.webflow.com/data/reference/cms/collection-items/items/update-item)...

client.collections.items.update_item(
    collection_id=MY_COLLECTION_ID,
    item_id=MY_ITEM_ID,
    field_data=CollectionItemFieldData(
        custom_field_1="test"
    )
)

...I get the following error:

TypeError: ItemsClient.update_item() got an unexpected keyword argument 'field_data'

I'm using version 1.2.0. Is this a bug, or am I just misunderstanding the documentation?

UPDATE

I did get the CURL version to work, so at least that's a workaround:

curl -X PATCH https://api.webflow.com/v2/collections/MY_COLLECTION_ID/items/MY_ITEM_ID \
     -H "Authorization: Bearer MY_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{
  "fieldData": {
    "custom_field_1": "test"
  }'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.