TOC

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.

CMS Structure

Changelog

June 21, 2022

  • API Version Defaults to Current Version - We no longer require `accept-version` or `api_version` to be passed in with every API request. If one is not provided, we'll use the current API version. Already have code using version? No worries! That still works just fine too.
  • Added redirect_uri to OAuth Docs - We've always validated the `redirect_uri` when used, but it wasn't documented... Until now! Learn more about how to use `redirect_uri` in our [OAuth section](#request-access-token).

May 27, 2022

  • Item Unpublish API - We've launched a new feature in Webflow to [unpublish individual items](https://webflow.com/feature/remove-cms-content-without-publishing-your-entire-site) and we've created the APIs to go with it! You can now use the [Unpublish API](#remove-item) in code to manage content state. _Note: If you're using the [Webflow Node.js SDK](https://github.com/webflow/js-webflow-api), then it requires an update to `0.7.2`_.
  • Item Unpublish Webhook - The `collection_item_unpublished` webhook has been added so you can be notified when an unpublish is triggered.
  • Site Publish Webhook - The `site_publish` webhook now includes `domains` and `publishedBy`, so you don't have to wonder anymore who and what was published.
  • Update Product Docs Corrected - There was an extra route in the `Update Product` docs that sneaked in long ago, but we caught it and it's fixed now. Please let us know if you see others!

May 12, 2022

  • Webflow SDK Update to 0.7.2 - Our [Webflow Node.js SDK](https://github.com/webflow/js-webflow-api) has been updated to `0.7.2`. This update includes a critical update to [DELETE](https://github.com/webflow/js-webflow-api/pull/55) calls that take in a querystring. Learn more about the release on [GitHub](https://github.com/webflow/js-webflow-api/releases).

March 31, 2022

  • Webflow SDK Update to 0.7.1 - Our [Webflow Node.js SDK](https://github.com/webflow/js-webflow-api) has been updated to `0.7.1`. This is a big update and includes updates to all dependencies, [fixed typings](https://github.com/webflow/js-webflow-api/pull/49), and an [error message typo for item()](https://github.com/webflow/js-webflow-api/pull/35). Learn more about the release on [GitHub](https://github.com/webflow/js-webflow-api/releases).

Archive

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

Getting Started

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.

API Keys

In addition to the authorization code grant, it also is possible to get access_tokens for personal applications.

If you are developing a private integration to Webflow and you are only interacting with your own account, there is a simplified process for getting an access_token without having to register and OAuth application and implement the full authorization code grant flow. You simply can generate an API key (equivalent to an access_token) from the Webflow dashboard.

API keys can be generated on a per-site basis.

Site API Keys

To generate an API key for a site, open the site in the dashboard and navigate to the "Settings" pane. There is a section titled "API Access", where you can generate a new API key.

HTTP Header

Token In 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.

Token In Query String

curl https://api.webflow.com/info?access_token=d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32

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.

Version in Header

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

Version in Query String

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)

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.

OAuth

OAuth2 is a defined authorization spec that we utilize to enabled 3rd party applications to integrate with Webflow. Before interacting with the API, developers should register their applications where a client_id and client_secret will be generated.

Webflow supports the defined authorization code grant so applications built to integrate with Webflow should implement the flow as defined below whereby first retrieving an authorization code (after a user approves the request) which then will be exchanged for an access token to be used on all subsequent requests.

OAuth Applications

Register an Application

Applications may be registered to a user, Team, or Workspace.

User

To register an application as a user, open the integrations tab of account settings and click the "Register New Application" button.

Team or Workspace

To register an application as a Team or Workspace, open the settings page for your Team or Workspace by clicking on it in the dashboard overview page. Then navigate to the integrations section and click the "Register New Application" button.


The following fields are required for registration:

FIELDS DESCRIPTION
Application Name The name of the application that will appear when someone authorizes your application.
Application Description A short description that will appear to users on the authorization request page.
Redirect URL The URL we redirect users to after they approve / deny the authorization request. URL must begin with https and served with SSL.
Application Homepage A link to the homepage of your application.

Upon registration you should see the client_id and client_secret tokens for your application. You will need these in order to create authorizations for users with your application.

User Authorization

Direct a user to the authorization URL with the correct parameters specified. When they accept or deny the authorization request, the user will be redirected back to the redirect_url provided during OAuth Application setup.

Request

GET https://webflow.com/oauth/authorize

PARAMETER DESCRIPTION
client_id Unique ID for your application. Can be found in the dashboard
response_type This value should always should be code
redirect_uri The URI to redirect back to (must match what's used in the OAuth App settings)
state A token value provided by your application for CSRF protection

The final URL should look like this, but substituted with your own client_id and optional state parameters:

https://webflow.com/oauth/authorize/?client_id=8151ef1a5613fe2340e62395008595d23b31e15edfd0c5b1a49ad3560d5ca16b&response_type=code


You receive the response to the authorization request via the redirect URL you specify during application setup and can be updated in the dashboard

Response

PARAMETER DESCRIPTION
code Authorization code used to retrieve an access_token for the user. Can only be used once.
state Same as the original value if provided.

Error Response

PARAMETER DESCRIPTION
state Same as the original value if provided.
error An error code specifying which error occured.
error_description Human readable description of the error that occured.

Request Access Token

curl https://api.webflow.com/oauth/access_token \
    -d client_id="8151ef1a5613fe2340e62395008595d23b31e15edfd0c5b1a49ad3560d5ca16b" \
    -d client_secret="94cd4c5ac02604185a4ce2bca3f46c14c60ed9c5df86f76b43089997d8febfcf" \
    -d code="c64a5accd53542c485e97a90e287ac18f522ec828947696fb13feb5255e3c42f" \
    -d grant_type="authorization_code" \
{
  "token_type": "bearer",
  "access_token": "79f75b59455167fdb72d3f777409d390a3a93c048539ec6ddc34327cb312627e"
}

Once the code has been retrieved from the redirect URL, to finalize the authorization, your application must request an access_token.

The access_token request should be made as soon as possible after authorization as unconfirmed authorizations are only valid for 30 minutes.

Request

POST https://api.webflow.com/oauth/access_token

PARAMETER DESCRIPTION
client_id Unique ID for your application. Can be found in the dashboard
client_secret Private value unique to your application. Can be found in the dashboard
code Authorization code used to retrieve an access_token for the user. Can only be used once.
grant_type Always should be authorization_code
redirect_uri This URI must match the originally submitted URI (if one was sent)

Response

PARAMETER DESCRIPTION
token_type Always will be "bearer"
access_token Token to use when making API requests on behalf of a user

Error Response

PARAMETER DESCRIPTION
error An error code specifying which error occured.
error_description Human readable description of the error that occured.

Revoke Authorization

curl https://api.webflow.com/oauth/revoke_authorization \
    -d client_id="8151ef1a5613fe2340e62395008595d23b31e15edfd0c5b1a49ad3560d5ca16b" \
    -d client_secret="94cd4c5ac02604185a4ce2bca3f46c14c60ed9c5df86f76b43089997d8febfcf" \
    -d access_token="79f75b59455167fdb72d3f777409d390a3a93c048539ec6ddc34327cb312627e" \

Request

POST https://api.webflow.com/oauth/revoke_authorization

PARAMETER DESCRIPTION
client_id Unique ID for your application. Can be found in the dashboard
client_secret Private value unique to your application. Can be found in the dashboard
access_token Token received on a previous authorization flow

Revoke Response

{
  "didRevoke": true
}

Response

PARAMETER DESCRIPTION
didRevoke True on successful revocation

Error Response

PARAMETER DESCRIPTION
error An error code specifying which error occured.
error_description Human readable description of the error that occured.

OAuth Errors

Authorization Errors

Errors returned in the querystring to the redirect URL setup for your application

Error Code Description
invalid_request
unsupported_response_type
access_denied

Access code errors

Errors returned by the API for the POST /oauth/access_token endpoint

Error Code Description
unsupported_grant_type grant_type should always be specified as the string: authorization_code
invalid_client No OAuth application found matching the provided credentials
invalid_grant Provided code was invalid

Meta

Current Authorized User

Basic information about the current authorized user.

Request

GET /user

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/user \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/user', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/user", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/user") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/user" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/user"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version

Response Example

{ "user": { "_id": "545bbecb7bdd6769632504a7", "email": "some@email.com", "firstName": "Some", "lastName": "One" } }

Response

NameTypeDescription
_idstringThe unique id of the user
emailstringThe user's email address
firstNamestringThe user's first name
lastNamestringThe user's last name

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Current Authorization Info

Basic information about the authorization currently being used.

Request

GET /info

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/info \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/info', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/info", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/info") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/info" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/info"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version

Response Example

{ "_id": "55818d58616600637b9a5786", "createdOn": "2016-10-03T23:12:00.755Z", "grantType": "authorization_code", "lastUsed": "2016-10-10T21:41:12.736Z", "sites": [], "orgs": [ "551ad253f0a9c0686f71ed08" ], "workspaces": [], "users": [ "545bbecb7bdd6769632504a7" ], "rateLimit": 60, "status": "confirmed", "application": { "_id": "55131cd036c09f7d07883dfc", "description": "OAuth Testing Application", "homepage": "https://webflow.com", "name": "Test App", "owner": "545bbecb7bdd6769632504a7", "ownerType": "Person" } }

Response

NameTypeDescription
_idstring
createdOnstring
grantTypestring
lastUsedstring
sites[Site]
orgs[string]
workspaces[string]
users[string]
rateLimitinteger
statusstring
applicationApplication

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Sites

List Sites

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

Request

GET /sites

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version

Response Example

[ { "_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" } ]

Response

NameTypeDescription
_idstringUnique identifier for site
createdOnstringDate the site was created
namestringName given to site
shortNamestringSlugified version of name
lastPublishedstringDate site was last published
previewUrlstringURL of a generated image for the given site
timezonestringSite timezone set under Site Settings

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Get Site

Get a site by site id

Request

GET /sites/:site_id

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site

Response Example

{ "_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" }

Response

NameTypeDescription
_idstringUnique identifier for site
createdOnstringDate the site was created
namestringName given to site
shortNamestringSlugified version of name
lastPublishedstringDate site was last published
previewUrlstringURL of a generated image for the given site
timezonestringSite timezone set under Site Settings

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Publish Site

Publish a site

Request

POST /sites/:site_id/publish

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/publish \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "domains": [ "test-api-domain.com" ] }'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/publish', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: {domains: ['test-api-domain.com']}, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"domains\":[\"test-api-domain.com\"]}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/publish", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/publish") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"domains\":[\"test-api-domain.com\"]}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/publish" payload := strings.NewReader("{\"domains\":[\"test-api-domain.com\"]}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/publish"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"domains\":[\"test-api-domain.com\"]}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
domainsbody[string]trueAn array of domains that should be published

Response Example

{ "queued": true }

Response

NameTypeDescription
queuedbooleanIndicates if the site has been queued for publish

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Domains

List Domains

List of all custom domains added to a given site

Request

GET /sites/:site_id/domains

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/domains", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site

Response Example

[ { "_id": "589a331aa51e760df7ccb89d", "name": "test-api-domain.com" }, { "_id": "589a331aa51e760df7ccb89e", "name": "www.test-api-domain.com" } ]

Response

NameTypeDescription
_idstringUnique identifier for domain
namestringThe domain name

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Collections

List Collections

List of all collections in a given site

Request

GET /sites/:site_id/collections

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/collections", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site

Response Example

[ { "_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" } ]

Response

NameTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “post” if the Collection is called “Posts”)
fields[Field]Custom fields

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Get Collection

Get a collection by collection id

Request

GET /sites/collections/:collection_id

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/collections/580e63fc8c9a982ac9b8b745 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/collections/580e63fc8c9a982ac9b8b745', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/collections/580e63fc8c9a982ac9b8b745", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/collections/580e63fc8c9a982ac9b8b745") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/collections/580e63fc8c9a982ac9b8b745" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/collections/580e63fc8c9a982ac9b8b745"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection

Response Example

{ "_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" } ] }

Response

NameTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “post” if the Collection is called “Posts”)
fields[Field]Custom fields

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Items

Get Collection Items

Get all items for a collection

Request

GET /collections/:collection_id/items

Parameters

Shell Example

curl --request GET \ --url 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?offset=0&limit=100' \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items', qs: {offset: '0', limit: '100'}, headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/collections/580e63fc8c9a982ac9b8b745/items?offset=0&limit=100", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?offset=0&limit=100") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?offset=0&limit=100" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?offset=0&limit=100"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
offsetquerynumberfalseOffset used for pagination if the results have more than limit records
limitquerynumberfalseMaximum number of records to be returned (max limit: 100)

Response Example

{ "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 }

Response

NameTypeDescription
items[Item]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
countnumberNumber of items returned
limitnumberThe limit specified in the request
offsetnumberThe offset specified for pagination
totalnumberTotal number of items in the collection

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Create Collection Item

Create a new collection item To upload a new image set the image URL to the corresponding item's field. Collection items that reuse images previously uploaded can just reference their fileId property.

Request

POST /collections/:collection_id/items

Parameters

Shell Example

curl --request POST \ --url 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?live=true' \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "fields": { "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" } }'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items', qs: {live: 'true'}, headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { fields: { 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' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"fields\":{\"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\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("POST", "/collections/580e63fc8c9a982ac9b8b745/items?live=true", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?live=true") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"fields\":{\"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\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?live=true" payload := strings.NewReader("{\"fields\":{\"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\"}}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?live=true"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"fields\":{\"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\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
livequerybooleanfalseBoolean indicating if the item should be published/unpublished to/from the live site
fieldsbodyFieldfalse

Response Example

{ "_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" }

Response

NameTypeDescription
_archivedbooleanBoolean determining if the Item is set to archived
_draftbooleanBoolean determining if the Item is set to draft
_idstringUnique identifier for the Item
_cidstringUnique identifier for the Collection the Item belongs within
namestringName given to the Item
slugstringURL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug.

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Update Collection Item

Update an existing collection item. To upload a new image set the image URL to the corresponding item's field. Collection items that reuse images previously uploaded can just reference their fileId property.

Request

PUT /collections/:collection_id/items/:item_id

Parameters

Shell Example

curl --request PUT \ --url 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true' \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "fields": { "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" } }'

Javascript Example

const request = require('request'); const options = { method: 'PUT', url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754', qs: {live: 'true'}, headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { fields: { 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' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"fields\":{\"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\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("PUT", "/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Put.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"fields\":{\"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\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true" payload := strings.NewReader("{\"fields\":{\"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\"}}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true"); var request = new RestRequest(Method.PUT); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"fields\":{\"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\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
item_idpathstringtrueUnique identifier for and Item
livequerybooleanfalseBoolean indicating if the item should be published/unpublished to/from the live site
fieldsbodyFieldtrue

Response Example

{ "_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" }

Response

NameTypeDescription
_archivedbooleanBoolean determining if the Item is set to archived
_draftbooleanBoolean determining if the Item is set to draft
_idstringUnique identifier for the Item
_cidstringUnique identifier for the Collection the Item belongs within
namestringName given to the Item
slugstringURL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug.

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Patch Collection Item

Update only the fields that need to be change. To upload a new image set the image URL to the corresponding item's field. Collection items that reuse images previously uploaded can just reference their fileId property.

Request

PATCH /collections/:collection_id/items/:item_id

Parameters

Shell Example

curl --request PATCH \ --url 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true' \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "fields": { "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" } }'

Javascript Example

const request = require('request'); const options = { method: 'PATCH', url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754', qs: {live: 'true'}, headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { fields: { 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' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"fields\":{\"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\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("PATCH", "/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"fields\":{\"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\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true" payload := strings.NewReader("{\"fields\":{\"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\"}}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"fields\":{\"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\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
item_idpathstringtrueUnique identifier for and Item
livequerybooleanfalseBoolean indicating if the item should be published/unpublished to/from the live site
fieldsbodyFieldfalse

Response Example

{ "_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" }

Response

NameTypeDescription
_archivedbooleanBoolean determining if the Item is set to archived
_draftbooleanBoolean determining if the Item is set to draft
_idstringUnique identifier for the Item
_cidstringUnique identifier for the Collection the Item belongs within
namestringName given to the Item
slugstringURL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug.

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Get Collection Item

Get an item in a collection

Request

GET /collections/:collection_id/items/:item_id

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
item_idpathstringtrueUnique identifier for and Item

Response Example

{ "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 }

Response

NameTypeDescription
items[Item]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
countnumberNumber of items returned
limitnumberThe limit specified in the request
offsetnumberThe offset specified for pagination
totalnumberTotal number of items in the collection

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Remove Collection Item

Remove an item in a collection When removing CMS items with the API, the default behavior deletes the item from your Data Manager in the Designer or the Editor. However, it is possible to only remove the item from the published site. This will set the item in the Designer or Editor to a status of Draft.

Request

DELETE /collections/:collection_id/items/:item_id

Parameters

Shell Example

curl --request DELETE \ --url 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true' \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'DELETE', url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754', qs: {live: 'true'}, headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("DELETE", "/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Delete.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754?live=true"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
item_idpathstringtrueUnique identifier for and Item
livequerybooleanfalseBoolean indicating if the item should be published/unpublished to/from the live site

Response Example

{ "deleted": 1 }

Response

NameTypeDescription
deletednumberNumber of items deleted

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Products & SKUs

List Products & SKUs

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.

Request

GET /sites/:site_id/products

Parameters

Shell Example

curl --request GET \ --url 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products?offset=0&limit=100' \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products', qs: {offset: '0', limit: '100'}, headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/products?offset=0&limit=100", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products?offset=0&limit=100") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products?offset=0&limit=100" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products?offset=0&limit=100"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
offsetquerynumberfalseOffset used for pagination if the results have more than limit records
limitquerynumberfalseMaximum number of records to be returned (max limit: 100)

Response Example

{ "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 }

Response

NameTypeDescription
items[Product]The Product object
countnumberNumber of items returned
limitnumberThe limit specified in the request
offsetnumberThe offset specified for pagination
totalnumberTotal number of items in the collection

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Create Product & 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, you must: - 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 the `sku-properties` enums. - With those IDs, update the default SKU with valid `sku-values` and create any additional SKUs (if needed), with valid `sku-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. Upon creation, the default product type will be `Advanced`. The product type is used to determine which Product and SKU fields are shown to users in the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.

Request

POST /sites/:site_id/products

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "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" } }'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { 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' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"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\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/products", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"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\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products" payload := strings.NewReader("{\"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\"}}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"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\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
productbodyProductfalse
skubodySKUfalse

Response Example

{ "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" } }

Response

NameTypeDescription
productProductThe Product object
skuSKUThe SKU object

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Get 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.

Request

GET /sites/:site_id/products/:product_id

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
product_idpathstringtrueUnique identifier for a Product

Response Example

{ "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 }

Response

NameTypeDescription
items[Product]The Product object
countnumberNumber of items returned
limitnumberThe limit specified in the request
offsetnumberThe offset specified for pagination
totalnumberTotal number of items in the collection

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

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 the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.

Request

PATCH /sites/:site_id/products/:product_id

Parameters

Shell Example

curl --request PATCH \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745 \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "fields": { "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" } }'

Javascript Example

const request = require('request'); const options = { method: 'PATCH', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { fields: { 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' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"fields\":{\"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\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("PATCH", "/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"fields\":{\"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\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745" payload := strings.NewReader("{\"fields\":{\"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\"}}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"fields\":{\"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\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
product_idpathstringtrueUnique identifier for a Product
fieldsbodyFieldfalse

Response Example

{ "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" }

Response

NameTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “product” if the Collection is called “Product”)
fields[Field]Custom fields

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Create SKU

Create additional SKUs to cover every variant of your Product. The Default SKU already counts as one of the variants. - Creating additional SKUs will set the product type to `Advanced` for the product associated with the SKUs. The product type is used to determine which Product and SKU fields are shown to users in the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.

Request

POST /sites/:site_id/products/:product_id/skus

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "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" } ] }'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { 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' } ] }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"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\"}]}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"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\"}]}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus" payload := strings.NewReader("{\"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\"}]}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"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\"}]}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
product_idpathstringtrueUnique identifier for a Product
skusbody[SKU]falseAn array of the SKU data your are adding

Response Example

{ "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" } ] }

Response

NameTypeDescription
skus[SKU]The SKU object

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

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 the `Designer` and the `Editor`. Setting it to `Advanced` ensures that all Product and SKU fields will be shown. The product type can be edited in the `Designer` or the `Editor`.

Request

PATCH /sites/:site_id/products/:product_id/skus/:sku_id

Parameters

Shell Example

curl --request PATCH \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus/5e8518516e147040726cc415 \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "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" } }'

Javascript Example

const request = require('request'); const options = { method: 'PATCH', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus/5e8518516e147040726cc415', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { 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' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"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\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("PATCH", "/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus/5e8518516e147040726cc415", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus/5e8518516e147040726cc415") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"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\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus/5e8518516e147040726cc415" payload := strings.NewReader("{\"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\"}}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745/skus/5e8518516e147040726cc415"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"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\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
product_idpathstringtrueUnique identifier for a Product
sku_idpathstringtrueUnique identifier for a SKU
skubodySKUfalse

Response Example

{ "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" }

Response

NameTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “sku” if the Collection is called “SKU”)
fields[Field]Custom fields

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Orders

List Orders

List all orders created for a given site.

Request

GET /sites/:site_id/orders

Parameters

Shell Example

curl --request GET \ --url 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders?status=SOME_STRING_VALUE&offset=0&limit=100' \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders', qs: {status: 'SOME_STRING_VALUE', offset: '0', limit: '100'}, headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/orders?status=SOME_STRING_VALUE&offset=0&limit=100", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders?status=SOME_STRING_VALUE&offset=0&limit=100") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders?status=SOME_STRING_VALUE&offset=0&limit=100" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders?status=SOME_STRING_VALUE&offset=0&limit=100"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
statusquerystringfalseFilter the orders by status
offsetquerynumberfalseOffset used for pagination if the results have more than limit records
limitquerynumberfalseMaximum number of records to be returned (max limit: 100)

Response Example

[ { "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" } ] } ]

Response

NameTypeDescription
orderIdstringThe 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.
statusstringString enumerator for string
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmountThe sum of all line items.
netAmountOrderAmountThe sum of all line items.
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfoAn object with the keys `fullName` and `email`.
allAddresses[OrderAddress]A customer address
shippingAddressOrderAddressA customer address
billingAddressOrderAddressA customer address
purchasedItems[OrderPurchasedItem]An item that was purchased
stripeDetailsStripeDetailsAn object with various Stripe IDs, useful for linking into the stripe dashboard.
stripeCardStripeCardDetails on the card used to fulfill this order, if this order was finalized with Stripe.
totalsOrderTotalsAn object describing various pricing totals.
customData[object]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[OrderDownloadedFile]

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Get Order

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.

Request

GET /sites/:site_id/orders/:order_id

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
order_idpathstringtrueUnique identifier for an Order

Response Example

{ "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" } ] }

Response

NameTypeDescription
orderIdstringThe 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.
statusstringString enumerator for string
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmountThe sum of all line items.
netAmountOrderAmountThe sum of all line items.
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfoAn object with the keys `fullName` and `email`.
allAddresses[OrderAddress]A customer address
shippingAddressOrderAddressA customer address
billingAddressOrderAddressA customer address
purchasedItems[OrderPurchasedItem]An item that was purchased
stripeDetailsStripeDetailsAn object with various Stripe IDs, useful for linking into the stripe dashboard.
stripeCardStripeCardDetails on the card used to fulfill this order, if this order was finalized with Stripe.
totalsOrderTotalsAn object describing various pricing totals.
customData[object]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[OrderDownloadedFile]

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Update Order

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/orders/:order_id

Parameters

Shell Example

curl --request PATCH \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415 \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "fields": { "comment": "Example comment to myself", "shippingProvider": "Shipping Company, Co.", "shippingTracking": "tr00000000001" } }'

Javascript Example

const request = require('request'); const options = { method: 'PATCH', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { fields: { comment: 'Example comment to myself', shippingProvider: 'Shipping Company, Co.', shippingTracking: 'tr00000000001' } }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"fields\":{\"comment\":\"Example comment to myself\",\"shippingProvider\":\"Shipping Company, Co.\",\"shippingTracking\":\"tr00000000001\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("PATCH", "/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"fields\":{\"comment\":\"Example comment to myself\",\"shippingProvider\":\"Shipping Company, Co.\",\"shippingTracking\":\"tr00000000001\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415" payload := strings.NewReader("{\"fields\":{\"comment\":\"Example comment to myself\",\"shippingProvider\":\"Shipping Company, Co.\",\"shippingTracking\":\"tr00000000001\"}}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"fields\":{\"comment\":\"Example comment to myself\",\"shippingProvider\":\"Shipping Company, Co.\",\"shippingTracking\":\"tr00000000001\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
order_idpathstringtrueUnique identifier for an Order
fieldsbodyobjectfalse

Response Example

{ "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" } ] }

Response

NameTypeDescription
orderIdstringThe 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.
statusstringString enumerator for string
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmountThe sum of all line items.
netAmountOrderAmountThe sum of all line items.
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfoAn object with the keys `fullName` and `email`.
allAddresses[OrderAddress]A customer address
shippingAddressOrderAddressA customer address
billingAddressOrderAddressA customer address
purchasedItems[OrderPurchasedItem]An item that was purchased
stripeDetailsStripeDetailsAn object with various Stripe IDs, useful for linking into the stripe dashboard.
stripeCardStripeCardDetails on the card used to fulfill this order, if this order was finalized with Stripe.
totalsOrderTotalsAn object describing various pricing totals.
customData[object]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[OrderDownloadedFile]

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Fulfill Order

Updates an order's status to fulfilled

Request

POST /sites/:site_id/orders/:order_id/fulfill

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/fulfill \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "sendOrderFulfilledEmail": false }'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/fulfill', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: {sendOrderFulfilledEmail: false}, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"sendOrderFulfilledEmail\":false}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/fulfill", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/fulfill") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"sendOrderFulfilledEmail\":false}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/fulfill" payload := strings.NewReader("{\"sendOrderFulfilledEmail\":false}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/fulfill"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"sendOrderFulfilledEmail\":false}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
order_idpathstringtrueUnique identifier for an Order
sendOrderFulfilledEmailbodybooleanfalseWhether or not the Order Fulfilled email should be sent

Response Example

{ "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" } ] }

Response

NameTypeDescription
orderIdstringThe 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.
statusstringString enumerator for string
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmountThe sum of all line items.
netAmountOrderAmountThe sum of all line items.
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfoAn object with the keys `fullName` and `email`.
allAddresses[OrderAddress]A customer address
shippingAddressOrderAddressA customer address
billingAddressOrderAddressA customer address
purchasedItems[OrderPurchasedItem]An item that was purchased
stripeDetailsStripeDetailsAn object with various Stripe IDs, useful for linking into the stripe dashboard.
stripeCardStripeCardDetails on the card used to fulfill this order, if this order was finalized with Stripe.
totalsOrderTotalsAn object describing various pricing totals.
customData[object]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[OrderDownloadedFile]

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Unfulfill Order

Updates an order's status to unfulfilled

Request

POST /sites/:site_id/orders/:order_id/unfulfill

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/unfulfill \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/unfulfill', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/unfulfill", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/unfulfill") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/unfulfill" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/unfulfill"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
order_idpathstringtrueUnique identifier for an Order

Response Example

{ "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" } ] }

Response

NameTypeDescription
orderIdstringThe 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.
statusstringString enumerator for string
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmountThe sum of all line items.
netAmountOrderAmountThe sum of all line items.
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfoAn object with the keys `fullName` and `email`.
allAddresses[OrderAddress]A customer address
shippingAddressOrderAddressA customer address
billingAddressOrderAddressA customer address
purchasedItems[OrderPurchasedItem]An item that was purchased
stripeDetailsStripeDetailsAn object with various Stripe IDs, useful for linking into the stripe dashboard.
stripeCardStripeCardDetails on the card used to fulfill this order, if this order was finalized with Stripe.
totalsOrderTotalsAn object describing various pricing totals.
customData[object]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[OrderDownloadedFile]

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Refund Order

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/orders/:order_id/refund

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/refund \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/refund', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/refund", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/refund") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/refund" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/orders/5e8518516e147040726cc415/refund"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
order_idpathstringtrueUnique identifier for an Order

Response Example

{ "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" } ] }

Response

NameTypeDescription
orderIdstringThe 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.
statusstringString enumerator for string
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmountThe sum of all line items.
netAmountOrderAmountThe sum of all line items.
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfoAn object with the keys `fullName` and `email`.
allAddresses[OrderAddress]A customer address
shippingAddressOrderAddressA customer address
billingAddressOrderAddressA customer address
purchasedItems[OrderPurchasedItem]An item that was purchased
stripeDetailsStripeDetailsAn object with various Stripe IDs, useful for linking into the stripe dashboard.
stripeCardStripeCardDetails on the card used to fulfill this order, if this order was finalized with Stripe.
totalsOrderTotalsAn object describing various pricing totals.
customData[object]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[OrderDownloadedFile]

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Inventory

List Inventory

List the current inventory levels for a particular SKU item.

Request

GET /sites/:site_id/collections/:collection_id/items/:item_id/inventory

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
item_idpathstringtrueUnique identifier for and Item
site_idpathstringtrueUnique identifier for a Site

Response Example

{ "_id": "5bfedb42bab0ad90fa7dad39", "quantity": 83, "inventoryType": "finite" }

Response

NameTypeDescription
_idstringUnique identifier for a SKU item
quantitynumberTotal quantity of items remaining in inventory (if finite)
inventoryTypestringString enumerator for string

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Update Item Inventory

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

PATCH /sites/:site_id/collections/:collection_id/items/:item_id/inventory

Parameters

Shell Example

curl --request PATCH \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "fields": { "inventoryType": "finite", "updateQuantity": 1, "quantity": 100 } }'

Javascript Example

const request = require('request'); const options = { method: 'PATCH', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: {fields: {inventoryType: 'finite', updateQuantity: 1, quantity: 100}}, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"fields\":{\"inventoryType\":\"finite\",\"updateQuantity\":1,\"quantity\":100}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("PATCH", "/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Patch.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"fields\":{\"inventoryType\":\"finite\",\"updateQuantity\":1,\"quantity\":100}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory" payload := strings.NewReader("{\"fields\":{\"inventoryType\":\"finite\",\"updateQuantity\":1,\"quantity\":100}}") req, _ := http.NewRequest("PATCH", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754/inventory"); var request = new RestRequest(Method.PATCH); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"fields\":{\"inventoryType\":\"finite\",\"updateQuantity\":1,\"quantity\":100}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
collection_idpathstringtrueUnique identifier for a Collection
item_idpathstringtrueUnique identifier for and Item
site_idpathstringtrueUnique identifier for a Site
fieldsbodyobjectfalseThe inventory fields to update

Response Example

{ "_id": "5bfedb42bab0ad90fa7dad39", "quantity": 83, "inventoryType": "finite" }

Response

NameTypeDescription
_idstringUnique identifier for a SKU item
quantitynumberTotal quantity of items remaining in inventory (if finite)
inventoryTypestringString enumerator for string

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Webhooks

List Webhooks

List of all webhooks in a given site

Request

GET /sites/:site_id/webhooks

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/webhooks", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site

Response Example

[ { "_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" } ]

Response

NameTypeDescription
_idstringUnique identifier for a Webhook
triggerTypeTriggerTypeString enumerator for TriggerType
triggerIdstringUnique identifier for the Webhook Trigger
sitestringUnique identifier for a Webhook
filterobjectfilter for selecting which events you want webhooks to be triggered for.
lastUsedstringDate trigger was last used
createdOnstringDate trigger was created

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Create Webhook

Create a new webhook

Request

POST /sites/:site_id/webhooks

Parameters

Shell Example

curl --request POST \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks \ --header 'Authorization: Bearer {access_token}' \ --header 'content-type: application/json' \ --data '{ "triggerType": "form_submission", "url": "https://api.mydomain.com/webhook", "filter": { "name": "Email Form" } }'

Javascript Example

const request = require('request'); const options = { method: 'POST', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks', headers: { Authorization: 'Bearer {access_token}', 'content-type': 'application/json' }, body: { triggerType: 'form_submission', url: 'https://api.mydomain.com/webhook', filter: {name: 'Email Form'} }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") payload = "{\"triggerType\":\"form_submission\",\"url\":\"https://api.mydomain.com/webhook\",\"filter\":{\"name\":\"Email Form\"}}" headers = { 'Authorization': "Bearer {access_token}", 'content-type': "application/json" } conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/webhooks", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer {access_token}' request["content-type"] = 'application/json' request.body = "{\"triggerType\":\"form_submission\",\"url\":\"https://api.mydomain.com/webhook\",\"filter\":{\"name\":\"Email Form\"}}" response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "strings" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks" payload := strings.NewReader("{\"triggerType\":\"form_submission\",\"url\":\"https://api.mydomain.com/webhook\",\"filter\":{\"name\":\"Email Form\"}}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer {access_token}") req.Header.Add("content-type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer {access_token}"); request.AddHeader("content-type", "application/json"); request.AddParameter("application/json", "{\"triggerType\":\"form_submission\",\"url\":\"https://api.mydomain.com/webhook\",\"filter\":{\"name\":\"Email Form\"}}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
triggerTypebodyTriggerTypetrue
urlbodystringtrueThe https URL on your server the webhook will send a request to when the webhook is triggered
filterbodyobjectfalsefilter for selecting which events you want webhooks to be triggered for.

Response Example

{ "_id": "582266e0cd48de0f0e3c6d8b", "triggerType": "form_submission", "triggerId": "562ac0395358780a1f5e6fbd", "site": "562ac0395358780a1f5e6fbd", "createdOn": "2016-11-08T23:59:28.572Z" }

Response

NameTypeDescription
_idstringUnique identifier for a Webhook
triggerTypeTriggerTypeString enumerator for TriggerType
triggerIdstringUnique identifier for the Webhook Trigger
sitestringUnique identifier for a Webhook
filterobjectfilter for selecting which events you want webhooks to be triggered for.
lastUsedstringDate trigger was last used
createdOnstringDate trigger was created

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Get Webhook

Get a site webhook

Request

GET /sites/:site_id/webhooks/:webhook_id

Parameters

Shell Example

curl --request GET \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'GET', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
webhook_idpathstringtrueUnique identifier for a Webhook

Response Example

{ "_id": "582266e0cd48de0f0e3c6d8b", "triggerType": "form_submission", "triggerId": "562ac0395358780a1f5e6fbd", "site": "562ac0395358780a1f5e6fbd", "createdOn": "2016-11-08T23:59:28.572Z" }

Response

NameTypeDescription
_idstringUnique identifier for a Webhook
triggerTypeTriggerTypeString enumerator for TriggerType
triggerIdstringUnique identifier for the Webhook Trigger
sitestringUnique identifier for a Webhook
filterobjectfilter for selecting which events you want webhooks to be triggered for.
lastUsedstringDate trigger was last used
createdOnstringDate trigger was created

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Remove Webhook

Remove a webhook

Request

DELETE /sites/:site_id/webhooks/:webhook_id

Parameters

Shell Example

curl --request DELETE \ --url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754 \ --header 'Authorization: Bearer {access_token}'

Javascript Example

const request = require('request'); const options = { method: 'DELETE', url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754', headers: {Authorization: 'Bearer {access_token}'} }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); });

Python Example

import http.client conn = http.client.HTTPSConnection("api.webflow.com") headers = { 'Authorization': "Bearer {access_token}" } conn.request("DELETE", "/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))

Ruby Example

require 'uri' require 'net/http' require 'openssl' url = URI("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE request = Net::HTTP::Delete.new(url) request["Authorization"] = 'Bearer {access_token}' response = http.request(request) puts response.read_body

Go Example

package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Authorization", "Bearer {access_token}") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) }

.NET Example

var client = new RestClient("https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks/580e64008c9a982ac9b8b754"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", "Bearer {access_token}"); IRestResponse response = client.Execute(request);
NameInTypeRequiredDescription
Accept-VersionheaderstringfalseThe API version
site_idpathstringtrueUnique identifier for a Site
webhook_idpathstringtrueUnique identifier for a Webhook

Response Example

{ "deleted": 1 }

Response

NameTypeDescription
deletednumberNumber of webhooks deleted

Response Codes

StatusMeaningDescription
200OKRequest was successful
400SyntaxErrorRequest body was incorrectly formatted. Likely invalid JSON being sent up.
401UnauthorizedProvided access token is invalid or does not have access to requested resource
404NotFoundRequested resource not found
429RateLimitThe 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.
500ServerErrorWe had a problem with our server. Try again later.

Models

Error

Example Error

{ "msg": "Cannot access resource", "code": 401, "name": "Unauthorized", "path": "/sites/invalid_site", "err": "Unauthorized: Cannot access resource" }
FieldTypeDescription
codenumberHTTP error code
msgstringError message
namestringName of error
pathstringPath of request resulting in error
errstringFull error string
problems[string]Array of errors (commonly on ValidationErrors)

TriggerType

Enumerable ValueDescription
`form_submission`A JSON payload of submitted form data
`site_publish`Sends an [Site Publish](#SitePublish)
`ecomm_new_order`Sends an [Ecommerce Order](#Order)
`ecomm_order_changed`Sends an [Ecommerce Order](#Order)
`ecomm_inventory_changed`Sends an [Ecommerce Inventory](#Inventory)
`memberships_user_account_added`The user account that was added
`memberships_user_account_updated`The user account that was updated
`collection_item_created`Sends a [Collection Item](#Item)
`collection_item_changed`Sends a [Collection Item](#Item)
`collection_item_deleted`Sends `{ deleted: 1, itemId: String }`
`collection_item_unpublished`Sends `{ deleted: 1, itemId: String }`

Webhook

Example Webhook

{ "_id": "582266e0cd48de0f0e3c6d8b", "triggerType": "form_submission", "triggerId": "562ac0395358780a1f5e6fbd", "site": "562ac0395358780a1f5e6fbd", "createdOn": "2016-11-08T23:59:28.572Z" }
FieldTypeDescription
_idstringUnique identifier for a Webhook
triggerTypeTriggerType
triggerIdstringUnique identifier for the Webhook Trigger
sitestringUnique identifier for a Webhook
filterobjectfilter for selecting which events you want webhooks to be triggered for.
lastUsedstringDate trigger was last used
createdOnstringDate trigger was created

Field

Example Field

{ "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" }
FieldTypeDescription
idstringUnique identifier for the field
slugstringSlug of the field in the URL structure of your site for template pages
namestringName given to the field
typeFieldType
editablebooleanDetermines if field is editable (some fields are automatically created and cannot be edited)
requiredbooleanDetermines if field is required
validationsValidation

InnerFieldType

Enumerable ValueDescription
nner 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).
`ExtFileRef`An object containing name (string) and URL (string) properties
`ImageRef` Unique id for images in CMS

FieldType

Enumerable ValueDescription
`Bool` Yes/no switch used for filtering data that's displayed in your site, ex: `featured`
`Color` CSS Color value (ie: `'red'` or `'#e3e3e3'`)
`Date` Date field used to display any combination of month, day, year, and time
`ExtFileRef` An object containing name (string) and URL (string) properties
`Set` Field containing multiple objects for external files
`ImageRef` Unique id for images in CMS
`Set` Field containing multiple unique ids for images in CMS
`ItemRef` Field containing item referenced from another Collection
`ItemRefSet` Field containing multiple items referenced from another Collection
`Link` URL field where the value can be used as a link destination for buttons, link text, and link blocks
`Number` Single line input field used only for numbers
`Option` Dropdown field with multiple options
`PlainText` Unformatted text (no images, styles, etc.)
`RichText` Formatted text (with headers, hyperlinks, images, etc.)
`Video` Video link field used to embed videos from YouTube and Vimeo

Validation

Example Validation

{ "singleLine": false, "maxLength": 256, "messages": { "maxLength": "Must be less than 256 characters", "pattern": "Must be alphanumerical and not contain any spaces or special characters" }, "pattern": {} }
FieldTypeDescription
maxLengthnumber
minLengthnumber
minimumnumber
maximumnumber
maxSizenumber
decimalPlacesnumber
singleLineboolean
options[string]
formatstring
precisionnumber
allowNegativeboolean
collectionIdstring

Product

Example 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" }
FieldTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “product” if the Collection is called “Product”)
fields[Field]The list of fields in the collection

SKU

Example 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" }
FieldTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “sku” if the Collection is called “SKU”)
fields[Field]The list of fields in the collection

CategoryCollection

Example CategoryCollection

{ "_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 } ] }
FieldTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “category” if the Collection is called “Category”)
fields[Field]The list of fields in the collection

StripeDetails

Example StripeDetails

{ "refundReason": null, "refundId": null, "disputeId": null, "chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u", "customerId": "cus_E5ajeiWNHEtcAW" }
FieldTypeDescription
refundReasonstringStripe customer ID, or null.
refundIdstringStripe charge ID, or null.
disputeIdstringStripe dispute ID, or null.
chargeIdstringStripe refund ID, or null.
customerIdstring

StripeCard

Example StripeCard

{ "last4": "4242", "brand": "Visa", "ownerName": "Customerio Namen", "expires": { "year": 2023, "month": 12 } }
FieldTypeDescription
last4stringThe last 4 digits on the card.
brandstringThe card’s brand.
ownerNamestringThe name on the card.
expiresobjectThe card’s expiration date.

OrderAmount

Example OrderAmount

{ "unit": "USD", "value": 5892, "string": "$58.92" }
FieldTypeDescription
unitstring
valuestring
stringstring

OrderAddress

Example OrderAddress

{ "type": "billing", "addressee": "Customerio Namen", "line1": "123 Example Rd", "line2": "", "city": "Examplesville", "state": "CA", "country": "US", "postalCode": "90012" }
FieldTypeDescription
typestring
addresseestring
line1string
line2string
citystring
statestring
countrystring
postalCodestring

OrderCustomerInfo

Example OrderCustomerInfo

{ "fullName": "Customerio Namen", "email": "renning+customer@webflow.com" }
FieldTypeDescription
fullNamestring
emailstring

OrderDownloadedFile

Example OrderDownloadedFile

{ "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" }
FieldTypeDescription
idstring
namestring
urlstring

OrderItemImage

Example OrderItemImage

{ "fileId": "5bfedb42bab0ad90fa7dad2e", "url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png" }
FieldTypeDescription
fileIdstring
urlstring

OrderPurchasedItem

Example OrderPurchasedItem

{ "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 }
FieldTypeDescription
countnumberNumber of item purchased.
rowTotalOrderAmount
productIdstringString Product Id.
productNamestringName of the product.
productSlugstringSlug of the product.
variantIdstringString Variant Id. (SKU)
variantNamestringName of the variant. (SKU)
variantSlugstringSlug of the variant. (SKU)
variantImageOrderItemImage
variantPriceOrderAmount
heightnumberThe height of the variant if provided, 0 otherwise.
lengthnumberThe length of the variant if provided, 0 otherwise.
widthnumberThe width of the variant if provided, 0 otherwise
weightnumberThe weight of the variant if provided, 0 otherwise.
purchasedItemsCountnumberThe sum of all 'count' fields in 'purchasedItems'.

OrderExtra

Example OrderExtra

{ "type": "tax", "name": "State Taxes", "description": "CA Taxes (6.25%)", "price": { "unit": "USD", "value": 344, "string": "$3.44" } }
FieldTypeDescription
typestringThe type of extra item this is.
namestringA human-readable (but English) name for this extra charge.
descriptionstringA human-readable (but English) description of this extra charge.
priceOrderAmount

OrderTotals

Example OrderTotals

{ "subtotal": { "unit": "USD", "value": 5500, "string": "$55.00" } }
FieldTypeDescription
subtotalOrderAmount
extras[OrderExtra]An array of extra items, includes discounts, shipping, and taxes.
totalOrderAmount

Order

Example Order

{ "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" } ] }
FieldTypeDescription
orderIdstringThe 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.
statusstringOne of `pending`, `unfulfilled`, `fulfilled`, `disputed`, `dispute-lost`, or `refunded`
commentstringA comment string for this order editable by API user (not used by Webflow).
orderCommentstringA comment that the customer left when making their order
acceptedOnstringThe ISO8601 timestamp that an order was placed.
disputedOnstringIf 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.
disputeUpdatedOnstringIf 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.
disputeLastStatusstringIf an order was disputed by the customer, then this key will be set with the [dispute's status](https://stripe.com/docs/api#dispute_object-status).
fulfilledOnstringIf an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened.
refundedOnstringIf an order was refunded, this is the ISO8601 of when that happened.
customerPaidOrderAmount
netAmountOrderAmount
requiresShippingbooleanA boolean indicating whether the order contains one or more purchased items that require shipping.
shippingProviderstringA string editable by the API user to note the shipping provider used (not used by Webflow).
shippingTrackingstringA string editable by the API user to note the shipping tracking number for the order (not used by Webflow).
customerInfoOrderCustomerInfo
allAddresses[OrderAddress]All addresses provided by the customer during the ordering flow.
shippingAddressOrderAddress
billingAddressOrderAddress
purchasedItems[OrderPurchasedItem]An array of all things that the customer purchased.
stripeDetailsStripeDetails
stripeCardStripeCard
totalsOrderTotals
customData[object]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[OrderDownloadedFile]An array of downloadable file objects.

ItemInventory

Example ItemInventory

{ "_id": "5bfedb42bab0ad90fa7dad39", "quantity": 83, "inventoryType": "finite" }
FieldTypeDescription
_idstringUnique identifier for a SKU item
quantitynumberTotal quantity of items remaining in inventory (if finite)
inventoryTypestringinfinite or finite

EcommerceSettings

Example EcommerceSettings

FieldTypeDescription
createdOnstringDate that the site was created on
sitestringThe id of the site being queried
defaultCurrencystringThe three-letter currency code of the site

Authorization

Example Authorization

{ "_id": "55818d58616600637b9a5786", "createdOn": "2016-10-03T23:12:00.755Z", "grantType": "authorization_code", "lastUsed": "2016-10-10T21:41:12.736Z", "sites": [], "orgs": [ "551ad253f0a9c0686f71ed08" ], "workspaces": [], "users": [ "545bbecb7bdd6769632504a7" ], "rateLimit": 60, "status": "confirmed", "application": { "_id": "55131cd036c09f7d07883dfc", "description": "OAuth Testing Application", "homepage": "https://webflow.com", "name": "Test App", "owner": "545bbecb7bdd6769632504a7", "ownerType": "Person" } }
FieldTypeDescription
_idstring
createdOnstring
grantTypestring
lastUsedstring
sites[Site]
orgs[string]
workspaces[string]
users[string]
rateLimitinteger
statusstring
applicationApplication

Application

Example Application

FieldTypeDescription
_idstring
descriptionstring
homepagestring
namestring
ownerstring
ownerTypestring

AuthorizedUser

Example AuthorizedUser

{ "user": { "_id": "545bbecb7bdd6769632504a7", "email": "some@email.com", "firstName": "Some", "lastName": "One" } }
FieldTypeDescription
_idstringThe unique id of the user
emailstringThe user's email address
firstNamestringThe user's first name
lastNamestringThe user's last name

Site

Example Site

{ "_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" }
FieldTypeDescription
_idstringUnique identifier for site
createdOnstringDate the site was created
namestringName given to site
shortNamestringSlugified version of name
lastPublishedstringDate site was last published
previewUrlstringURL of a generated image for the given site
timezonestringSite timezone set under Site Settings

SitePublish

Example SitePublish

{ "site": "62749158efef318abc8d5a0f", "publishTime": 1653619272801, "domains": [ "my-website.webflow.io" ], "publishedBy": { "name": "Some One", "id": "123460a7b6c16def4527122d" } }
FieldTypeDescription
sitestringThe site id that was published
publishTimestringThe timestamp of the publish event
domains[string]The domains that were published
publishedByobjectThe name and id of the user who published the site

Domain

Example Domain

FieldTypeDescription
_idstringUnique identifier for domain
namestringThe domain name

Collection

Example Collection

{ "_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" } ] }
FieldTypeDescription
_idstringUnique identifier for collection
lastUpdatedstringThe date the collection was last updated
createdOnstringThe date the collection was create
namestringName given to Collection
slugstringSlug of Collection in Site URL structure
singularNamestringThe name of one Item in Collection (e.g. “post” if the Collection is called “Posts”)
fields[Field]The list of fields in the collection

Item

Example Item

{ "_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" }
FieldTypeDescription
_archivedbooleanBoolean determining if the Item is set to archived
_draftbooleanBoolean determining if the Item is set to draft
_idstringUnique identifier for the Item
_cidstringUnique identifier for the Collection the Item belongs within
namestringName given to the Item
slugstringURL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug.

User

Example User

{ "_id": "6287ec36a841b25637c663df", "createdOn": "2022-05-20T13:46:12.093Z", "updatedOn": "2022-05-20T13:46:12.093Z", "emailVerified": true, "status": "verified", "data": { "accept-communications": false, "email": "Some.One@home.com", "name": "Some One" } }
FieldTypeDescription
_idstringUnique identifier for the User
createdOnstringThe timestamp the user was created
updatedOnstringThe timestamp the user was updated
invitedOnstringThe timestamp the user was invited
lastLoginstringThe timestamp the user was logged in
emailVerifiedbooleanShows whether the user has verified their email address
statusstringThe status of the user
dataobjectAn object containing the User's basic info and custom fields