CMS API Reference
The Webflow CMS API is a HTTP JSON API and allows you to programatically add, update, and delete items from the Webflow CMS, allowing you to connect external data sources to your Webflow sites.
You can access the API directly via HTTP, via the official JavaScript API client, or via any third-party integrations for your language of choice.
Data Models
Content in Webflow is built around three resources: Sites, Collections, and Items.
Sites map to Webflow websites. You can retrieve basic information about the sites a user is able to manage, but currently creating new sites or updating metadata about existing sites is restricted to the web interface and is not accessible via the API.
Collections are groupings of Items. All of the Items in a given Collection share the same set of custom fields, or schema. Defining Collections is restricted to the web interface, but the API allows you to query basic details about Collections and fetch paginated items from those Collections.
Items represent the individual pieces of content within a Collection. Items have a set schema of fields, determined by the Collection which they are a part of. The API allows for reading, creating, updating, and deleting content Items.
HTTP Verbs
Our API attempts to use the most appropriate HTTP verb for each endpoint. We make use of the following verbs:
VERB | DESCRIPTION |
---|---|
GET | Fetch resource(s) |
POST | Create a new resource |
PATCH | Update a new resource |
PUT | Update a resource |
DELETE | Delete a resource |
Parameters
Requests may have both required and/or optional parameters.
Depending on the HTTP verb, the parameters may be in either the URL itself, or in the request body.
Route Param
Route params will be defined as part of the path for a given API endpoint. They will be highlighted in a separate color, and prefixed with a colon (:
) for easy visibility.
For example:
GET /sites/:site_id/collections
In this example, site_id
is the route param.
Query String
GET
requests will have their parameters passed in via the query string.
For example:
/info?foo=bar&abc=123
In this example, the query string contains two parameters, foo
and abc
.
curl https://api.webflow.com/ \
-H "Content-Type: application/json" \
--data-binary $'{ "key": "value" }'
Request Body
All other requests will have their parameters passed in as part of the JSON-formatted request body. POST
, PUT
and PATCH
requests including JSON-formatted request bodies should ensure the Content-Type
header is set to application/json
.
Authentication
In order to access the API, you will need to provide an access token to authenticate with the API server. That token will be required for all API requests. You can acquire that token in one of two ways.
- Utilize OAuth to allow your application’s users to authorize your app to access their Webflow account and data.
- Issue a personal API key that grants your application full access to your personal account.
Once you have acquired the API token, it may be provided preferably via an HTTP header or in a query string parameter.
HTTP Header
curl https://api.webflow.com/info \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32"
const Webflow = require('webflow-api')
const webflow = new Webflow({ token: 'd59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32' })
webflow.info()
.then(info => console.log(info))
The following header should be used:
Authorization: Bearer <token>
Query String
If you cannot set the access token in a header, it also may be passed in as part of the query string with the parameter access_token
.
curl https://api.webflow.com/info?access_token=d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32
Meta
Get Current Authorization Info
Example request
curl https://api.webflow.com/info \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <{}>
const info = webflow.info();
info.then(x => console.log(x));
Example JSON response
{
"_id": "55818d58616600637b9a5786",
"createdOn": "2016-10-03T23:12:00.755Z",
"grantType": "authorization_code",
"lastUsed": "2016-10-10T21:41:12.736Z",
"sites": [ ],
"orgs": [
"551ad253f0a9c0686f71ed08"
],
"users": [
"545bbecb7bdd6769632504a7"
],
"rateLimit": 60,
"status": "confirmed",
"application": {
"_id": "55131cd036c09f7d07883dfc",
"description": "OAuth Testing Application",
"homepage": "https://webflow.com",
"name": "Test App",
"owner": "545bbecb7bdd6769632504a7",
"ownerType": "Person"
}
}
- Basic information about the authorization currently being used.
Request
GET https://api.webflow.com/info
Get Current Authorized User
Example request
curl https://api.webflow.com/user \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
// Pending implementation
Example JSON response
{
"user": {
"_id": "545bbecb7bdd6769632504a7",
"email": "some@email.com",
"firstName": "Some",
"lastName": "One"
}
}
- Basic information about the current authorized user.
Request
GET https://api.webflow.com/user
Sites
Model
{
"_id": "580e63e98c9a982ac9b8b741",
"createdOn": "2016-10-24T19:41:29.156Z",
"name": "api_docs_sample_json",
"shortName": "api-docs-sample-json",
"lastPublished": "2016-10-24T19:43:17.271Z",
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241243.png",
"timezone": "America/Los_Angeles",
"database": "580e63fc8c9a982ac9b8b744"
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | Unique identifier for site |
createdOn |
Date | Date the site was created |
name |
String | Name given to site |
shortName |
String | Slugified version of name |
lastPublished |
Date | Date site was last published |
previewUrl |
String | URL of a generated image for the given site |
timezone |
String | Site timezone set under Site Settings |
List Sites
Example request
curl https://api.webflow.com/sites \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <[ Site ]>
const sites = webflow.sites();
sites.then(s => console.log(s));
Example JSON response
[
{
"_id": "580e63e98c9a982ac9b8b741",
"createdOn": "2016-10-24T19:41:29.156Z",
"name": "api_docs_sample_json",
"shortName": "api-docs-sample-json",
"lastPublished": "2016-10-24T23:06:51.251Z",
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
"timezone": "America/Los_Angeles",
"database": "580e63fc8c9a982ac9b8b744"
},
{
"_id": "580ff8c3ba3e45ba9fe588bb",
"createdOn": "2016-10-26T00:28:54.191Z",
"name": "Copy of api_docs_sample_json",
"shortName": "api-docs-sample-json-086c6538f9b0583762",
"lastPublished": null,
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
"timezone": "America/Los_Angeles",
"database": "580ff8c3ba3e45ba9fe588bf"
},
{
"_id": "580ff8d7ba3e45ba9fe588e9",
"createdOn": "2016-10-26T00:29:13.634Z",
"name": "Copy of api_docs_sample_json",
"shortName": "api-docs-sample-json-ce077aa6c5cd3e0177",
"lastPublished": null,
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
"timezone": "America/Los_Angeles",
"database": "580ff8d7ba3e45ba9fe588ed"
}
]
- List of all sites the provided access token is able to access.
Request
GET https://api.webflow.com/sites
PARAMETER | DESCRIPTION |
---|---|
None | - |
Response
PARAMETER | DESCRIPTION |
---|---|
None | - |
Get Specific Site
Example request
curl https://api.webflow.com/sites/580e63e98c9a982ac9b8b741 \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <Site>
const site = webflow.sites({ siteId: '580e63e98c9a982ac9b8b741' });
site.then(s => console.log(s));
Example JSON response
{
"_id": "580e63e98c9a982ac9b8b741",
"createdOn": "2016-10-24T19:41:29.156Z",
"name": "api_docs_sample_json",
"shortName": "api-docs-sample-json",
"lastPublished": "2016-10-24T19:43:17.271Z",
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241243.png",
"timezone": "America/Los_Angeles",
"database": "580e63fc8c9a982ac9b8b744"
}
Request
GET /sites/:site_id
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
Response
PARAMETER | DESCRIPTION |
---|---|
site |
[site] |
Publish Site
Example request
curl https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/publish \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"domains": ["test-api-domain.com"]
}'
const webflow = new Webflow({ token: api_token });
// Promise <{ queued: Boolean }>
const published = webflow.publishSite({ siteId: '580e63e98c9a982ac9b8b741', domains: ['test-api-domain.com'] });
published.then(p => console.log(p));
Example JSON response
{
"queued": true
}
Request
POST /sites/:site_id/publish
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
domains |
Array of domains that should be published |
Response
PARAMETER | DESCRIPTION |
---|---|
queued |
Boolean |
Domains
Model
{
"_id": "580e63e98c9a982ac9b8b741",
"name": "test-api-domain.com"
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | Unique identifier for the domain |
name |
String | The domain name |
List Domains
Example request
curl https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <[ Domain ]>
const domains = webflow.domains({ siteId: '580e63e98c9a982ac9b8b741' });
domains.then(d => console.log(d));
Example JSON response
[
{
"_id": "589a331aa51e760df7ccb89d",
"name": "test-api-domain.com"
},
{
"_id": "589a331aa51e760df7ccb89e",
"name": "www.test-api-domain.com"
}
]
- List of all custom domains added to the given site
Request
GET /sites/:site_id/domains
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
Response
PARAMETER | DESCRIPTION |
---|---|
None | - |
Collections
Collections in Webflow are groupings of Items and define the schema or structure of the custom data stored in those Items. A Webflow site can have multiple attached Collections. A Collection’s fields define the structure of the Items within it.
Model
{
"_id": "580e63fc8c9a982ac9b8b745",
"lastUpdated": "2016-10-24T19:42:38.929Z",
"createdOn": "2016-10-24T19:41:48.349Z",
"name": "Blog Posts",
"slug": "post",
"singularName": "Blog Post",
"fields": [
{
"id": "7f62a9781291109b9e428fb47239fd35",
"editable": true,
"required": false,
"type": "RichText",
"slug": "post-body",
"name": "Post Body"
},
{
"validations": {
"singleLine": false
},
"id": "ac4ffead755a78c710c44042f528b073",
"helpText": "A summary of the blog post that appears on blog post grid",
"editable": true,
"required": false,
"type": "PlainText",
"slug": "post-summary",
"name": "Post Summary"
},
{
"id": "ba1cfbdaa6b38b8e95e9b5063da8a5bd",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "main-image",
"name": "Main Image"
},
{
"id": "a8c6ea29b08cc5b5ef966908fa1deae2",
"helpText": "Smaller version of main image that is used on blog post grid",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "thumbnail-image",
"name": "Thumbnail image"
},
{
"id": "87e79a644a6fb5729940ec24e0012f01",
"editable": true,
"required": false,
"type": "Set",
"innerType": "ImageRef",
"slug": "picture-gallery",
"name": "Picture Gallery"
},
{
"id": "1e54974d97181032d3206ea021668e5f",
"editable": true,
"required": false,
"type": "Bool",
"slug": "featured",
"name": "Featured?"
},
{
"id": "648463cbc042ab079c2b99430a398ae5",
"editable": true,
"required": false,
"type": "Color",
"slug": "color",
"name": "Color"
},
{
"validations": {
"collectionId": "580e64088c9a982ac9b8b766"
},
"id": "ea9067c48edee510de71fe503fa2fb51",
"editable": true,
"required": false,
"type": "ItemRef",
"slug": "author",
"name": "Author"
},
{
"validations": {
"maxLength": 256
},
"id": "60c0667e27b6d5a6daedec3a641265f6",
"editable": true,
"required": true,
"type": "PlainText",
"slug": "name",
"name": "Name"
},
{
"validations": {
"messages": {
"maxLength": "Must be less than 256 characters",
"pattern": "Must be alphanumerical and not contain any spaces or special characters"
},
"pattern": {},
"maxLength": 256
},
"id": "8f0c953df91d10b767d66e1d7d00d631",
"unique": true,
"editable": true,
"required": true,
"type": "PlainText",
"slug": "slug",
"name": "Slug"
},
{
"default": false,
"id": "e4e92e700d70faffac6fa82ff2bfaece",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_archived",
"name": "Archived"
},
{
"default": false,
"id": "f2675b2ac4fcef746b24d4a320887ef8",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_draft",
"name": "Draft"
},
{
"id": "0913a35d92208bdf8fbf3ed1e39b771e",
"editable": false,
"required": false,
"type": "Date",
"slug": "created-on",
"name": "Created On"
},
{
"id": "3de04889465fe6d718e47b152ef5bb4d",
"editable": false,
"required": false,
"type": "Date",
"slug": "updated-on",
"name": "Updated On"
},
{
"id": "2a3cd866d5dbb294896130b233218626",
"editable": false,
"required": false,
"type": "Date",
"slug": "published-on",
"name": "Published On"
},
{
"id": "62c18561b9e89517751c6d8712d48f91",
"editable": false,
"required": false,
"type": "User",
"slug": "created-by",
"name": "Created By"
},
{
"id": "50918093b4e4d4eca1e83c25bcdc06a4",
"editable": false,
"required": false,
"type": "User",
"slug": "updated-by",
"name": "Updated By"
},
{
"id": "5c4587f18b32ef245daeaadfcba7860b",
"editable": false,
"required": false,
"type": "User",
"slug": "published-by",
"name": "Published By"
}
]
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | The unique identifier for the Collection |
lastUpdated |
Date | Date Collection was last updated |
createdOn |
Date | Date Collection was created |
name |
String | Name given to Collection |
slug |
String | Slug of Collection in Site URL structure |
singularName |
String | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields |
Array | See full Fields section |
Default Fields
Each collection has a number of fields that are always present. Some of these fields are editable and some of them cannot be changed by users.
FIELD NAME | FIELD TYPE | EDITABLE | DESCRIPTION |
---|---|---|---|
_archived |
Bool |
true |
Items set to archived will not be published |
_draft |
Bool |
true |
Items set to draft will not be published |
created-on |
Date |
false |
Date when an Item was originally created |
published-on |
Date |
false |
Date when the Item was last published |
updated-on |
Date |
false |
Date when the Item was last updated |
created-by |
User |
false |
User who created the Item |
updated-by |
User |
false |
User who last updated the Item |
published-by |
User |
false |
User who last published the Item |
List Collections
Example request
curl https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <[ Collection ]>
const collections = webflow.collections({ siteId: '580e63e98c9a982ac9b8b741' });
collections.then(c => console.log(c));
Example JSON response
[
{
"_id": "580e63fc8c9a982ac9b8b745",
"lastUpdated": "2016-10-24T19:42:38.929Z",
"createdOn": "2016-10-24T19:41:48.349Z",
"name": "Blog Posts",
"slug": "post",
"singularName": "Blog Post"
},
{
"_id": "580e64088c9a982ac9b8b766",
"lastUpdated": "2016-10-24T19:42:00.799Z",
"createdOn": "2016-10-24T19:42:00.777Z",
"name": "Authors",
"slug": "author",
"singularName": "Author"
}
]
Request
GET /sites/:site_id/collections
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
Response
[ Collections ]
Get Collection with Full Schema
Example request
curl https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745 \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <Collection>
const collection = webflow.collection({ collectionId: '580e63fc8c9a982ac9b8b745' });
collection.then(c => console.log(c));
Example JSON response
{
"_id": "580e63fc8c9a982ac9b8b745",
"lastUpdated": "2016-10-24T19:42:38.929Z",
"createdOn": "2016-10-24T19:41:48.349Z",
"name": "Blog Posts",
"slug": "post",
"singularName": "Blog Post",
"fields": [
{
"id": "7f62a9781291109b9e428fb47239fd35",
"editable": true,
"required": false,
"type": "RichText",
"slug": "post-body",
"name": "Post Body"
},
{
"validations": {
"singleLine": false
},
"id": "ac4ffead755a78c710c44042f528b073",
"helpText": "A summary of the blog post that appears on blog post grid",
"editable": true,
"required": false,
"type": "PlainText",
"slug": "post-summary",
"name": "Post Summary"
},
{
"id": "ba1cfbdaa6b38b8e95e9b5063da8a5bd",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "main-image",
"name": "Main Image"
},
{
"id": "a8c6ea29b08cc5b5ef966908fa1deae2",
"helpText": "Smaller version of main image that is used on blog post grid",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "thumbnail-image",
"name": "Thumbnail image"
},
{
"id": "87e79a644a6fb5729940ec24e0012f01",
"editable": true,
"required": false,
"type": "Set",
"innerType": "ImageRef",
"slug": "picture-gallery",
"name": "Picture Gallery"
},
{
"id": "1e54974d97181032d3206ea021668e5f",
"editable": true,
"required": false,
"type": "Bool",
"slug": "featured",
"name": "Featured?"
},
{
"id": "648463cbc042ab079c2b99430a398ae5",
"editable": true,
"required": false,
"type": "Color",
"slug": "color",
"name": "Color"
},
{
"validations": {
"collectionId": "580e64088c9a982ac9b8b766"
},
"id": "ea9067c48edee510de71fe503fa2fb51",
"editable": true,
"required": false,
"type": "ItemRef",
"slug": "author",
"name": "Author"
},
{
"validations": {
"maxLength": 256
},
"id": "60c0667e27b6d5a6daedec3a641265f6",
"editable": true,
"required": true,
"type": "PlainText",
"slug": "name",
"name": "Name"
},
{
"validations": {
"messages": {
"maxLength": "Must be less than 256 characters",
"pattern": "Must be alphanumerical and not contain any spaces or special characters"
},
"pattern": {},
"maxLength": 256
},
"id": "8f0c953df91d10b767d66e1d7d00d631",
"unique": true,
"editable": true,
"required": true,
"type": "PlainText",
"slug": "slug",
"name": "Slug"
},
{
"default": false,
"id": "e4e92e700d70faffac6fa82ff2bfaece",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_archived",
"name": "Archived"
},
{
"default": false,
"id": "f2675b2ac4fcef746b24d4a320887ef8",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_draft",
"name": "Draft"
},
{
"id": "0913a35d92208bdf8fbf3ed1e39b771e",
"editable": false,
"required": false,
"type": "Date",
"slug": "created-on",
"name": "Created On"
},
{
"id": "3de04889465fe6d718e47b152ef5bb4d",
"editable": false,
"required": false,
"type": "Date",
"slug": "updated-on",
"name": "Updated On"
},
{
"id": "2a3cd866d5dbb294896130b233218626",
"editable": false,
"required": false,
"type": "Date",
"slug": "published-on",
"name": "Published On"
},
{
"id": "62c18561b9e89517751c6d8712d48f91",
"editable": false,
"required": false,
"type": "User",
"slug": "created-by",
"name": "Created By"
},
{
"id": "50918093b4e4d4eca1e83c25bcdc06a4",
"editable": false,
"required": false,
"type": "User",
"slug": "updated-by",
"name": "Updated By"
},
{
"id": "5c4587f18b32ef245daeaadfcba7860b",
"editable": false,
"required": false,
"type": "User",
"slug": "published-by",
"name": "Published By"
}
]
}
Request
GET /collections/:collection_id
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection |
Response
PARAMETER | DESCRIPTION |
---|---|
_id      |
The unique identifier for the Collection |
lastUpdated |
Date Collection was last updated |
createdOn |
Date Collection was created |
name |
Name given to Collection |
slug |
Slug of Collection in Site URL structure |
singularName |
The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields |
See full Fields section |
Fields
Fields are what define the schema of a Collection - and ultimately all your dynamic data - but how are fields themselves defined? Fields are simply objects with a number of special properties modifying their behavior and how the data can interact with your site. Most importantly, every field has a Field Type describing what kind of field it is.
Schema
Example fields object from a Collection
[
{
"id": "95f8ddc086128a309d227e08f9df3e53",
"editable": true,
"required": false,
"type": "RichText",
"slug": "bio",
"name": "Bio"
},
{
"validations": {
"singleLine": false
},
"id": "f3fee428d8c0458e16b927128415322c",
"editable": true,
"required": false,
"type": "PlainText",
"slug": "bio-summary",
"name": "Bio Summary"
},
{
"id": "c247d51aa9d9e17c41fd9e518264ad6f",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "picture",
"name": "Picture"
},
{
"id": "4bec8578d095b7f3a35ced8993d3b3fa",
"editable": true,
"required": false,
"type": "Set",
"innerType": "ImageRef",
"slug": "picture-gallery",
"name": "Picture Gallery"
},
{
"validations": {
"singleLine": true
},
"id": "0b71fa766c6d2c8791f167cfbb9b4a99",
"editable": true,
"required": false,
"type": "PlainText",
"slug": "email",
"name": "Email"
},
{
"id": "fc51d004e735aa93bbb111f745c3ee37",
"editable": true,
"required": false,
"type": "Link",
"slug": "twitter-profile-link",
"name": "Twitter Profile Link"
},
{
"id": "53b5592c93a7a833ba82e2a1be9f87c6",
"editable": true,
"required": false,
"type": "Link",
"slug": "facebook-profile-link",
"name": "Facebook Profile Link"
},
{
"validations": {
"maxLength": 256
},
"id": "cd3f236ac2ebdf048106f45dda4b8bbe",
"editable": true,
"required": true,
"type": "PlainText",
"slug": "name",
"name": "Name"
},
{
"validations": {
"messages": {
"maxLength": "Must be less than 256 characters",
"pattern": "Must be alphanumerical and not contain any spaces or special characters"
},
"pattern": {},
"maxLength": 256
},
"id": "2d829c8278655f2cd5f1299566990432",
"unique": true,
"editable": true,
"required": true,
"type": "PlainText",
"slug": "slug",
"name": "Slug"
},
{
"default": false,
"id": "758226597df23581f2f01d3554a4bd09",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_archived",
"name": "Archived"
},
{
"default": false,
"id": "20046b7e8a36f45c2cebc5ff446d5474",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_draft",
"name": "Draft"
},
{
"id": "9702a0fe00c7a77de1a9a4cecc1b71c6",
"editable": false,
"required": false,
"type": "Date",
"slug": "created-on",
"name": "Created On"
},
{
"id": "9226e32368be6d2c8c5140dbf6930110",
"editable": false,
"required": false,
"type": "Date",
"slug": "updated-on",
"name": "Updated On"
},
{
"id": "d99acf383e56370e4b2f6691c412877a",
"editable": false,
"required": false,
"type": "Date",
"slug": "published-on",
"name": "Published On"
},
{
"id": "8c0ad485a6f6e8f3fb3de92c61a60a08",
"editable": false,
"required": false,
"type": "User",
"slug": "created-by",
"name": "Created By"
},
{
"id": "b216246047fb6a733b7ed871e3c75f02",
"editable": false,
"required": false,
"type": "User",
"slug": "updated-by",
"name": "Updated By"
},
{
"id": "4ad807325546c62d76e453bf18addc77",
"editable": false,
"required": false,
"type": "User",
"slug": "published-by",
"name": "Published By"
}
]
FIELD | TYPE | DESCRIPTION |
---|---|---|
id |
ObjectId | Unique identifier for the field |
type |
String | See Field Types below |
slug |
String | Slug of the field in the URL structure of your site for template pages |
name |
String | Name given to the field |
required |
Boolean | Determines if field is required |
editable |
Boolean | Boolean determining if the Field can be edited (some fields are automatically created and cannot be edited) |
validations |
Object | See Validations below |
Field Types
Some field types use slightly different names in the Designer and Editor. For these fields, they have an “alt name” listed here which is the name of the field we publicly display. (For the API however, we only use the actual name of the field type)
FIELD TYPE | INNER FIELD TYPE | ALT NAME | DATA TYPE | DESCRIPTION |
---|---|---|---|---|
Bool |
- | Switch | Boolean | Yes/no switch used for filtering data that’s displayed in your site, ex: featured |
Color |
- | - | String | CSS Color value (ie: 'red' or '#e3e3e3' ) |
Date |
- | Date/Time | Date | Date field used to display any combination of month, day, year, and time |
ExtFileRef |
- | External File | Object | An object containing name (string) and URL (string) properties |
Set |
ExtFileRef |
Multi External File | Array | Field containing multiple objects for external files |
ImageRef |
- | Image | String | Unique id for images in CMS |
Set |
ImageRef |
Multi Image | Array | Field containing multiple unique ids for images in CMS |
ItemRef |
- | Reference | ObjectId | Field containing item referenced from another Collection |
ItemRefSet |
- | Multi-Reference | Array | Field containing multiple items referenced from another Collection |
Link |
- | - | String | URL field where the value can be used as a link destination for buttons, link text, and link blocks |
Number |
- | - | Number | Single line input field used only for numbers |
Option |
- | - | String | Dropdown field with multiple options |
PlainText |
- | - | String | Unformatted text (no images, styles, etc.) |
RichText |
- | - | String | Formatted text (with headers, hyperlinks, images, etc.) |
Video |
- | - | String | Video link field used to embed videos from YouTube and Vimeo |
User |
- | String | Cannot be set by a user. Only used for created-by type fields. |
Inner Field Types
Inner field types follow the same rules as field types, but are used to describe the type of a “Set” field Array element. They may use slightly different names in the Designer and Editor and have an “alt name” listed here which is the name of the field we publicly display. (For the API however, we only use the actual name of the field type)
INNER FIELD TYPE | ALT NAME | DATA TYPE | DESCRIPTION |
---|---|---|---|
ExtFileRef |
External File | Object | An object containing name (string) and URL (string) properties |
ImageRef |
Image | String | Unique id for images in CMS |
Validations
Each field also may have a validations
object which defines all of the validations which have been set for the given field. The “TYPE” column defines the data type of the validations.
VALIDATION NAME | TYPE |
---|---|
maxLength |
Number |
minLength |
Number |
minimum |
Number |
maximum |
Number |
maxSize |
Number |
decimalPlaces |
Number |
singleLine |
Boolean |
options |
Array |
format |
String |
precision |
Number |
allowNegative |
Boolean |
collectionId |
String |
Items
Item Model
The fields that define the schema for a given Item are based on the Collection that Item belongs to. Beyond the user defined fields, there are a handful of additional fields that are automatically created for all items:
FIELD | TYPE | DESCRIPTION |
---|---|---|
_archived |
Boolean | Boolean determining if the Item is set to archived |
_draft |
Boolean | Boolean determining if the Item is set to draft |
_id |
String | Unique identifier for the Item |
_cid |
String | Unique identifier for the Collection the Item belongs within |
name |
String | Name given to the Item |
slug |
String | URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. |
updated-on |
Date | Date Item was last updated |
created-on |
Date | Date Item was created |
published-on |
Date | Date Item was last published |
updated-by |
Date | User who made last change to Item |
created-by |
Date | User who created Item |
published-by |
Date | User who last published Item |
Get All Items For a Collection
Example request
curl https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?limit=1 \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <[ Item ]>
const items = webflow.items({ collectionId: '580e63fc8c9a982ac9b8b745' }, { limit: 1 });
items.then(i => console.log(i));
Example JSON response
{
"items": [
{
"_archived": false,
"_draft": false,
"color": "#4CAF50",
"featured": false,
"name": "5 Principles Of Effective Web Design",
"post-body": "<h2>Earum laboriosam ab velit.</h2><p>Et aliquam fuga corporis sit assumenda culpa minima nostrum. Rerum corrupti cum quod laborum a. Non voluptatum ipsam ut et nostrum. Omnis deleniti hic est velit nemo et.</p><h3>Ut recusandae eveniet cum fugit.</h3><blockquote>Sed consectetur nulla dolorem explicabo temporibus aut. Assumenda ea reprehenderit voluptatem quis odit. Sequi sunt vel et dolorem qui dolorum ex. Omnis qui debitis eaque.</blockquote><p>Cumque et reiciendis sit ipsa. Odit sint dolor aliquam. Autem est odio voluptates deleniti. Voluptas quod dolorem minus natus necessitatibus. Autem ea iusto sunt repudiandae. Voluptatem ut et distinctio vero aliquid.</p><p>Aut ut eius. Sit quia labore nesciunt enim nemo eius pariatur odio inventore. Dolorem sapiente maxime laudantium vero praesentium. Fuga neque ipsam doloremque officia accusamus beatae ut occaecati aut. Aperiam perferendis et.</p><h2>Incidunt dolores assumenda tenetur ut recusandae officiis inventore modi quia.</h2><p>Aut necessitatibus qui nesciunt dolores dolores delectus nostrum occaecati odit. Quia optio et enim. Illo ipsa omnis quia quo ducimus voluptas placeat. Voluptatum consequatur id rem aut dolorem nesciunt. Est occaecati vero. Velit magni amet dignissimos.</p><h3>Voluptatem magni dolor quis hic quia iusto aut rerum quasi.</h3><blockquote>Repudiandae laborum necessitatibus dolorem accusamus sit et amet doloremque. Rerum illum rerum officia dolorum perferendis soluta aut incidunt autem. Rerum ut non corrupti maiores architecto vitae rerum quaerat ab. Est sint dolores quia repudiandae et eveniet. Et tenetur similique non ad. Quibusdam qui dolores dignissimos vitae reiciendis nulla aut necessitatibus.</blockquote><p>Voluptatem quia enim quos laudantium est. Dolorem earum est. Ut autem nemo accusamus quibusdam et dignissimos ut. Similique quia cumque. Aut pariatur repellendus voluptates error fugit illo. Neque pariatur impedit accusantium sed aut ea fuga magni ex.</p><p>Iusto accusamus quia nisi rerum reiciendis minus quam debitis. Sit illo eos qui. Nisi et autem sequi.</p>",
"post-summary": "Quo eligendi nihil quia voluptas qui.\nNon distinctio voluptatu",
"thumbnail-image": {
"fileId": "580e63ff8c9a982ac9b8b74d",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63ff8c9a982ac9b8b74d_1477338111010-image3.jpg"
},
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "5-principles-of-effective-web-design",
"updated-on": "2016-10-24T19:42:46.957Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-10-24T19:41:52.325Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": "2016-10-24T19:43:15.745Z",
"published-by": "Person_5660c5338e9d3b0bee3b86aa",
"author": "580e640c8c9a982ac9b8b77a",
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "580e64008c9a982ac9b8b754"
}
],
"count": 1,
"limit": 1,
"offset": 0,
"total": 5
}
Request
GET /collections/:collection_id/items
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection you are querying |
limit |
Maximum number of Items to be returned (max limit: 100) |
offset |
Offset used for pagination if collection has more than limit items |
Response
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
items |
Array | List of Items within the Collection |
count |
Number | Number of items returned |
limit |
Number | The limit specified in the request (default: 100) |
offset |
Number | The offset specified for pagination (default: 0) |
total |
Number | Total number of items in the collection |
Get Single Item
Example request
curl https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754 \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.item({ collectionId: '580e63fc8c9a982ac9b8b745', itemId: '580e64008c9a982ac9b8b754' });
item.then(i => console.log(i));
Example JSON response
{
"items": [
{
"_archived": false,
"_draft": false,
"color": "#4CAF50",
"featured": false,
"name": "5 Principles Of Effective Web Design",
"post-body": "<h2>Earum laboriosam ab velit.</h2><p>Et aliquam fuga corporis sit assumenda culpa minima nostrum. Rerum corrupti cum quod laborum a. Non voluptatum ipsam ut et nostrum. Omnis deleniti hic est velit nemo et.</p><h3>Ut recusandae eveniet cum fugit.</h3><blockquote>Sed consectetur nulla dolorem explicabo temporibus aut. Assumenda ea reprehenderit voluptatem quis odit. Sequi sunt vel et dolorem qui dolorum ex. Omnis qui debitis eaque.</blockquote><p>Cumque et reiciendis sit ipsa. Odit sint dolor aliquam. Autem est odio voluptates deleniti. Voluptas quod dolorem minus natus necessitatibus. Autem ea iusto sunt repudiandae. Voluptatem ut et distinctio vero aliquid.</p><p>Aut ut eius. Sit quia labore nesciunt enim nemo eius pariatur odio inventore. Dolorem sapiente maxime laudantium vero praesentium. Fuga neque ipsam doloremque officia accusamus beatae ut occaecati aut. Aperiam perferendis et.</p><h2>Incidunt dolores assumenda tenetur ut recusandae officiis inventore modi quia.</h2><p>Aut necessitatibus qui nesciunt dolores dolores delectus nostrum occaecati odit. Quia optio et enim. Illo ipsa omnis quia quo ducimus voluptas placeat. Voluptatum consequatur id rem aut dolorem nesciunt. Est occaecati vero. Velit magni amet dignissimos.</p><h3>Voluptatem magni dolor quis hic quia iusto aut rerum quasi.</h3><blockquote>Repudiandae laborum necessitatibus dolorem accusamus sit et amet doloremque. Rerum illum rerum officia dolorum perferendis soluta aut incidunt autem. Rerum ut non corrupti maiores architecto vitae rerum quaerat ab. Est sint dolores quia repudiandae et eveniet. Et tenetur similique non ad. Quibusdam qui dolores dignissimos vitae reiciendis nulla aut necessitatibus.</blockquote><p>Voluptatem quia enim quos laudantium est. Dolorem earum est. Ut autem nemo accusamus quibusdam et dignissimos ut. Similique quia cumque. Aut pariatur repellendus voluptates error fugit illo. Neque pariatur impedit accusantium sed aut ea fuga magni ex.</p><p>Iusto accusamus quia nisi rerum reiciendis minus quam debitis. Sit illo eos qui. Nisi et autem sequi.</p>",
"post-summary": "Quo eligendi nihil quia voluptas qui.\nNon distinctio voluptatu",
"thumbnail-image": {
"fileId": "580e63ff8c9a982ac9b8b74d",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63ff8c9a982ac9b8b74d_1477338111010-image3.jpg"
},
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "5-principles-of-effective-web-design",
"updated-on": "2016-10-24T19:42:46.957Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-10-24T19:41:52.325Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": "2016-10-24T19:43:15.745Z",
"published-by": "Person_5660c5338e9d3b0bee3b86aa",
"author": "580e640c8c9a982ac9b8b77a",
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "580e64008c9a982ac9b8b754"
}
],
"count": 1,
"limit": 100,
"offset": 0,
"total": 5
}
Request
GET /collections/:collection_id/items/:item_id
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection you are querying |
item_id |
Unique identifier for the Item you are querying |
Response
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
items |
Array | List of the Item you are querying |
count |
Number | Number of items returned |
limit |
Number | The limit specified in the request (default: 100) |
offset |
Number | The offset specified for pagination (default: 0) |
total |
Number | Total number of items in the collection |
Create New Collection Item
Example request
curl 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.createItem({
collectionId: '580e63fc8c9a982ac9b8b745',
fields: {
'name': 'Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#a98080',
'author': '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749',
},
});
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#a98080",
"name": "Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-b",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-15T22:45:32.647Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-15T22:45:32.647Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": null,
"published-by": null,
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "582b900cba19143b2bb8a759"
}
Request
POST /collections/:collection_id/items
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection you are adding an Item to |
fields |
The fields and data of the Item you are adding to the Collection |
Response
Item
Create New Live Collection Item
When adding new CMS items with the API, the default behavior is only to add the item as “staged” but not to include it in the published site. The primary reason for this is because it’s possible to update your collection schema in a manner that conflicts with what is published making it possible to add items which would break the published site.
To get around this, you have to explicitly request the item be published to the live site - however this request will fail under a number of conditions:
- If you have multiple domains published at different times
- If your staging collection schema has been modified since your last published
The fix is the same for all cases however: re-publish your site to ensure all domains have the latest collection schema associated with them.
The API request is identical to the normal “add item” request, with one additional querystring parameter: ?live=true
Example request
curl 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?live=true' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.createItem({
collectionId: '580e63fc8c9a982ac9b8b745',
fields: {
'name': 'Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#a98080',
'author': '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749',
},
}, { live: true });
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#a98080",
"name": "Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-b",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-15T22:45:32.647Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-15T22:45:32.647Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": "2016-11-15T22:45:32.647Z",
"published-by": "Person_5660c5338e9d3b0bee3b86aa",
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "582b900cba19143b2bb8a759"
}
Request
POST /collections/:collection_id/items
PARAMETER | DESCRIPTION |
---|---|
live |
Boolean string indicating if the item should be published to the live site |
collection_id |
Unique identifier for the Collection you are adding an Item to |
fields |
The fields and data of the Item you are adding to the Collection |
Response
Item
Update Collection Item
Example request
curl -X PUT 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Updated Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.updateItem({
collectionId: '580e63fc8c9a982ac9b8b745',
itemId: '58338a5735ca4f023b9f1847',
fields: {
'name': 'Updated Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#a98080',
'author': '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749',
}
});
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#a98080",
"name": "Updated Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-9",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-17T00:12:06.727Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-16T01:51:36.121Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": null,
"published-by": null,
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "582bbba8dae4fb7a75bd30e8"
}
Request
An “update item” request" replaces the fields of an existent item with the fields specified in the payload.
PUT /collections/:collection_id/items/:item_id
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection of the Item you are updating |
item_id |
Unique identifier for the Item you are updating |
fields |
The fields and data of the Item you are updating |
Response
Item
Update Live Collection Item
Example request
curl -X PUT 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8?live=true' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Updated Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.updateItem({
collectionId: '580e63fc8c9a982ac9b8b745',
itemId: '58338a5735ca4f023b9f1847',
fields: {
'name': 'Updated Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#a98080',
'author': '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749',
}
}, { live: true });
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#a98080",
"name": "Updated Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-9",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-17T00:12:06.727Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-16T01:51:36.121Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": "2016-11-16T01:51:36.121Z",
"published-by": "Person_5660c5338e9d3b0bee3b86aa",
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "582bbba8dae4fb7a75bd30e8"
}
Request
When updating CMS items with the API, the default behavior is only to apply the change as “staged” but not to include it in the published site. The primary reason for this is because it’s possible to update your collection schema in a manner that conflicts with what is published making it possible to update items in a way that would break the published site.
To get around this, you have to explicitly request the item be published to the live site - however this request will fail under a number of conditions:
- If you have multiple domains published at different times
- If your staging collection schema has been modified since your last published
The fix is the same for all cases however: re-publish your site to ensure all domains have the latest collection schema associated with them.
The API request is identical to the normal “update item” request, with one additional querystring parameter: ?live=true
PUT /collections/:collection_id/items/:item_id
PARAMETER | DESCRIPTION |
---|---|
live |
Boolean string indicating if the item should be published to the live site |
collection_id |
Unique identifier for the Collection of the Item you are updating |
item_id |
Unique identifier for the Item you are updating |
fields |
The updated fields and data of the Item |
Response
Item
Patch Collection Item
Example request
curl -X PATCH 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Updated Exciting blog post title",
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.patchItem({
collectionId: '580e63fc8c9a982ac9b8b745',
itemId: '58338a5735ca4f023b9f1847',
fields: {
'name': 'Patched Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#4353FF',
}
});
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#4353FF",
"name": "Patched Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-9",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-17T00:12:06.727Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-16T01:51:36.121Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": null,
"published-by": null,
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "58338a5735ca4f023b9f1847"
}
Request
A “patch item” request" is similar to the “update item” request, but the only required fields are those that need to be changed.
PATCH /collections/:collection_id/items/:item_id
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection of the Item you are updating |
item_id |
Unique identifier for the Item you are updating |
fields |
The updated fields and data of the Item |
Response
Item
Patch Live Collection Item
Example request
curl -X PATCH 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8?live=true' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Updated Exciting blog post title",
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.patchItem({
collectionId: '580e63fc8c9a982ac9b8b745',
itemId: '58338a5735ca4f023b9f1847',
fields: {
'name': 'Patched Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#4353FF',
}
}, { live: true });
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#4353FF",
"name": "Patched Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-9",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-17T00:12:06.727Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-16T01:51:36.121Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": "2016-11-16T01:51:36.121Z",
"published-by": "Person_5660c5338e9d3b0bee3b86aa",
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "58338a5735ca4f023b9f1847"
}
Request
When updating CMS items with the API, the default behavior is only to apply the change as “staged” but not to include it in the published site. The primary reason for this is because it’s possible to update your collection schema in a manner that conflicts with what is published making it possible to update items in a way that would break the published site.
To get around this, you have to explicitly request the item be published to the live site - however this request will fail under a number of conditions:
- If you have multiple domains published at different times
- If your staging collection schema has been modified since your last published
The fix is the same for all cases however: re-publish your site to ensure all domains have the latest collection schema associated with them.
The API request is identical to the normal “patch item” request, with one additional querystring parameter: ?live=true
PATCH /collections/:collection_id/items/:item_id
PARAMETER | DESCRIPTION |
---|---|
live |
Boolean string indicating if the item should be published to the live site |
collection_id |
Unique identifier for the Collection of the Item you are updating |
item_id |
Unique identifier for the Item you are updating |
fields |
The fields and data of the Item you are updating |
Response
Item
Remove Collection Item
Example request
curl -X DELETE 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/581d2d8256e14ea22daf82df' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <{}>
const removed = webflow.removeItem({ collectionId: '580e63fc8c9a982ac9b8b745', itemId: '582bbba8dae4fb7a75bd30e8' })
removed.then(x => console.log(x));
Example JSON response
{
"deleted": 1
}
Request
DELETE /collections/:collection_id/items/:item_id
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the Collection of the Item you are removing |
item_id |
Unique identifier for the Item you are removing |
Response
PARAMETER | DESCRIPTION |
---|---|
deleted |
Number of items deleted |
Images
Upload Image
To upload a new image set the image URL to the corresponding item’s field in a POST, PUT or PATCH request.
Collection items that reuse images previously uploaded can just reference their fileId
property.
Example request
curl -X PUT 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{
"fields": {
"name": "Updated Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "http://somesite.com/image20.jpg"
}
}'
const webflow = new Webflow({ token: api_token });
// Promise <Item>
const item = webflow.updateItem({
collectionId: '580e63fc8c9a982ac9b8b745',
itemId: '58338a5735ca4f023b9f1847',
fields: {
'name': 'Updated Exciting blog post title',
'slug': 'exciting-post',
'_archived': false,
'_draft': false,
'color': '#a98080',
'author': '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': 'http://somesite.com/image20.jpg',
}
});
item.then(i => console.log(i));
Example JSON response
{
"_archived": false,
"_draft": false,
"color": "#a98080",
"name": "Updated Exciting blog post title",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://uploads-ssl.webflow.com/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "exciting-post-9",
"author": "580e640c8c9a982ac9b8b778",
"updated-on": "2016-11-17T00:12:06.727Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-11-16T01:51:36.121Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": null,
"published-by": null,
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "582bbba8dae4fb7a75bd30e8"
}
Ecommerce
Collections
Ecommerce products under the hood are just CMS items with a little bit
of extra information. When listing collections, there are
three ecommerce specific collections, SKUS
, Products
, and Categories
.
SKUs
contains specific data like price, size, weight, etc.
(item inventory is referenced by SKU) and reference back to
a Product
. Products
can be put into multiple Categories
.
To add, edit or view Ecommerce Collections, refer to the Collection APIs.
Products, SKUs and Categories
Ecommerce products are items stored in the Products
collection, and SKUs
(or Variants) are items stored in the SKUs
collection. Both the Products
and SKUs Collections have a set of default fields. You can create additional fields
in the Products collection only, as long as the field slug doesn’t collide with an
existing field slug.
A Product CMS Item is linked to a “Default SKU” (which is a regular SKU item) via
the default-sku
field specified in the Products collection. In turn, each SKU
Item (even the default SKU item) is linked to the Product Item via the product
field
specified in the SKUs
collection. Every Product Item has, at minimum, one
Default SKU Item.
Products Collection Model
{
"_id": "5da0e5abc0fbee1769d2861f",
"name": "Products",
"slug": "product",
"singularName": "Product",
"createdOn": "2019-10-11T20:27:23.139Z",
"lastUpdated": "2019-10-11T20:27:23.219Z",
"fields": [
{
"name": "Name",
"slug": "name",
"type": "PlainText",
"required": true,
"editable": true,
"id": "cdee630dc3fa90b78c8003faaf6efd94",
"validations": {
"maxLength": 256
}
},
{
"name": "Slug",
"slug": "slug",
"type": "PlainText",
"required": true,
"editable": true,
"unique": true,
"id": "1e40ea5b49bf8cad6abe0f926d23bbb9",
"validations": {
"maxLength": 256,
"pattern": {},
"messages": {
"pattern": "Must be alphanumerical and not contain any spaces or special characters",
"maxLength": "Must be less than 256 characters"
}
}
},
{
"id": "a523d65419cb62e54ec13f62e3e01c48",
"name": "Description",
"slug": "description",
"type": "PlainText",
"required": false,
"editable": true
},
{
"id": "d8a9f69bc4b0e20134240a0dff2e869a",
"name": "Categories",
"slug": "category",
"type": "ItemRefSet",
"helpText": "Add this product to one or more categories.",
"required": false,
"editable": true,
"validations": {
"collectionId": "5da0e5abc0fbee1769d2861e"
}
},
{
"id": "386bf05bf5f12bca9c9eed4213b486d5",
"name": "SKU Properties",
"slug": "sku-properties",
"type": "CommercePropTable",
"required": false,
"editable": true
},
{
"id": "8355f38716cf19a9fe733d511d3e7745",
"name": "Requires Shipping",
"slug": "shippable",
"type": "Bool",
"required": false,
"editable": true
},
{
"id": "66ca4ba1b71cf99bade6a7f2f9d3aa10",
"name": "Tax Category",
"slug": "tax-category",
"type": "EnumOption",
"required": false,
"editable": true,
"validations": {
"enumName": "TaxCategories"
}
},
{
"id": "cc9b0f5a07cce3f94bedac45401ea166",
"name": "Default SKU",
"slug": "default-sku",
"type": "ItemRef",
"required": false,
"editable": true,
"validations": {
"collectionId": "5da0e5abc0fbee1769d28620"
}
},
{
"id": "c8a9f69dc4b0e20134240a0dff2e879a",
"name": "Product type",
"slug": "ec-product-type",
"type": "Option",
"required": false,
"editable": true,
"validations": {
"options": [
{ "id": "ff42fee0113744f693a764e3431a9cc2", "name": "Physical" },
{ "id": "f22027db68002190aef89a4a2b7ac8a1", "name": "Digital" },
{ "id": "c599e43b1a1c34d5a323aedf75d3adf6", "name": "Service" },
{ "id": "b6ccc1830db4b1babeb06a9ac5f6dd76", "name": "Advanced" }
]
}
},
{
"id": "2db3a3036de5302171cb3240b27ec0ce",
"name": "Archived",
"slug": "_archived",
"type": "Bool",
"required": true,
"editable": true,
"default": false
},
{
"id": "6c69dee57daad57b9b6dcf6b35d4fa3b",
"name": "Draft",
"slug": "_draft",
"type": "Bool",
"required": true,
"editable": true,
"default": false
},
{
"id": "b39020ea6189a330d2ac260a35d100a3",
"name": "Created On",
"slug": "created-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "b99726b7b93c30e6ee3eb6c762f847d4",
"name": "Updated On",
"slug": "updated-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "a7fe3a69de2bde5fcb1dbcb95a65b13b",
"name": "Published On",
"slug": "published-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "6d1bed3c57dde348331249a55cb49f4a",
"name": "Created By",
"slug": "created-by",
"type": "User",
"required": false,
"editable": false
},
{
"id": "3fcd8ab9b7bf890ff800128009c1c59c",
"name": "Updated By",
"slug": "updated-by",
"type": "User",
"required": false,
"editable": false
},
{
"id": "fe5f6da5ded481594a3797f1f676f17a",
"name": "Published By",
"slug": "published-by",
"type": "User",
"required": false,
"editable": false
}
]
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | The unique identifier for the Collection |
lastUpdated |
Date | Date Collection was last updated |
createdOn |
Date | Date Collection was created |
name |
String | Name given to Collection |
slug |
String | Slug of Collection |
singularName |
String | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields |
Array | See full Fields section |
Default Fields
Each collection has a number of fields that are always present. Some of these fields are editable and some of them cannot be changed by users.
FIELD NAME | FIELD TYPE | EDITABLE | DESCRIPTION |
---|---|---|---|
_archived |
Bool |
true |
Items set to archived will not be published |
_draft |
Bool |
true |
Items set to draft will not be published |
sku-properties |
CommercePropTable |
true |
The properties table that describes the SKU variants |
category |
ItemRefSet |
true |
Reference to Categories that a product can belong to |
description |
PlainText |
true |
Description of the Product Item |
shippable |
Bool |
true |
Product Item set to shippable can be physically shipped |
tax-category |
EnumOption |
true |
Tax Category that this Product Item belongs to |
default-sku |
ItemRef |
true |
The reference to the default SKU Item |
ec-product-type |
Option |
true |
Set to Advanced for Product Items created or updated via the API |
created-on |
Date |
false |
Date when an Product Item was originally created |
published-on |
Date |
false |
Date when the Product Item was last published |
updated-on |
Date |
false |
Date when the Product Item was last updated |
created-by |
User |
false |
User who created the Product Item |
updated-by |
User |
false |
User who last updated the Product Item |
published-by |
User |
false |
User who last published the Product Item |
SKUs Collection Model
{
"_id": "5e8402eb8a402e354bd469be",
"name": "SKUs",
"slug": "sku",
"singularName": "SKU",
"createdOn": "2020-04-01T02:56:43.637Z",
"lastUpdated": "2020-04-01T02:56:43.722Z",
"fields": [
{
"id": "9f4bf9407f5e701f4479e336a740d25e",
"name": "Name",
"slug": "name",
"type": "PlainText",
"required": true,
"editable": true,
"validations": {
"maxLength": 256
}
},
{
"id": "c9c2312977b26a4b9de40891f6f0cdf8",
"name": "Slug",
"slug": "slug",
"type": "PlainText",
"required": true,
"editable": true,
"unique": true,
"validations": {
"maxLength": 256,
"pattern": {},
"messages": {
"pattern": "Must be alphanumerical and not contain any spaces or special characters",
"maxLength": "Must be less than 256 characters"
}
}
},
{
"id": "a1bc446bd06fe1f389673d4b477a37ee",
"name": "Product",
"slug": "product",
"type": "ItemRef",
"required": true,
"editable": true,
"validations": {
"collectionId": "5e8402eb8a402e354bd469bd"
}
},
{
"id": "fbf2ebffd03bd09f740a5f54beeb5a06",
"name": "SKU Values",
"slug": "sku-values",
"type": "CommercePropValues",
"required": true,
"editable": true
},
{
"id": "af3a86e40ed76d474468c6e270a857c6",
"name": "Main Image",
"slug": "main-image",
"type": "ImageRef",
"required": false,
"editable": true,
"validations": {
"acceptedExtensions": ["jpeg", "jpg", "gif", "png"]
}
},
{
"id": "5c7f58dabfd7366bb5d10a1981a8f0c8",
"name": "More Images",
"slug": "more-images",
"type": "Set",
"innerType": "ImageRef",
"required": false,
"editable": true,
"validations": {
"acceptedExtensions": ["jpeg", "jpg", "gif", "png"]
}
},
{
"id": "531c11fc5f483157f3b92d2f770c4708",
"name": "Price",
"slug": "price",
"type": "CommercePrice",
"required": true,
"editable": true
},
{
"id": "9c108e9ab4eb73124edb8f22f7a08359",
"name": "Compare-at price",
"slug": "compare-at-price",
"type": "CommercePrice",
"required": false,
"editable": true
},
{
"id": "5c7f58dabfd7366bb5d10a1981a8f0c8",
"name": "Download Files",
"slug": "download-files",
"type": "Set",
"innerType": "ExtFileRef",
"required": false,
"editable": true
},
{
"id": "354bb7367da9295d4739e0d05a52126a",
"name": "Width",
"slug": "width",
"type": "Number",
"required": false,
"editable": true,
"validations": {
"minValue": 0
}
},
{
"id": "144643aef8a426d6b4e7111aa4f1cab8",
"name": "Length",
"slug": "length",
"type": "Number",
"required": false,
"editable": true,
"validations": {
"minValue": 0
}
},
{
"id": "e59e1b062294a89f5cb82a31d1c0202b",
"name": "Height",
"slug": "height",
"type": "Number",
"required": false,
"editable": true,
"validations": {
"minValue": 0
}
},
{
"id": "24b2a42cecf1e0a9b2de5c04b435a7e9",
"name": "Weight",
"slug": "weight",
"type": "Number",
"required": false,
"editable": true,
"validations": {
"minValue": 0
}
},
{
"id": "83279ed67ac00d97a090bc41b5ecbc48",
"name": "SKU",
"slug": "sku",
"type": "PlainText",
"required": false,
"editable": true,
"validations": {
"singleLine": true
}
},
{
"id": "f18aa8a1e97b6793e35e1b0a01f44f8b",
"name": "Archived",
"slug": "_archived",
"type": "Bool",
"required": true,
"editable": true,
"default": false
},
{
"id": "3d82eb14dc89f78369b9524fb9e9efe9",
"name": "Draft",
"slug": "_draft",
"type": "Bool",
"required": true,
"editable": true,
"default": false
},
{
"id": "c42852c42a450f2a822c476881a2ce4d",
"name": "Created On",
"slug": "created-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "124cd1187dae4f3b74daa3eabc887b21",
"name": "Updated On",
"slug": "updated-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "c602c0c778e34d2d3fc5cd476963b609",
"name": "Published On",
"slug": "published-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "dd61161769cead958b33db76f39ba121",
"name": "Created By",
"slug": "created-by",
"type": "User",
"required": false,
"editable": false
},
{
"id": "2399eb1f8aff23efeb7742caae6dfd4a",
"name": "Updated By",
"slug": "updated-by",
"type": "User",
"required": false,
"editable": false
},
{
"id": "f08121cfe0dbe176046d7985f2321c35",
"name": "Published By",
"slug": "published-by",
"type": "User",
"required": false,
"editable": false
}
]
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | The unique identifier for the Collection |
lastUpdated |
Date | Date Collection was last updated |
createdOn |
Date | Date Collection was created |
name |
String | Name given to Collection |
slug |
String | Slug of Collection in |
singularName |
String | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields |
Array | See full Fields section |
Default Fields
Each collection has a number of fields that are always present. Some of these fields are editable and some of them cannot be changed by users.
FIELD NAME | FIELD TYPE | EDITABLE | DESCRIPTION |
---|---|---|---|
_archived |
Bool |
true |
Items set to archived will not be published |
_draft |
Bool |
true |
Items set to draft will not be published |
product |
ItemRef |
true |
Reference to the Product Item (Product Item ID) |
sku-values |
CommercePropValues |
true |
An Object with keys and values referenceing a Product Item’s sku-properties |
main-image |
ImageRef |
true |
Reference to the main SKU Item image |
more-images |
Set (ImageRef) |
true |
A Set of ImageRefs for the SKU Item |
price |
CommercePrice |
true |
Price object, consisting of a unit string and a value numder |
compare-at-price |
CommercePrice |
true |
Price Object |
download-files |
Set (ExtFileRef) |
true |
A Set of ExtFileRefs to specifiy downloadable files for the SKU |
width |
Number |
true |
The width of the SKU Item |
length |
Number |
true |
The length of the SKU Item |
height |
Number |
true |
The height of the SKU Item |
weight |
Number |
true |
The weight of the SKU Item |
sku |
PlainText |
true |
Custom SKU value |
created-on |
Date |
false |
Date when an SKU Item was originally created |
published-on |
Date |
false |
Date when the SKU Item was last published |
updated-on |
Date |
false |
Date when the SKU Item was last updated |
created-by |
User |
false |
User who created the SKU Item |
updated-by |
User |
false |
User who last updated the SKU Item |
published-by |
User |
false |
User who last published the SKU Item |
Categories Collection Model
{
"_id": "5e8402eb8a402e354bd469bc",
"name": "Categories",
"slug": "category",
"singularName": "Category",
"createdOn": "2020-04-01T02:56:43.638Z",
"lastUpdated": "2020-04-01T02:56:43.690Z",
"fields": [
{
"id": "a624247e3528136a36a8b1c5dbdc2632",
"name": "Name",
"slug": "name",
"type": "PlainText",
"required": true,
"editable": true,
"validations": {
"maxLength": 256
}
},
{
"id": "7c3fbdf76e7f2d6e894878fce6373e4e",
"name": "Slug",
"slug": "slug",
"type": "PlainText",
"required": true,
"editable": true,
"unique": true,
"validations": {
"maxLength": 256,
"pattern": {},
"messages": {
"pattern": "Must be alphanumerical and not contain any spaces or special characters",
"maxLength": "Must be less than 256 characters"
}
}
},
{
"id": "924a90e06131260ec1b4cde3fe04c78b",
"name": "Archived",
"slug": "_archived",
"type": "Bool",
"required": true,
"editable": true,
"default": false
},
{
"id": "e0de891b154790b2b5a7887c96e69673",
"name": "Draft",
"slug": "_draft",
"type": "Bool",
"required": true,
"editable": true,
"default": false
},
{
"id": "d005eb440992807385b5527d7ac3df43",
"name": "Created On",
"slug": "created-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "885952f7145ef136f1e33ee5718a203d",
"name": "Updated On",
"slug": "updated-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "54fb5afe9258d9d7eb4e7d105ad4ecf4",
"name": "Published On",
"slug": "published-on",
"type": "Date",
"required": false,
"editable": false
},
{
"id": "42426a9a2fae38908c0f24785fd947ee",
"name": "Created By",
"slug": "created-by",
"type": "User",
"required": false,
"editable": false
},
{
"id": "cb36015872421ae965b88d77ce3bbdaa",
"name": "Updated By",
"slug": "updated-by",
"type": "User",
"required": false,
"editable": false
},
{
"id": "a2741c16493270db634b2b6122dd8ebe",
"name": "Published By",
"slug": "published-by",
"type": "User",
"required": false,
"editable": false
}
]
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | The unique identifier for the Collection |
lastUpdated |
Date | Date Collection was last updated |
createdOn |
Date | Date Collection was created |
name |
String | Name given to Collection |
slug |
String | Slug of Collection in |
singularName |
String | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields |
Array | See full Fields section |
Default Fields
Each collection has a number of fields that are always present. Some of these fields are editable and some of them cannot be changed by users.
FIELD NAME | FIELD TYPE | EDITABLE | DESCRIPTION |
---|---|---|---|
_archived |
Bool |
true |
Items set to archived will not be published |
_draft |
Bool |
true |
Items set to draft will not be published |
created-on |
Date |
false |
Date when an Category Item was originally created |
published-on |
Date |
false |
Date when the Category Item was last published |
updated-on |
Date |
false |
Date when the Category Item was last updated |
created-by |
User |
false |
User who created the Category Item |
updated-by |
User |
false |
User who last updated the Category Item |
published-by |
User |
false |
User who last published the Category Item |
Create New Product and Default SKU
Adding a new Product
involves creating both a Product Item and a SKU Item, since a Product Item has to have, at minimum, a SKU Item. To create a new Product with multiple SKUs:
- Create the Product and Default SKU using this endpoint, making sure to add
sku-properties
in the product data. - You can’t add
sku-values
to the SKU yet, since there are no enum IDs created yet. When this endpoint returns, it will have IDs filled in for thesku-properties
enums. - With those IDs, update the default SKU with valid
sku-values
and create any additional SKUs (if needed), with validsku-values
. - You can also create the Product without
sku-properties
and add them in later. - If you add any
sku
properties, the default SKU will default to the first value of each option.
- Create the Product and Default SKU using this endpoint, making sure to add
will default the product type to
Advanced
. The product type is used to determine which Product and SKU fields are shown to users in theDesigner
and theEditor
. Setting it toAdvanced
ensures that all Product and SKU fields will be shown. The product type can be edited in theDesigner
or theEditor
.
Example request
curl 'https://api.webflow.com/sites/580e63fc8c9a982ac9b8b745/products' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
-X POST \
--data-binary $'{
"product": {
"fields": {
"name": "Cloak Of Invisibility",
"slug": "cloak-of-invisibility",
"sku-properties": [
{
"id": null,
"name": "Color",
"enum": [
{
"id": null,
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": null,
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": null,
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"shippable": true,
"_archived": false,
"_draft": false
}
},
"sku": {
"fields": {
"name": "Cloak Of Invisibility Color: Obsidian Black",
"slug": "cloak-of-invisibility-color-obsidian-black",
"product": "5e8518516e147040726cc415",
"sku-values": {},
"main-image": "https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"more-images": [
"https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg"
],
"price": {
"unit": "USD",
"value": 120000
},
"download-files": [
{
"id": null,
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"_archived": false,
"_draft": false
}
}
}'
// TODO - not implemented yet
Example JSON response
{
"product": {
"shippable": true,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "ff42fee0113744f693a764e3431a9cc2",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
},
"sku": {
"price": {
"unit": "USD",
"value": 120000
},
"_archived": false,
"_draft": false,
"sku-values": {},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
"more-images": [
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
}
],
"download-files": [
{
"id": "5ebb1676c3244c2c6ae18814",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"slug": "cloak-of-invisibility-color-obsidian-black-7",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-01T22:40:19.287Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:19.287Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5dd44c493543b37d5449b383",
"_id": "5e8518536e147040726cc416"
}
}
Request
POST /sites/:site_id/products
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the Site |
product |
The data of the Product you are adding |
sku |
The data of the SKU you are adding |
Response
PARAMETER | DESCRIPTION |
---|---|
product |
Product Item |
sku |
SKU Item |
Update Product
Updates an existing Product
- 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 theDesigner
and theEditor
. Setting it toAdvanced
ensures that all Product and SKU fields will be shown. The product type can be edited in theDesigner
or theEditor
.
Example request
curl 'https://api.webflow.com/sites/580e63fc8c9a982ac9b8b745/products/5e8518516e147040726cc415' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
-X PATCH \
--data-binary $'{
"fields": {
"shippable": false
}
}'
// TODO - not implemented yet
Example JSON response
{
"shippable": false,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "b6ccc1830db4b1babeb06a9ac5f6dd76",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
}
Request
PATCH /sites/:site_id/products/:product_id/skus/:sku_id
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the Site |
product_id |
Unique identifier for the Product you are modifying |
fields |
Product fields that need to be updated |
Response
Product Item
Get All Products For a Site
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 count
, limit
and offset
and total
values
represent Products only and do not include any SKUs.
Example request
curl https://api.webflow.com/sites/580e63fc8c9a982ac9b8b745/products?limit=1 \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"items": [
{
"product": {
"shippable": true,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "ff42fee0113744f693a764e3431a9cc2",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
},
"skus": [
{
"price": {
"unit": "USD",
"value": 120000
},
"_archived": false,
"_draft": false,
"sku-values": {},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
"more-images": [
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
}
],
"download-files": [
{
"id": "5ebb1676c3244c2c6ae18814",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"slug": "cloak-of-invisibility-color-obsidian-black-7",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-01T22:40:19.287Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:19.287Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5dd44c493543b37d5449b383",
"_id": "5e8518536e147040726cc416"
}
]
}
],
"count": 1,
"limit": 100,
"offset": 0,
"total": 12
}
Request
GET /sites/:site_id/products
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the Site |
product_id |
Unique identifier for the Product |
limit |
Maximum number of Items (Products) to be returned (max limit: 100) |
offset |
Offset used for pagination if collection has more than limit items |
Response
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
items |
Array | List of Item objects within the Collection. Contains product and skus keys |
count |
Number | Number of items (Products) returned |
limit |
Number | The limit specified in the request (default: 100) |
offset |
Number | The offset specified for pagination (default: 0) |
total |
Number | Total number of items (Products) in the collection |
Get Single Product and SKUs
Retrieve a single product by its id. All of its SKUs will also be retrieved. The count
, limit
, offset
and total
values in the response represent the Product only and do not include SKUs.
Example request
curl https://api.webflow.com/sites/580e63fc8c9a982ac9b8b745/products/5e8518516e147040726cc415 \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"items": [
{
"product": {
"shippable": true,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "ff42fee0113744f693a764e3431a9cc2",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
},
"skus": [
{
"price": {
"unit": "USD",
"value": 120000
},
"_archived": false,
"_draft": false,
"sku-values": {},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
"more-images": [
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
}
],
"download-files": [
{
"id": "5ebb1676c3244c2c6ae18814",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"slug": "cloak-of-invisibility-color-obsidian-black-7",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-01T22:40:19.287Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:19.287Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5dd44c493543b37d5449b383",
"_id": "5e8518536e147040726cc416"
}
]
}
],
"count": 1,
"limit": 100,
"offset": 0,
"total": 12
}
Request
GET /sites/:site_id/products/:product_id
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the Site |
product_id |
Unique identifier for the Product |
Response
PARAMETER | TYPE | DESCRIPTION |
---|---|---|
items |
Array | List of Item objects within the Collection. Item Object contains product and skus keys |
count |
Number | Number of items (Products) returned |
limit |
Number | The limit specified in the request (default: 100) |
offset |
Number | The offset specified for pagination (default: 0) |
total |
Number | Total number of items (Products) in the collection |
Create SKUs
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 theDesigner
and theEditor
. Setting it toAdvanced
ensures that all Product and SKU fields will be shown. The product type can be edited in theDesigner
or theEditor
.
Example request
curl 'https://api.webflow.com/sites/580e63fc8c9a982ac9b8b745/products/5e8518516e147040726cc415/skus' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
-X POST \
--data-binary $'{
skus: [
{
"fields": {
"name": "Cloak Of Invisibility Color: Smoke Grey",
"slug": "cloak-of-invisibility-color-smoke-grey",
"product": "5e8518516e147040726cc415",
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "c92a465a1298c95fd1cd7f4c1c96c2ba"
},
"main-image": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"price": {
"unit": "USD",
"value": 120000
},
"download-files": [
{
"id": null,
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"_archived": false,
"_draft": false
}
},
{
"fields": {
"name": "Cloak Of Invisibility Color: Forest Green",
"slug": "cloak-of-invisibility-color-forest-green",
"product": "5e8518516e147040726cc415",
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "ef9511c0b56cc11ff47c5669f65030b4"
},
"main-image": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg",
"price": {
"unit": "USD",
"value": 120000
},
"download-files": [
{
"id": null,
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"_archived": false,
"_draft": false
}
}
]
}'
// TODO - not implemented yet
Example JSON response
{
"skus": [
{
"slug": "cloak-of-invisibility-color-smoke-grey",
"_archived": false,
"_draft": false,
"price": {
"unit": "USD",
"value": 120000
},
"more-images": [],
"download-files": [
{
"id": "5ebb1945c3244c2c6ae18822",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "c92a465a1298c95fd1cd7f4c1c96c2ba"
},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Smoke Grey",
"main-image": {
"fileId": "5e8512181ae993035b15f315",
"file": {
"_id": "5e8512181ae993035b15f315",
"variants": [
{
"_id": "5e85121b1ae993035b15f316",
"origFileName": "external-content.duckduckgo.com-p-500.jpeg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg",
"format": "jpeg",
"size": 54068,
"width": 500,
"quality": 100,
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg"
}
],
"origFileName": "invisibility_cloak.jpg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"fileHash": "860b1b99ce90aa6c175bfcd9fd59fd42",
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"mimeType": "image/jpeg",
"size": 192263,
"width": 550,
"height": 550,
"database": "5e8402eb8a402e354bd469bb",
"createdOn": "2020-04-01T22:13:44.889Z",
"__v": 1,
"updatedOn": "2020-04-01T22:13:59.777Z"
},
"fileSize": 192263,
"url": "https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"alt": null
},
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-03T18:50:45.947Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-03T18:50:45.947Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5e8402eb8a402e354bd469be",
"_id": "5e8785855617d73f34627a93"
},
{
"_archived": false,
"_draft": false,
"price": {
"unit": "USD",
"value": 120000
},
"more-images": [],
"download-files": [
{
"id": "5ebb1945c3244c2c6ae18823",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "ef9511c0b56cc11ff47c5669f65030b4"
},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Forest Green",
"main-image": {
"fileId": "5e8512181ae993035b15f315",
"file": {
"_id": "5e8512181ae993035b15f315",
"variants": [
{
"_id": "5e85121b1ae993035b15f316",
"origFileName": "external-content.duckduckgo.com-p-500.jpeg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg",
"format": "jpeg",
"size": 54068,
"width": 500,
"quality": 100,
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg"
}
],
"origFileName": "invisibility_cloak.jpg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"fileHash": "860b1b99ce90aa6c175bfcd9fd59fd42",
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"mimeType": "image/jpeg",
"size": 192263,
"width": 550,
"height": 550,
"database": "5e8402eb8a402e354bd469bb",
"createdOn": "2020-04-01T22:13:44.889Z",
"__v": 1,
"updatedOn": "2020-04-01T22:13:59.777Z"
},
"fileSize": 192263,
"url": "https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"alt": null
},
"slug": "cloak-of-invisibility-color-forest-green",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-03T18:50:45.949Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-03T18:50:45.949Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5e8402eb8a402e354bd469be",
"_id": "5e8785855617d73f34627a94"
}
]
}
Request
POST /sites/:site_id/products/:product_id/skus
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the Site |
product_id |
Unique identifier for the Product you are adding SKUs to |
skus |
An array of the SKU data your are adding |
Response
PARAMETER | DESCRIPTION |
---|---|
skus |
Array of SKU Items |
Update SKU
Updates an existing SKU
- 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 theDesigner
and theEditor
. Setting it toAdvanced
ensures that all Product and SKU fields will be shown. The product type can be edited in theDesigner
or theEditor
.
Example request
curl 'https://api.webflow.com/sites/580e63fc8c9a982ac9b8b745/products/5e8518516e147040726cc415/skus/5e8512b932afb8035b330c46' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
-X PATCH \
--data-binary $'{
"fields": {
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "a9506da8e70a8b087f35a4094ec34a53"
}
}
}'
// TODO - not implemented yet
Example JSON response
{
"url": "/api/v1/collections/5e8402eb8a402e354bd469be/items/5e8512b932afb8035b330c46?target=staging",
"object": "updated_item",
"updated_item": {
"_archived": false,
"_draft": false,
"price": {
"unit": "USD",
"value": 120000
},
"more-images": [],
"download-files": [
{
"id": "5ebb1945c3244c2c6ae18823",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "a9506da8e70a8b087f35a4094ec34a53"
},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e8512181ae993035b15f315",
"file": {
"_id": "5e8512181ae993035b15f315",
"variants": [
{
"_id": "5e85121b1ae993035b15f316",
"origFileName": "external-content.duckduckgo.com-p-500.jpeg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg",
"format": "jpeg",
"size": 54068,
"width": 500,
"quality": 100,
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg"
}
],
"origFileName": "invisibility_cloak.jpg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"fileHash": "860b1b99ce90aa6c175bfcd9fd59fd42",
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"mimeType": "image/jpeg",
"size": 192263,
"width": 550,
"height": 550,
"database": "5e8402eb8a402e354bd469bb",
"createdOn": "2020-04-01T22:13:44.889Z",
"__v": 1,
"updatedOn": "2020-04-01T22:13:59.777Z"
},
"fileSize": 192263,
"url": "https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"alt": null
},
"slug": "cloak-of-invisibility-color-obsidian-black",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-03T18:50:45.931Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:16:25.146Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5e8402eb8a402e354bd469be",
"_id": "5e8512b932afb8035b330c46"
}
}
Request
PATCH /sites/:site_id/products/:product_id/skus/:sku_id
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the Site |
product_id |
Unique identifier for the Product you are modifying SKUs for |
sku_id |
Unique identifier for the SKU you are modifying |
fields |
SKU fields that need to be updated |
Response
SKU Item
Order Model
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
The order
object is comprised of the following fields and objects.
Field | Description |
---|---|
orderId |
The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status |
One of “pending”, “unfulfilled”, “fulfilled”, “disputed”, “dispute-lost”, or “refunded” |
comment |
A comment string for this order editable by API user (not used by Webflow). |
orderComment |
A comment that the customer left when making their order |
acceptedOn |
The ISO8601 timestamp that an order was placed. |
disputedOn |
If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn |
If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus |
If an order was disputed by the customer, then this key will be set with the dispute’s status. |
fulfilledOn |
If an order was marked as ‘fulfilled’, then this is the ISO8601 timestamp when that happened. |
refundedOn |
If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid |
This is the amount of money that a customer was charged, extracted from the Stripe charge. This is an object with three keys: value , unit and string . |
netAmount |
This is the amount of money that the site owner receives, extracted from the Stripe charge and minus all fees. This is an object with three keys: value , unit and string . |
requiresShipping |
A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider |
A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking |
A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo |
An object with the keys: fullName , and email . |
allAddresses |
All addresses provided by the customer during the ordering flow, with keys: type (“shipping” or “billing”), japanType (null, “kana”, or “kanji”), addressee , line1 , line2 , city , state , country , and postalCode . |
shippingAddress |
The shipping address associated with the order in the shape from allAddresses |
billingAddress |
The billing address associated with the order in the shape from allAddresses |
purchasedItems |
An array of all things that the customer purchased. |
purchasedItems.count |
Number of item purchased. |
purchasedItems.rowTotal |
Total price of this row. (count * price…) |
purchasedItems.productId |
String Product Id. |
purchasedItems.productName |
Name of the product. |
purchasedItems.productSlug |
Slug of the product. |
purchasedItems.variantId |
String Variant Id. (SKU) |
purchasedItems.variantName |
Name of the variant. (SKU) |
purchasedItems.variantSlug |
Slug of the variant. (SKU) |
purchasedItems.variantImage |
Image object for the variant. (SKU) |
purchasedItems.variantPrice |
Price object for the variant. (SKU) |
purchasedItems.height |
The height of the variant if provided, 0 otherwise |
purchasedItems.length |
The length of the variant if provided, 0 otherwise |
purchasedItems.width |
The width of the variant if provided, 0 otherwise |
purchasedItems.weight |
The weight of the variant if provided, 0 otherwise |
purchasedItemsCount |
The sum of all 'count’ fields in 'purchasedItems’ |
stripeDetails |
An object with various Stripe IDs, useful for linking into the stripe dashboard. |
stripeDetails.customerId |
String Stripe customer ID, or null. |
stripeDetails.chargeId |
String Stripe charge ID, or null. |
stripeDetails.disputeId |
String Stripe dispute ID, or null. |
stripeDetails.refundId |
String Stripe refund ID, or null. |
stripeCard |
Details on the card used to fulfill this order, if this order was finalized with Stripe. |
stripeCard.last4 |
The last 4 digits on the card. |
stripeCard.brand |
The card’s brand. Could be any of: “Visa”, “American Express”, “MasterCard”, “Discover”, “JCB”, “Diners Club”, or “Unknown” |
stripeCard.ownerName |
The name on the card. |
stripeCard.expires |
The card’s expiration date. An object with two integer fields: “month” and “year”. |
totals |
An object describing various pricing totals. |
totals.subtotal |
The sum of all line items. |
totals.extras |
An array of extra items, includes discounts, shipping, and taxes. |
totals.extras[].type |
The type of extra item this is. Can be “discount”, “discount-shipping”, “shipping”, or “tax”. |
totals.extras[].name |
A human-readable (but English) name for this extra charge. |
totals.extras[].description |
A human-readable (but English) description of this extra charge. |
totals.extras[].price |
How much this extra charge costs or is discounting the order by. |
totals.total |
The sum of all line items, and all extra charges. Should be the same as the 'customerCharged’ value above, but this one is calculated through math, and the other is extracted from Stripe. |
customData |
An array of additional inputs for custom order data gathering. Each object in the array represents an input with a name, and a textInput, textArea, or checkbox value. |
downloadFiles |
An array of downloadable file objects. Each object in the array has an id, name and URL for a downloadable file. |
Get All Orders
Example request
curl -X GET \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/orders \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
[
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount-shipping",
"name": "Free Shipping (SHIP4FREE)",
"description": "",
"price": {
"unit": "USD",
"value": -599,
"string": "-$ 5.99 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6023,
"string": "$60.23"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
]
Get a list of all orders created for a given site.
Request
GET /sites/:site_id/orders
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
Query String Parameters
PARAMETER | DESCRIPTION |
---|---|
status |
Filter orders in one of the following statuses: pending , refunded , dispute-lost , fulfilled , disputed , unfulfilled . |
limit |
Maximum number of orders to be returned (max limit: 100) |
offset |
Offset used for pagination if collection has more than limit orders |
Response
A JSON array of orders.
Get Order
Example request
curl -X GET \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/order/dfa-3f1 \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Retrieve a specific order placed for a site.
Request
GET /sites/:site_id/order/:order_id/
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
order_id |
Unique identifier for the order |
Response
A JSON order object.
Update Order
Example request
curl -X PATCH \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/order/dfa-3f1 \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'Content-Type: application/json' \
-H 'accept-version: 1.0.0' \
-d '{
"fields": {
"comment": "Example comment to myself",
"shippingProvider": "Shipping Company, Co.",
"shippingTracking": "tr00000000001"
}
}'
// TODO - not implemented yet
Example JSON response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "Example comment to myself",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": "Shipping Company, Co.",
"shippingTracking": "tr00000000001",
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
}
],
"total": {
"unit": "USD",
"value": 6622,
"string": "$66.22"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
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.
Request
PATCH /sites/:site_id/order/:order_id/
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
order_id |
Unique identifier for the order |
JSON Body Parameters
FIELD | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
fields |
Object | Yes | Required JSON object described below |
fields.comment |
String | No | Arbitrary data for your records |
fields.shippingProvider |
String | No | Company or method used to ship order |
fields.shippingTracking |
String | No | Tracking number for order shipment |
Response
A JSON order object.
Fulfill Order
Example request
curl -X POST \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/order/dfa-3f1/fulfill \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0' \
-H 'Content-Type: application/json' \
--data '{ "sendOrderFulfilledEmail": true }'
// TODO - not implemented yet
Example JSON response
{
"orderId": "dfa-3f1",
"status": "fulfilled",
"comment": "Example comment to myself",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": "2018-12-03T22:11:15.422Z",
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": "Shipping Company, Co.",
"shippingTracking": "tr00000000001",
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
}
],
"total": {
"unit": "USD",
"value": 6622,
"string": "$66.22"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Updates an order’s status to fulfilled
.
Request
POST /sites/:site_id/order/:order_id/fulfill
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
order_id |
Unique identifier for the order |
JSON Body Parameters
FIELD | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
sendOrderFulfilledEmail |
Boolean | No | Whether or not the Order Fulfilled email should be sent, default: false |
Response
A JSON order object.
Unfulfill Order
Example request
curl -X POST \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/order/dfa-3f1/unfulfill \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "Example comment to myself",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": "Shipping Company, Co.",
"shippingTracking": "tr00000000001",
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
}
],
"total": {
"unit": "USD",
"value": 6622,
"string": "$66.22"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Updates an order’s status to unfulfilled
.
Request
POST /sites/:site_id/order/:order_id/unfulfill
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
order_id |
Unique identifier for the order |
Response
A JSON order object.
Refund Order
Example request
curl -X POST \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/order/dfa-3f1/refund \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"orderId": "dfa-3f1",
"status": "refunded",
"comment": "Example comment to myself",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": "2018-12-03T22:13:51.067Z",
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": "Shipping Company, Co.",
"shippingTracking": "tr00000000001",
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": "re_1DdPfmKMjGA7k9mIU3Uzwulg",
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
}
],
"total": {
"unit": "USD",
"value": 6622,
"string": "$66.22"
}
},
"customData": [
{ "textInput": "(415) 123-4567", "name": "Telephone" },
{ "textArea": "Happy birthday Mom!", "name": "Gift note" },
{ "checkbox": true, "name": "Send as gift" }
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
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
.
Request
POST /sites/:site_id/order/:order_id/refund
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
order_id |
Unique identifier for the order |
Response
A JSON order object.
Item Inventory
Example request
curl -X GET \
https://api.webflow.com/collections/5bfedb42bab0ad90fa7dabfc/items/5bfedb42bab0ad90fa7dad39/inventory \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"_id": "5bfedb42bab0ad90fa7dad39",
"quantity": 100,
"inventoryType": "finite"
}
Get the current inventory levels for a particular SKU item.
Request
GET /collections/:collection_id/items/:item_id/inventory
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the SKUs collection |
item_id |
Unique identifier for a SKU item |
Response
Field | Type | Description |
---|---|---|
_id |
String | Unique identifier for a SKU item |
quantity |
Number | Total quantity of items remaining in inventory (if finite ) |
inventoryType |
String | infinite or finite |
Update Item Inventory
Example request
curl -X PATCH \
https://api.webflow.com/collections/5bfedb42bab0ad90fa7dabfc/items/5bfedb42bab0ad90fa7dad39/inventory \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'Content-Type: application/json' \
-H 'accept-version: 1.0.0' \
-d '{
"fields": {
"inventoryType": "finite",
"updateQuantity": "-17"
}
}'
// TODO - not implemented yet
Example JSON response
{
"_id": "5bfedb42bab0ad90fa7dad39",
"quantity": 83,
"inventoryType": "finite"
}
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.
Request
GET /collections/:collection_id/items/:item_id/inventory
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
collection_id |
Unique identifier for the SKUs collection |
item_id |
Unique identifier for a SKU item |
JSON Body Parameters
FIELD | TYPE | REQUIRED | DESCRIPTION |
---|---|---|---|
fields |
Object | Yes | Required JSON object described below |
fields.inventoryType |
String | Yes | Must be one of finite or infinite |
fields.quantity |
Non-negative Integer | If finite and updateQuantity not set |
Immediately sets quantity to this value |
fields.updateQuantity |
Integer | if finite and quantity not set |
Adds this quantity to currently store quantity. Can be negative. |
Response
Field | Type | Description |
---|---|---|
_id |
String | Unique identifier for a SKU item |
quantity |
Number | Total quantity of items remaining in inventory (if finite ) |
inventoryType |
String | infinite or finite |
Get Ecommerce Settings
Example request
curl -X GET \
https://api.webflow.com/sites/5bfedb42bab0ad90fa7dabe9/ecommerce/settings \
-H 'Authorization: Bearer cd0af3a33dcdcb573d9d2260020ba41c3bd67a2ff746417260f92eba4ac063a6' \
-H 'accept-version: 1.0.0'
// TODO - not implemented yet
Example JSON response
{
"createdOn": "2018-10-04T15:21:02.042Z",
"site": "5eb0b5583bf24e2d3a488969",
"defaultCurrency": "USD"
}
Retrieve ecommerce settings for a site.
Request
GET /sites/:site_id/ecommerce/settings
URL Parameters
PARAMETER | DESCRIPTION |
---|---|
None | - |
Response
PARAMETER | DESCRIPTION |
---|---|
createdOn |
Date that the site was created on |
site |
The id of the site being queried |
defaultCurrency |
The three-letter currency code of the site |
Webhooks
Model
{ "_id": "578d85cce0c47cd2865f4cf2",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": { "name": "Email Form" },
"lastUsed": "2016-09-06T21:12:22.142Z",
"createdOn": "2016-07-19T01:43:40.585Z"
}
FIELD | TYPE | DESCRIPTION |
---|---|---|
_id |
ObjectId | Unique identifier for field |
triggerType |
String | Which action the webhook is listening for. See Trigger Types |
triggerId |
ObjectId | Unique identifier for trigger |
site |
ObjectId | Unique identifier for site |
filter |
Object | See additional docs for specified triggerType on what values can be filtered on |
lastUsed |
Date | Date trigger was last used |
createdOn |
Date | Date trigger was created |
Trigger Types
TRIGGER | DESCRIPTION |
---|---|
form_submission |
Sends a JSON payload of submitted form data |
site_publish |
Sends { site: string, publishTime: Date } |
ecomm_new_order |
Sends an Ecommerce Order |
ecomm_order_changed |
Sends an Ecommerce Order |
ecomm_inventory_changed |
Sends an Ecommerce Inventory |
collection_item_created |
Sends an Item Model |
collection_item_changed |
Sends an Item Model |
collection_item_deleted |
Sends { deleted: 1, itemId: String } |
List Webhooks
Example request
curl https://api.webflow.com/sites/562ac0395358780a1f5e6fbd/webhooks \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <[ Webhook ]>
const webhooks = webflow.webhooks({ siteId: '582266e0cd48de0f0e3c6d8b' });
webhooks.then(hook => console.log(hook));
Example JSON response
[
{
"_id": "57ca0a9e418c504a6e1acbb6",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.148Z",
"createdOn": "2016-09-02T23:26:22.241Z"
},
{
"_id": "578d85cce0c47cd2865f4cf2",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.142Z",
"createdOn": "2016-07-19T01:43:40.585Z"
},
{
"_id": "578d85cce0c47cd2865f4cf3",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.192Z",
"createdOn": "2016-07-19T01:43:40.605Z"
}
]
Request
GET /sites/:site_id/webhooks
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
Response
[Webhooks]
Get Specific Webhook
Example request
curl https://api.webflow.com/sites/562ac0395358780a1f5e6fbd/webhooks/582266e0cd48de0f0e3c6d8b \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise <Webhook>
const webhook = webflow.webhook({ siteId: '562ac0395358780a1f5e6fbd', webhookId: '578d85cce0c47cd2865f4cf2' });
webhook.then(hook => console.log(hook));
Example JSON response
{
"_id": "578d85cce0c47cd2865f4cf2",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.142Z",
"createdOn": "2016-07-19T01:43:40.585Z"
}
- Get specific webhook
Request
GET /sites/:site_id/webhooks/:webhook_id
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
webhook_id |
Unique identifier for the webhook |
Response
Webhook
Create New Webhook
Example request
curl 'https://api.webflow.com/sites/562ac0395358780a1f5e6fbd/webhooks' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0' \
-H "Content-Type: application/json" \
--data-binary $'{"triggerType":"form_submission", "url":"https://api.mydomain.com/webhook"}'
const webflow = new Webflow({ token: api_token });
// Promise <Webhook>
const webhook = webflow.createWebhook({
siteId: '562ac0395358780a1f5e6fbd',
triggerType: 'form_submission',
url: 'https://api.mydomain.com/webhook',
});
webhook.then(hook => console.log(hook));
Example JSON response
{
"_id": "582266e0cd48de0f0e3c6d8b",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"createdOn": "2016-11-08T23:59:28.572Z"
}
- Create a new webhook
Request
POST /sites/:site_id/webhooks
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
triggerType |
Which action the webhook is listening for. See Trigger Types |
url |
The https URL on your server the webhook will send a request to when the webhook is triggered |
filter |
Optional filter for selecting which events you want webhooks to be triggered for. |
Response
Webhook
Remove Webhook
Example request
curl -X DELETE 'https://api.webflow.com/sites/562ac0395358780a1f5e6fbd/webhooks/582266e0cd48de0f0e3c6d8b' \
-H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
-H 'accept-version: 1.0.0'
const webflow = new Webflow({ token: api_token });
// Promise < { deleted: Number } >
const deletedHook = webflow.removeWebhook({ siteId: '562ac0395358780a1f5e6fbd', webhookId: '582266e0cd48de0f0e3c6d8b' })
deletedHook.then(x => console.log(x))
Example JSON response
{
"deleted": 1
}
- Removes a specific webhook
Request
DELETE /sites/:site_id/webhooks/:webhook_id
PARAMETER | DESCRIPTION |
---|---|
site_id |
Unique identifier for the site |
webhook_id |
Unique identifier for the webhook |
Response
PARAMETER | DESCRIPTION |
---|---|
deleted |
Number of items deleted |
Errors
Sample error response
{
"msg": "Cannot access resource",
"code": 401,
"name": "Unauthorized",
"path": "/sites/invalid_site",
"err": "Unauthorized: Cannot access resource"
}
Error Response Format
PARAMETER | DESCRIPTION |
---|---|
code |
HTTP error code |
msg |
Error message |
name |
Name of error |
path |
Path of request resulting in error |
err |
Full error string |
problems | Array of errors (commonly on ValidationErrors ) |
Standard Errors
The following are the standard API codes returned by our API.
STATUS | NAME | DESCRIPTION |
---|---|---|
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
400 | InvalidAPIVersion | Requested an invalid API version |
400 | UnsupportedVersion | Requested an API version that in unsupported by the requested route |
400 | NotImplemented | This feature is not currently implemented |
400 | ValidationError | Validation failure (see problems field in the response) |
400 | Conflict | Request has a conflict with existing data. |
401 | Unauthorized | Provided access token is invalid or does not have access to requested resource |
404 | NotFound | Requested resource not found |
429 | RateLimit | The rate limit of the provided access_token has been reached. Please have your application respect the X-RateLimit-Remaining header we include on API responses. |
500 | ServerError | We had a problem with our server. Try again later. |
400 | UnknownError | An error occurred which is not enumerated here, but is not a server error. |
Rate Limits
The default rate limit is 60 requests / minute. Every request has two rate limit related headers on it:
X-RateLimit-Remaining
- Contains the number of available requests remaining in the current minute
X-RateLimit-Limit
- Contains your current overall rate limit per minute
Example rate limit error
{
"msg": "Rate limit hit",
"code": 429,
"name": "RateLimit",
"path": "/sites",
"err": "RateLimit: Rate limit hit"
}
Exceeding Rate Limits
To protect the quality of our service, exceeding your rate limit will result in a HTTP 429 error requesting you slow down the rate you are making requests at.
If you are seeing these errors, you should ensure your application is built to limit the rate of requests it is performing. It could, for example, be triggered by polling aggressively when waiting for resources to be created (instead of using webhooks) or making a large number of highly concurrent API calls.
API Versions
In addition to an access token, requests also must specify which API version they should use.
curl https://api.webflow.com/info \
-H 'Accept-Version: 1.0.0'
// The package version will default to the latest API version at release:
const webflow = new Webflow({ token: api_token });
// You can also specify an API version as the 'version' option:
const webflow = new Webflow({ token: api_token, version: '1.0.0' });
HTTP Header
The version can be specified with the Accept-Version
header
Querystring
curl https://api.webflow.com/info?api_version=1.0.0
Additionally, the version can be specified in the query string as api_version
Semver
Semver (Semantic Versioning)
Changelog
March 31, 2020
- Separated Ecommerce into collections, orders and inventory
- Added Collection Models for Products, SKUs and Categories
- Added Product Create endpoint
February 2, 2017
- Added endpoint for publishing a site
- Added endpoint for querying a site’s custom domains
November 30, 2016
Initial release