Skip to content

Latest commit

 

History

History
7234 lines (5002 loc) · 98.7 KB

reference.md

File metadata and controls

7234 lines (5002 loc) · 98.7 KB

Reference

Token

client.token.authorized_by()

📝 Description

Information about the Authorized User

Required Scope | authorized_user:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.token.authorized_by()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.token.introspect()

📝 Description

Information about the authorization token

Access to this endpoint requires a bearer token from a Data Client App.

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.token.introspect()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Sites

client.sites.list()

📝 Description

List of all sites the provided access token is able to access.

Required scope | sites:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sites.get(...)

📝 Description

Get a site by site id

Required scope | sites:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.get(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sites.get_custom_domain(...)

📝 Description

Get a list of all custom domains related to site.

Required scope | sites:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.get_custom_domain(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sites.publish(...)

📝 Description

Publish a site to one more more domains.

Required scope | sites:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.publish(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

custom_domains: typing.Optional[typing.Sequence[str]] — Array of Custom Domain ids to publish

publish_to_webflow_subdomain: typing.Optional[bool] — Choice of whether to publish to the default Webflow Subdomain

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Sites ActivityLogs

client.sites.activity_logs.list(...)

📝 Description

Retrieve Activity Logs for a specific Site. Requires Site to be on an Enterprise plan.

Required scope | site_activity:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.activity_logs.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Collections

client.collections.list(...)

📝 Description

List of all Collections within a Site.

Required scope | cms:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.create(...)

📝 Description

Create a Collection for a site.

Required scope | cms:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.create(
    site_id="site_id",
    display_name="Blog Posts",
    singular_name="Blog Post",
    slug="posts",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

display_name: str — Name of the collection. Each collection name must be distinct.

singular_name: str — Singular name of each item.

slug: typing.Optional[str] — Part of a URL that identifier

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.get(...)

📝 Description

Get the full details of a collection from its ID.

Required scope | cms:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.get(
    collection_id="collection_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.delete_collection(...)

📝 Description

Delete a collection using its ID.

Required scope | cms:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.delete_collection(
    collection_id="collection_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.delete(...)

📝 Description

Delete a custom field in a collection. This endpoint does not currently support bulk deletion.

Required scope | cms:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.delete(
    collection_id="collection_id",
    field_id="field_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

field_id: str — Unique identifier for a Field in a collection

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Collections Fields

client.collections.fields.create(...)

📝 Description

Create a custom field in a collection.

Slugs must be all lowercase letters without spaces. If you pass a string with uppercase letters and/or spaces to the "Slug" property, Webflow will convert the slug to lowercase and replace spaces with "-."

Only some field types can be created through the API. This endpoint does not currently support bulk creation.

Required scope | cms:write

🔌 Usage

from webflow.client import Webflow
from webflow.resources.collections import FieldCreateType

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.fields.create(
    collection_id="collection_id",
    is_required=False,
    type=FieldCreateType.RICH_TEXT,
    display_name="Post Body",
    help_text="Add the body of your post here",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

type: FieldCreateType — Choose these appropriate field type for your collection data

display_name: str — The name of a field

is_required: typing.Optional[bool] — define whether a field is required in a collection

help_text: typing.Optional[str] — Additional text to help anyone filling out this field

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.fields.update(...)

📝 Description

Update a custom field in a collection.

Required scope | cms:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.fields.update(
    collection_id="collection_id",
    field_id="field_id",
    is_required=False,
    display_name="Post Body",
    help_text="Add the body of your post here",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

field_id: str — Unique identifier for a Field in a collection

is_required: typing.Optional[bool] — Define whether a field is required in a collection

display_name: typing.Optional[str] — The name of a field

help_text: typing.Optional[str] — Additional text to help anyone filling out this field

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Collections Items

client.collections.items.list_items(...)

📝 Description

List of all Items within a Collection.

Required scope | CMS:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.list_items(
    collection_id="collection_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

cms_locale_id: typing.Optional[str] — Unique identifier for a CMS Locale. This UID is different from the Site locale identifier and is listed as cmsLocaleId in the Sites response. To query multiple locales, input a comma separated string.

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

name: typing.Optional[str] — The name of the item(s)

slug: typing.Optional[str] — The slug of the item

sort_by: typing.Optional[ItemsListItemsRequestSortBy] — Sort results by the provided value

sort_order: typing.Optional[ItemsListItemsRequestSortOrder] — Sorts the results by asc or desc

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.create_item(...)

📝 Description

Create Item in a Collection.

To create items across multiple locales, please use this endpoint.

Required scope | CMS:write

🔌 Usage

from webflow import CollectionItemFieldData
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.create_item(
    collection_id="collection_id",
    id="42b720ef280c7a7a3be8cabe",
    cms_locale_id="653ad57de882f528b32e810e",
    last_published="2022-11-29T16:22:43.159Z",
    last_updated="2022-11-17T17:19:43.282Z",
    created_on="2022-11-17T17:11:57.148Z",
    is_archived=False,
    is_draft=False,
    field_data=CollectionItemFieldData(
        name="Pan Galactic Gargle Blaster Recipe",
        slug="pan-galactic-gargle-blaster",
    ),
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

id: str — Unique identifier for the Item

cms_locale_id: typing.Optional[str] — Identifier for the locale of the CMS item

last_published: typing.Optional[str] — The date the item was last published

last_updated: typing.Optional[str] — The date the item was last updated

created_on: typing.Optional[str] — The date the item was created

is_archived: typing.Optional[bool] — Boolean determining if the Item is set to archived

is_draft: typing.Optional[bool] — Boolean determining if the Item is set to draft

field_data: typing.Optional[CollectionItemFieldData]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.list_items_live(...)

📝 Description

List of all live Items within a Collection.

Required scope | CMS:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.list_items_live(
    collection_id="collection_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

cms_locale_id: typing.Optional[str] — Unique identifier for a CMS Locale. This UID is different from the Site locale identifier and is listed as cmsLocaleId in the Sites response. To query multiple locales, input a comma separated string.

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

name: typing.Optional[str] — The name of the item(s)

slug: typing.Optional[str] — The slug of the item

sort_by: typing.Optional[ItemsListItemsLiveRequestSortBy] — Sort results by the provided value

sort_order: typing.Optional[ItemsListItemsLiveRequestSortOrder] — Sorts the results by asc or desc

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.create_item_live(...)

📝 Description

Create live Item in a Collection. This Item will be published to the live site.

To create items across multiple locales, please use this endpoint.

Required scope | CMS:write

🔌 Usage

from webflow import CollectionItemFieldData
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.create_item_live(
    collection_id="collection_id",
    id="42b720ef280c7a7a3be8cabe",
    cms_locale_id="653ad57de882f528b32e810e",
    last_published="2022-11-29T16:22:43.159Z",
    last_updated="2022-11-17T17:19:43.282Z",
    created_on="2022-11-17T17:11:57.148Z",
    is_archived=False,
    is_draft=False,
    field_data=CollectionItemFieldData(
        name="Pan Galactic Gargle Blaster Recipe",
        slug="pan-galactic-gargle-blaster",
    ),
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

id: str — Unique identifier for the Item

cms_locale_id: typing.Optional[str] — Identifier for the locale of the CMS item

last_published: typing.Optional[str] — The date the item was last published

last_updated: typing.Optional[str] — The date the item was last updated

created_on: typing.Optional[str] — The date the item was created

is_archived: typing.Optional[bool] — Boolean determining if the Item is set to archived

is_draft: typing.Optional[bool] — Boolean determining if the Item is set to draft

field_data: typing.Optional[CollectionItemFieldData]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.create_item_for_multiple_locales(...)

📝 Description

Create single Item in a Collection with multiple corresponding locales.

Required scope | CMS:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.create_item_for_multiple_locales(
    collection_id="collection_id",
    id="580e64008c9a982ac9b8b754",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

id: str — Unique identifier for the Item

cms_locale_ids: typing.Optional[typing.Sequence[str]] — Array of identifiers for the locales where the item will be created

last_published: typing.Optional[str] — The date the item was last published

last_updated: typing.Optional[str] — The date the item was last updated

created_on: typing.Optional[str] — The date the item was created

is_archived: typing.Optional[bool] — Boolean determining if the Item is set to archived

is_draft: typing.Optional[bool] — Boolean determining if the Item is set to draft

field_data: typing.Optional[BulkCollectionItemFieldData]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.get_item(...)

📝 Description

Get details of a selected Collection Item.

Required scope | CMS:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.get_item(
    collection_id="collection_id",
    item_id="item_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

cms_locale_id: typing.Optional[str] — Unique identifier for a CMS Locale. This UID is different from the Site locale identifier and is listed as cmsLocaleId in the Sites response. To query multiple locales, input a comma separated string.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.delete_item(...)

📝 Description

Delete an Item from a Collection. This endpoint does not currently support bulk deletion.

Required scope | CMS:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.delete_item(
    collection_id="collection_id",
    item_id="item_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

cms_locale_id: typing.Optional[str] — Unique identifier for a CMS Locale. This UID is different from the Site locale identifier and is listed as cmsLocaleId in the Sites response. To query multiple locales, input a comma separated string.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.update_item(...)

📝 Description

Update a selected Item in a Collection.

Required scope | CMS:write

🔌 Usage

from webflow import CollectionItemFieldData
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.update_item(
    collection_id="collection_id",
    item_id="item_id",
    id="42b720ef280c7a7a3be8cabe",
    cms_locale_id="653ad57de882f528b32e810e",
    last_published="2022-11-29T16:22:43.159Z",
    last_updated="2022-11-17T17:19:43.282Z",
    created_on="2022-11-17T17:11:57.148Z",
    is_archived=False,
    is_draft=False,
    field_data=CollectionItemFieldData(
        name="Pan Galactic Gargle Blaster Recipe",
        slug="pan-galactic-gargle-blaster",
    ),
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

id: str — Unique identifier for the Item

cms_locale_id: typing.Optional[str] — Identifier for the locale of the CMS item

last_published: typing.Optional[str] — The date the item was last published

last_updated: typing.Optional[str] — The date the item was last updated

created_on: typing.Optional[str] — The date the item was created

is_archived: typing.Optional[bool] — Boolean determining if the Item is set to archived

is_draft: typing.Optional[bool] — Boolean determining if the Item is set to draft

field_data: typing.Optional[CollectionItemFieldData]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.get_item_live(...)

📝 Description

Get details of a selected Collection live Item.

Required scope | CMS:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.get_item_live(
    collection_id="collection_id",
    item_id="item_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

cms_locale_id: typing.Optional[str] — Unique identifier for a CMS Locale. This UID is different from the Site locale identifier and is listed as cmsLocaleId in the Sites response. To query multiple locales, input a comma separated string.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.delete_item_live(...)

📝 Description

Remove a live item from the site. Removing a published item will unpublish the item from the live site and set it to draft. This endpoint does not currently support bulk deletion.

Required scope | CMS:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.delete_item_live(
    collection_id="collection_id",
    item_id="item_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

cms_locale_id: typing.Optional[str] — Unique identifier for a CMS Locale. This UID is different from the Site locale identifier and is listed as cmsLocaleId in the Sites response. To query multiple locales, input a comma separated string.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.update_item_live(...)

📝 Description

Update a selected live Item in a Collection. The updates for this Item will be published to the live site.

Required scope | CMS:write

🔌 Usage

from webflow import CollectionItemFieldData
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.update_item_live(
    collection_id="collection_id",
    item_id="item_id",
    id="42b720ef280c7a7a3be8cabe",
    cms_locale_id="653ad57de882f528b32e810e",
    last_published="2022-11-29T16:22:43.159Z",
    last_updated="2022-11-17T17:19:43.282Z",
    created_on="2022-11-17T17:11:57.148Z",
    is_archived=False,
    is_draft=False,
    field_data=CollectionItemFieldData(
        name="Pan Galactic Gargle Blaster Recipe",
        slug="pan-galactic-gargle-blaster",
    ),
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

id: str — Unique identifier for the Item

cms_locale_id: typing.Optional[str] — Identifier for the locale of the CMS item

last_published: typing.Optional[str] — The date the item was last published

last_updated: typing.Optional[str] — The date the item was last updated

created_on: typing.Optional[str] — The date the item was created

is_archived: typing.Optional[bool] — Boolean determining if the Item is set to archived

is_draft: typing.Optional[bool] — Boolean determining if the Item is set to draft

field_data: typing.Optional[CollectionItemFieldData]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.collections.items.publish_item(...)

📝 Description

Publish an item or multiple items.

Required scope | cms:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.collections.items.publish_item(
    collection_id="collection_id",
    item_ids=["itemIds"],
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_ids: typing.Sequence[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Pages

client.pages.list(...)

📝 Description

List of all pages for a site

Required scope | pages:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

locale: typing.Optional[str] — Unique identifier for a specific locale. Applicable, when using localization.

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.pages.get_metadata(...)

📝 Description

Get metadata information for a single page

Required scope | pages:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.get_metadata(
    page_id="page_id",
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

locale: typing.Optional[str] — Unique identifier for a specific locale. Applicable, when using localization.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.pages.update_page_settings(...)

📝 Description

Update Page-level metadata, including SEO and Open Graph fields.

Required scope | pages:write

🔌 Usage

import datetime

from webflow import PageOpenGraph, PageSeo
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.update_page_settings(
    page_id="page_id",
    id="6596da6045e56dee495bcbba",
    site_id="6258612d1ee792848f805dcf",
    title="Guide to the Galaxy",
    slug="guide-to-the-galaxy",
    parent_id="6419db964a9c435aa3af6251",
    collection_id="6390c49774a71f12831a08e3",
    created_on=datetime.datetime.fromisoformat(
        "2024-03-11 10:42:00+00:00",
    ),
    last_updated=datetime.datetime.fromisoformat(
        "2024-03-11 10:42:42+00:00",
    ),
    archived=False,
    draft=False,
    can_branch=True,
    seo=PageSeo(
        title="The Ultimate Hitchhiker's Guide to the Galaxy",
        description="Everything you need to know about the galaxy, from avoiding Vogon poetry to the importance of towels.",
    ),
    open_graph=PageOpenGraph(
        title="Explore the Cosmos with The Ultimate Guide",
        title_copied=False,
        description="Dive deep into the mysteries of the universe with your guide to everything galactic.",
        description_copied=False,
    ),
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

locale: typing.Optional[str] — Unique identifier for a specific locale. Applicable, when using localization.

id: typing.Optional[str] — Unique identifier for the Page

site_id: typing.Optional[str] — Unique identifier for the Site

title: typing.Optional[str] — Title of the Page

slug: typing.Optional[str] — slug of the Page (derived from title)

parent_id: typing.Optional[str] — Identifier of the parent folder

collection_id: typing.Optional[str] — Unique identifier for a linked Collection, value will be null if the Page is not part of a Collection.

created_on: typing.Optional[dt.datetime] — The date the Page was created

last_updated: typing.Optional[dt.datetime] — The date the Page was most recently updated

archived: typing.Optional[bool] — Whether the Page has been archived

draft: typing.Optional[bool] — Whether the Page is a draft

can_branch: typing.Optional[bool] — Indicates whether the Page supports Page Branching

is_members_only: typing.Optional[bool] — Indicates whether the Page is restricted by Memberships Controls

seo: typing.Optional[PageSeo] — SEO-related fields for the Page

open_graph: typing.Optional[PageOpenGraph] — Open Graph fields for the Page

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.pages.get_content(...)

📝 Description

Get static content from a static page.
If you do not provide a Locale ID in your request, the response will return any content that can be localized from the Primary locale

Required scope | pages:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.get_content(
    page_id="page_id",
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

locale: typing.Optional[str] — Unique identifier for a specific locale. Applicable, when using localization.

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.pages.update_static_content(...)

📝 Description

Update static content on a static page. This endpoint supports sending 1000 nodes per request.

Required scope | pages:write

🔌 Usage

from webflow import DomWriteNodesItem
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.update_static_content(
    page_id="page_id",
    locale="locale",
    nodes=[
        DomWriteNodesItem(
            node_id="a245c12d-995b-55ee-5ec7-aa36a6cad623",
            text="<h1>The Hitchhiker's Guide to the Galaxy</h1>",
        ),
        DomWriteNodesItem(
            node_id="a245c12d-995b-55ee-5ec7-aa36a6cad627",
            text="<div><h3>Don't Panic!</h3><p>Always know where your towel is.</p></div>",
        ),
        DomWriteNodesItem(
            node_id="a245c12d-995b-55ee-5ec7-aa36a6cad629",
            text="<img alt='Marvin, the Paranoid Android' src='path/to/image/with/assetId/659595234426a9fcbad57043'/>",
        ),
    ],
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

locale: str — The locale identifier.

nodes: typing.Sequence[DomWriteNodesItem]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Pages Scripts

client.pages.scripts.get_custom_code(...)

📝 Description

Get all registered scripts that have been applied to a specific Page.

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.scripts.get_custom_code(
    page_id="page_id",
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.pages.scripts.upsert_custom_code(...)

📝 Description

Add a registered script to a Page.

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:write

🔌 Usage

from webflow import ScriptApply, ScriptApplyLocation
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.scripts.upsert_custom_code(
    page_id="page_id",
    scripts=[
        ScriptApply(
            id="cms_slider",
            location=ScriptApplyLocation.HEADER,
            version="1.0.0",
            attributes={"my-attribute": "some-value"},
        ),
        ScriptApply(
            id="alert",
            location=ScriptApplyLocation.HEADER,
            version="0.0.1",
        ),
    ],
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

scripts: typing.Optional[typing.Sequence[ScriptApply]] — A list of scripts applied to a Site or a Page

last_updated: typing.Optional[str] — Date when the Site's scripts were last updated

created_on: typing.Optional[str] — Date when the Site's scripts were created

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.pages.scripts.delete_custom_code(...)

📝 Description

Delete the custom code block that an app has created for a page

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.pages.scripts.delete_custom_code(
    page_id="page_id",
)

⚙️ Parameters

page_id: str — Unique identifier for a Page

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Sites Scripts

client.sites.scripts.get_custom_code(...)

📝 Description

Get all registered scripts that have been applied to a specific Site.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.scripts.get_custom_code(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sites.scripts.upsert_custom_code(...)

📝 Description

Add a registered script to a Site.

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:write

🔌 Usage

from webflow import ScriptApply, ScriptApplyLocation
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.scripts.upsert_custom_code(
    site_id="site_id",
    scripts=[
        ScriptApply(
            id="cms_slider",
            location=ScriptApplyLocation.HEADER,
            version="1.0.0",
            attributes={"my-attribute": "some-value"},
        ),
        ScriptApply(
            id="alert",
            location=ScriptApplyLocation.HEADER,
            version="0.0.1",
        ),
    ],
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

scripts: typing.Optional[typing.Sequence[ScriptApply]] — A list of scripts applied to a Site or a Page

last_updated: typing.Optional[str] — Date when the Site's scripts were last updated

created_on: typing.Optional[str] — Date when the Site's scripts were created

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sites.scripts.delete_custom_code(...)

📝 Description

Delete the custom code block that an app created for a Site

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.scripts.delete_custom_code(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.sites.scripts.list_custom_code_blocks(...)

📝 Description

Get all instances of Custom Code applied to a Site or Pages.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.sites.scripts.list_custom_code_blocks(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Scripts

client.scripts.list(...)

📝 Description

List of scripts registered to a Site.

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.scripts.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.scripts.register_hosted(...)

📝 Description

Add a script to a Site's Custom Code registry.

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints. Additionally, Scripts can be remotely hosted, or registered as inline snippets.

Access to this endpoint requires a bearer token from a Data Client App.


Required scope | custom_code:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.scripts.register_hosted(
    site_id="site_id",
    hosted_location="hostedLocation",
    integrity_hash="integrityHash",
    version="version",
    display_name="displayName",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

hosted_location: str — URI for an externally hosted script location

integrity_hash: str — Sub-Resource Integrity Hash

version: str — A Semantic Version (SemVer) string, denoting the version of the script

display_name: str — User-facing name for the script. Must be between 1 and 50 alphanumeric characters

can_copy: typing.Optional[bool] — Define whether the script can be copied on site duplication and transfer

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.scripts.register_inline(...)

📝 Description

Add a script to a Site's Custom Code registry. Inline scripts can be between 1 and 2000 characters.

In order to use the Custom Code APIs for Sites and Pages, Custom Code Scripts must first be registered to a Site via the registered_scripts endpoints, and then applied to a Site or Page using the appropriate custom_code endpoints.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | custom_code:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.scripts.register_inline(
    site_id="site_id",
    source_code="alert('hello world');",
    version="0.0.1",
    display_name="Alert",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

source_code: str — The code to be added to the site (to be hosted by Webflow).

version: str — A Semantic Version (SemVer) string, denoting the version of the script

display_name: str — User-facing name for the script. Must be between 1 and 50 alphanumeric characters

integrity_hash: typing.Optional[str] — Sub-Resource Integrity Hash. Only required for externally hosted scripts (passed via hostedLocation)

can_copy: typing.Optional[bool] — Define whether the script can be copied on site duplication and transfer

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Assets

client.assets.list(...)

📝 Description

List assets for a given site

Required scope | assets:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.create(...)

📝 Description

Create a new asset entry.

This endpoint generates a response with the following information: uploadUrl and uploadDetails. You can use these two properties to upload the file to Amazon s3 by making a POST request to the uploadUrl with the uploadDetails object as your header information in the request.

Required scope | assets:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.create(
    site_id="site_id",
    file_name="file.png",
    file_hash="3c7d87c9575702bc3b1e991f4d3c638e",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

file_name: str — file name including file extension

file_hash: str — MD5 hash of the file

parent_folder: typing.Optional[str] — id of the Asset folder (optional)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.get(...)

📝 Description

Get an Asset

Required scope | assets:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.get(
    asset_id="asset_id",
)

⚙️ Parameters

asset_id: str — Unique identifier for an Asset on a site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.delete(...)

📝 Description

Delete an Asset

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.delete(
    asset_id="asset_id",
)

⚙️ Parameters

asset_id: str — Unique identifier for an Asset on a site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.update(...)

📝 Description

Update an Asset

Required scope | assets:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.update(
    asset_id="asset_id",
    display_name="bulldoze.png",
)

⚙️ Parameters

asset_id: str — Unique identifier for an Asset on a site

display_name: str — file name including file extension

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.list_folders(...)

📝 Description

List Asset Folders within a given site

Required scope | assets:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.list_folders(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.create_folder(...)

📝 Description

Create an Asset Folder within a given site

Required scope | assets:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.create_folder(
    site_id="site_id",
    display_name="my asset folder",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

display_name: str — A human readable name for the Asset Folder

parent_folder: typing.Optional[str] — An (optional) pointer to a parent Asset Folder (or null for root)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.assets.get_folder(...)

📝 Description

Get details about a specific Asset Folder

Required scope | assets:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.assets.get_folder(
    asset_folder_id="asset_folder_id",
)

⚙️ Parameters

asset_folder_id: str — Unique identifier for an Asset Folder

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Webhooks

client.webhooks.list(...)

📝 Description

List all App-created Webhooks registered for a given site

Required scope | sites:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.webhooks.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.create(...)

📝 Description

Create a new Webhook, to be notified when Webflow resources change. Limit of 75 registrations per triggerType, per site.

Access to this endpoint requires a bearer token from a Data Client App.
Required scope | sites:write

🔌 Usage

from webflow import TriggerType
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.webhooks.create(
    site_id="site_id",
    trigger_type=TriggerType.FORM_SUBMISSION,
    url="https://api.mydomain.com/webhook",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

trigger_type: TriggerType

url: str — The server URI that Webflow will call when your Webhook is triggered

filter: typing.Optional[typing.Dict[str, typing.Any]]

Filter for selecting which events you want Webhooks to be triggered for. ** Only available for form_submission trigger types. **

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.get(...)

📝 Description

Get a specific Webhook instance

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.webhooks.get(
    webhook_id="webhook_id",
)

⚙️ Parameters

webhook_id: str — Unique identifier for a Webhook

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.webhooks.delete(...)

📝 Description

Remove a Webhook

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.webhooks.delete(
    webhook_id="webhook_id",
)

⚙️ Parameters

webhook_id: str — Unique identifier for a Webhook

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Forms

client.forms.list(...)

📝 Description

List forms for a given site

Required scope | forms:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.forms.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.forms.get(...)

📝 Description

Get information about a given form

Required scope | forms:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.forms.get(
    form_id="form_id",
)

⚙️ Parameters

form_id: str — Unique identifier for a Form

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.forms.list_submissions(...)

📝 Description

List form submissions for a given form

Required scope | forms:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.forms.list_submissions(
    form_id="form_id",
)

⚙️ Parameters

form_id: str — Unique identifier for a Form

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.forms.get_submission(...)

📝 Description

Get information about a given form submission

Required scope | forms:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.forms.get_submission(
    form_submission_id="form_submission_id",
)

⚙️ Parameters

form_submission_id: str — Unique identifier for a Form Submission

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.forms.update_submission(...)

📝 Description

Update hidden fields on a form submission

Required scope | forms:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.forms.update_submission(
    form_submission_id="form_submission_id",
)

⚙️ Parameters

form_submission_id: str — Unique identifier for a Form Submission

form_submission_data: typing.Optional[typing.Dict[str, typing.Any]] — An existing hidden field defined on the form schema, and the corresponding value to set

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Users

client.users.list(...)

📝 Description

Get a list of users for a site

Required scope | users:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.users.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

sort: typing.Optional[UsersListRequestSort]

Sort string to use when ordering users

Example(CreatedOn, Email, Status, LastLogin, UpdatedOn).

Can be prefixed with a - to reverse the sort (ex. -CreatedOn)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.get(...)

📝 Description

Get a User by ID

Required scope | users:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.users.get(
    site_id="site_id",
    user_id="user_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

user_id: str — Unique identifier for a User

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.delete(...)

📝 Description

Delete a User by ID

Required scope | users:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.users.delete(
    site_id="site_id",
    user_id="user_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

user_id: str — Unique identifier for a User

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.update(...)

📝 Description

Update a User by ID

Required scope | users:write

The email and password fields cannot be updated using this endpoint

🔌 Usage

from webflow import UsersUpdateRequestData
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.users.update(
    site_id="site_id",
    user_id="user_id",
    data=UsersUpdateRequestData(
        name="Some One",
        accept_privacy=False,
        accept_communications=False,
    ),
    access_groups=["webflowers", "platinum", "free-tier"],
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

user_id: str — Unique identifier for a User

data: typing.Optional[UsersUpdateRequestData]

access_groups: typing.Optional[typing.Sequence[str]] — An array of access group slugs. Access groups are assigned to the user as type admin and the user remains in the group until removed.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.users.invite(...)

📝 Description

Create and invite a user with an email address. The user will be sent and invite via email, which they will need to accept in order to join paid Access Groups.

Required scope | users:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.users.invite(
    site_id="site_id",
    email="[email protected]",
    access_groups=["webflowers"],
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

email: str — Email address of user to send invite to

access_groups: typing.Optional[typing.Sequence[str]] — An array of access group slugs. Access groups are assigned to the user as type admin and the user remains in the group until removed.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

AccessGroups

client.access_groups.list(...)

📝 Description

Get a list of access groups for a site

Required scope | users:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.access_groups.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

sort: typing.Optional[AccessGroupsListRequestSort]

Sort string to use when ordering access groups Can be prefixed with a - to reverse the sort (ex. -CreatedOn)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Products

client.products.list(...)

📝 Description

Retrieve all products for a site. Use limit and offset to page through all products with subsequent requests. All SKUs for each product will also be fetched and returned. The limit, offset and total values represent Products only and do not include any SKUs.

Required scope | ecommerce:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.products.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.products.create(...)

📝 Description

Creating a new Product involves creating both a Product and a SKU, since a Product Item has to have, at minimum, a single SKU.

In order to create a Product with multiple SKUs - for example a T-shirt in sizes small, medium and large - you'll need to create sku-properties. In our T-shirt example, a single sku-property would be Color. Within that property, we'll need to list out the various colors a T-shirt could be as an array of enum values: royal-blue, crimson-red, and forrest-green.

Once, you've created a Product and its sku-properties with enum values, you can create your default SKU, which will automatically be a combination of the first sku-properties you've created. In our example, the default SKU will be a Royal Blue T-Shirt, because our first enum of our Color sku-property is Royal Blue. After you've created your product, you can create additional SKUs using the Create SKU endpoint

Upon creation, the default product type will be Advanced. The product type is used to determine which Product and SKU fields are shown to users in the Designer and the Editor. Setting it to Advanced ensures that all Product and SKU fields will be shown.

Required scope | ecommerce:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.products.create(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

publish_status: typing.Optional[PublishStatus]

product: typing.Optional[Product]

sku: typing.Optional[Sku]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.products.get(...)

📝 Description

Retrieve a single product by its id. All of its SKUs will also be retrieved.

Required scope | ecommerce:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.products.get(
    site_id="site_id",
    product_id="product_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

product_id: str — Unique identifier for a Product

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.products.update(...)

📝 Description

Updating an existing Product will set the product type to Advanced. The product type is used to determine which Product and SKU fields are shown to users in the Designer and the Editor. Setting it to Advanced ensures that all Product and SKU fields will be shown. The product type can be edited in the Designer or the Editor.

Required scope | ecommerce:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.products.update(
    site_id="site_id",
    product_id="product_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

product_id: str — Unique identifier for a Product

publish_status: typing.Optional[PublishStatus]

product: typing.Optional[Product]

sku: typing.Optional[Sku]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.products.create_sku(...)

📝 Description

Create additional SKUs to cover every variant of your Product. The Default SKU already counts as one of the variants.

Creating additional SKUs will set the product type to Advanced for the product associated with the SKUs. The product type is used to determine which Product and SKU fields are shown to users in the Designer and the Editor. Setting it to Advanced ensures that all Product and SKU fields will be shown. The product type can be edited in the Designer or the Editor.

Required scope | ecommerce:write

🔌 Usage

from webflow import Sku
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.products.create_sku(
    site_id="site_id",
    product_id="product_id",
    skus=[Sku()],
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

product_id: str — Unique identifier for a Product

skus: typing.Sequence[Sku] — An array of the SKU data your are adding

publish_status: typing.Optional[PublishStatus]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.products.update_sku(...)

📝 Description

Updating an existing SKU will set the product type to Advanced for the product associated with the SKU. The product type is used to determine which Product and SKU fields are shown to users in the Designer and the Editor. Setting it to Advanced ensures that all Product and SKU fields will be shown. The product type can be edited in the Designer or the Editor.

Required scope | ecommerce:write

🔌 Usage

from webflow import Sku
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.products.update_sku(
    site_id="site_id",
    product_id="product_id",
    sku_id="sku_id",
    sku=Sku(),
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

product_id: str — Unique identifier for a Product

sku_id: str — Unique identifier for a SKU

sku: Sku

publish_status: typing.Optional[PublishStatus]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Orders

client.orders.list(...)

📝 Description

List all orders created for a given site.

Required scope | ecommerce:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.orders.list(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

status: typing.Optional[OrdersListRequestStatus] — Filter the orders by status

offset: typing.Optional[float] — Offset used for pagination if the results have more than limit records

limit: typing.Optional[float] — Maximum number of records to be returned (max limit: 100)

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.orders.get(...)

📝 Description

Retrieve a single product by its id. All of its SKUs will also be retrieved.

Required scope | ecommerce:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.orders.get(
    site_id="site_id",
    order_id="order_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

order_id: str — Unique identifier for an Order

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.orders.update(...)

📝 Description

This API lets you update the fields, comment, shippingProvider, and/or shippingTracking for a given order. All three fields can be updated simultaneously or independently.

Required scope | ecommerce:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.orders.update(
    site_id="site_id",
    order_id="order_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

order_id: str — Unique identifier for an Order

comment: typing.Optional[str] — Arbitrary data for your records

shipping_provider: typing.Optional[str] — Company or method used to ship order

shipping_tracking: typing.Optional[str] — Tracking number for order shipment

shipping_tracking_url: typing.Optional[str] — URL to track order shipment

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.orders.update_fulfill(...)

📝 Description

Updates an order's status to fulfilled

Required scope | ecommerce:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.orders.update_fulfill(
    site_id="site_id",
    order_id="order_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

order_id: str — Unique identifier for an Order

send_order_fulfilled_email: typing.Optional[bool] — Whether or not the Order Fulfilled email should be sent

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.orders.update_unfulfill(...)

📝 Description

Updates an order's status to unfulfilled

Required scope | ecommerce:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.orders.update_unfulfill(
    site_id="site_id",
    order_id="order_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

order_id: str — Unique identifier for an Order

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.orders.refund(...)

📝 Description

This API will reverse a Stripe charge and refund an order back to a customer. It will also set the order's status to refunded.

Required scope | ecommerce:write

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.orders.refund(
    site_id="site_id",
    order_id="order_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

order_id: str — Unique identifier for an Order

reason: typing.Optional[OrdersRefundRequestReason] — The reason for the refund

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Inventory

client.inventory.list(...)

📝 Description

List the current inventory levels for a particular SKU item.

Required scope | ecommerce:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.inventory.list(
    collection_id="collection_id",
    item_id="item_id",
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.inventory.update(...)

📝 Description

Updates the current inventory levels for a particular SKU item. Updates may be given in one or two methods, absolutely or incrementally. Absolute updates are done by setting quantity directly. Incremental updates are by specifying the inventory delta in updateQuantity which is then added to the quantity stored on the server.

Required scope | ecommerce:write

🔌 Usage

from webflow import InventoryUpdateRequestInventoryType
from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.inventory.update(
    collection_id="collection_id",
    item_id="item_id",
    inventory_type=InventoryUpdateRequestInventoryType.INFINITE,
)

⚙️ Parameters

collection_id: str — Unique identifier for a Collection

item_id: str — Unique identifier for an Item

inventory_type: InventoryUpdateRequestInventoryType — infinite or finite

update_quantity: typing.Optional[float] — Adds this quantity to currently store quantity. Can be negative.

quantity: typing.Optional[float] — Immediately sets quantity to this value.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Ecommerce

client.ecommerce.get_settings(...)

📝 Description

Retrieve ecommerce settings for a site.

Required scope | ecommerce:read

🔌 Usage

from webflow.client import Webflow

client = Webflow(
    access_token="YOUR_ACCESS_TOKEN",
)
client.ecommerce.get_settings(
    site_id="site_id",
)

⚙️ Parameters

site_id: str — Unique identifier for a Site

request_options: typing.Optional[RequestOptions] — Request-specific configuration.