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.
Changelog
July 28, 2022
- Added User Access Groups - We've added the List Access Groups endpoint to the Users APIs so you can see the Access Groups available for a site. We've also included the
access_group
parameter to the Invite User endpoint to assign a group with an invite.
June 23, 2022
- Webflow SDK Update to 0.8.0 - Our Webflow Node.js SDK has been updated to
0.8.0
which includes methods and typings to support our new Users API (currently in beta).
June 21, 2022
API Version Defaults to Current Version - We no longer require
accept-version
orapi_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 useredirect_uri
in our OAuth section.
June 16, 2022
Users API - We've launched five new APIs to list, manage, and invite users for the new Memberships feature (currently in Beta).
Membership Webhooks - The
memberships_user_account_added
andmemberships_user_account_updated
webhook triggers have been added.Developer Site Update - This developer site has been updated a bit with improved syntax highlighting and examples for more langugages. We've also moved OAuth into the main page and best of all - it's now generated from an OpenAPI spec. Still a WIP and formatting improvements are constantly in the works.
May 27, 2022
Item Unpublish API - We've launched a new feature in Webflow to unpublish individual items and we've created the APIs to go with it! You can now use the Unpublish API in code to manage content state. Note: If you're using the Webflow Node.js SDK, 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 includesdomains
andpublishedBy
, 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 has been updated to
0.7.2
. This update includes a critical update to DELETE calls that take in a querystring. Learn more about the release on GitHub.
March 31, 2022
- Webflow SDK Update to 0.7.1 - Our Webflow Node.js SDK has been updated to
0.7.1
. This is a big update and includes updates to all dependencies, fixed typings, and an error message typo for item(). Learn more about the release on GitHub.
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
We use OAuth2 to integrate 3rd party applications 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 authorization code grant flow. Applications integrating with Webflow need to perform the following steps:
- Retrieve an authorization code (after a user approves the request)
- Use the authorization code to retrieve an access token, which can then 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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/user',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
Response
Example Response
{
"user": {
"_id": "545bbecb7bdd6769632504a7",
"email": "some@email.com",
"firstName": "Some",
"lastName": "One"
}
}
Name | Type | Description |
---|---|---|
_id | string | The unique id of the user |
email | string | The user's email address |
firstName | string | The user's first name |
lastName | string | The user's last name |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/info',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
Response
Example Response
{
"_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"
}
}
Name | Type | Description |
---|---|---|
_id | string | |
createdOn | string | |
grantType | string | |
lastUsed | string | |
sites | [Site] | |
orgs | [string] | |
workspaces | [string] | |
users | [string] | |
rateLimit | integer | |
status | string | |
application | Application | An instance of the Application object. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
Response
Example Response
[
{
"_id": "580e63e98c9a982ac9b8b741",
"createdOn": "2016-10-24T19:41:29.156Z",
"name": "api_docs_sample_json",
"shortName": "api-docs-sample-json",
"lastPublished": "2016-10-24T23:06:51.251Z",
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
"timezone": "America/Los_Angeles",
"database": "580e63fc8c9a982ac9b8b744"
},
{
"_id": "580ff8c3ba3e45ba9fe588bb",
"createdOn": "2016-10-26T00:28:54.191Z",
"name": "Copy of api_docs_sample_json",
"shortName": "api-docs-sample-json-086c6538f9b0583762",
"lastPublished": null,
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
"timezone": "America/Los_Angeles",
"database": "580ff8c3ba3e45ba9fe588bf"
},
{
"_id": "580ff8d7ba3e45ba9fe588e9",
"createdOn": "2016-10-26T00:29:13.634Z",
"name": "Copy of api_docs_sample_json",
"shortName": "api-docs-sample-json-ce077aa6c5cd3e0177",
"lastPublished": null,
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241603.png",
"timezone": "America/Los_Angeles",
"database": "580ff8d7ba3e45ba9fe588ed"
}
]
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for site |
createdOn | string | Date the site was created |
name | string | Name given to site |
shortName | string | Slugified version of name |
lastPublished | string | Date site was last published |
previewUrl | string | URL of a generated image for the given site |
timezone | string | Site timezone set under Site Settings |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
Response
Example Response
{
"_id": "580e63e98c9a982ac9b8b741",
"createdOn": "2016-10-24T19:41:29.156Z",
"name": "api_docs_sample_json",
"shortName": "api-docs-sample-json",
"lastPublished": "2016-10-24T19:43:17.271Z",
"previewUrl": "https://d1otoma47x30pg.cloudfront.net/580e63e98c9a982ac9b8b741/201610241243.png",
"timezone": "America/Los_Angeles",
"database": "580e63fc8c9a982ac9b8b744"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for site |
createdOn | string | Date the site was created |
name | string | Name given to site |
shortName | string | Slugified version of name |
lastPublished | string | Date site was last published |
previewUrl | string | URL of a generated image for the given site |
timezone | string | Site timezone set under Site Settings |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
domains | body | [string] | false | An array of domains that should be published |
Response
Example Response
{
"queued": true
}
Name | Type | Description |
---|---|---|
queued | boolean | Indicates if the site has been queued for publish |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/domains',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
Response
Example Response
[
{
"_id": "589a331aa51e760df7ccb89d",
"name": "test-api-domain.com"
},
{
"_id": "589a331aa51e760df7ccb89e",
"name": "www.test-api-domain.com"
}
]
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for domain |
name | string | The domain name |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/collections',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
Response
Example Response
[
{
"_id": "580e63fc8c9a982ac9b8b745",
"lastUpdated": "2016-10-24T19:42:38.929Z",
"createdOn": "2016-10-24T19:41:48.349Z",
"name": "Blog Posts",
"slug": "post",
"singularName": "Blog Post"
},
{
"_id": "580e64088c9a982ac9b8b766",
"lastUpdated": "2016-10-24T19:42:00.799Z",
"createdOn": "2016-10-24T19:42:00.777Z",
"name": "Authors",
"slug": "author",
"singularName": "Author"
}
]
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields | [Field] | The list of fields in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Get Collection
Get a collection by collection id
Request
GET /collections/:collection_id
Parameters
Shell Example
curl --request GET \
--url https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745 \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("GET", "/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/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["Accept-Version"] = '1.0.0'
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"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
Response
Example Response
{
"_id": "580e63fc8c9a982ac9b8b745",
"lastUpdated": "2016-10-24T19:42:38.929Z",
"createdOn": "2016-10-24T19:41:48.349Z",
"name": "Blog Posts",
"slug": "post",
"singularName": "Blog Post",
"fields": [
{
"id": "7f62a9781291109b9e428fb47239fd35",
"editable": true,
"required": false,
"type": "RichText",
"slug": "post-body",
"name": "Post Body"
},
{
"validations": {
"singleLine": false
},
"id": "ac4ffead755a78c710c44042f528b073",
"helpText": "A summary of the blog post that appears on blog post grid",
"editable": true,
"required": false,
"type": "PlainText",
"slug": "post-summary",
"name": "Post Summary"
},
{
"id": "ba1cfbdaa6b38b8e95e9b5063da8a5bd",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "main-image",
"name": "Main Image"
},
{
"id": "a8c6ea29b08cc5b5ef966908fa1deae2",
"helpText": "Smaller version of main image that is used on blog post grid",
"editable": true,
"required": false,
"type": "ImageRef",
"slug": "thumbnail-image",
"name": "Thumbnail image"
},
{
"id": "87e79a644a6fb5729940ec24e0012f01",
"editable": true,
"required": false,
"type": "Set",
"innerType": "ImageRef",
"slug": "picture-gallery",
"name": "Picture Gallery"
},
{
"id": "1e54974d97181032d3206ea021668e5f",
"editable": true,
"required": false,
"type": "Bool",
"slug": "featured",
"name": "Featured?"
},
{
"id": "648463cbc042ab079c2b99430a398ae5",
"editable": true,
"required": false,
"type": "Color",
"slug": "color",
"name": "Color"
},
{
"validations": {
"collectionId": "580e64088c9a982ac9b8b766"
},
"id": "ea9067c48edee510de71fe503fa2fb51",
"editable": true,
"required": false,
"type": "ItemRef",
"slug": "author",
"name": "Author"
},
{
"validations": {
"maxLength": 256
},
"id": "60c0667e27b6d5a6daedec3a641265f6",
"editable": true,
"required": true,
"type": "PlainText",
"slug": "name",
"name": "Name"
},
{
"validations": {
"messages": {
"maxLength": "Must be less than 256 characters",
"pattern": "Must be alphanumerical and not contain any spaces or special characters"
},
"pattern": {},
"maxLength": 256
},
"id": "8f0c953df91d10b767d66e1d7d00d631",
"unique": true,
"editable": true,
"required": true,
"type": "PlainText",
"slug": "slug",
"name": "Slug"
},
{
"default": false,
"id": "e4e92e700d70faffac6fa82ff2bfaece",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_archived",
"name": "Archived"
},
{
"default": false,
"id": "f2675b2ac4fcef746b24d4a320887ef8",
"editable": true,
"required": true,
"type": "Bool",
"slug": "_draft",
"name": "Draft"
},
{
"id": "0913a35d92208bdf8fbf3ed1e39b771e",
"editable": false,
"required": false,
"type": "Date",
"slug": "created-on",
"name": "Created On"
},
{
"id": "3de04889465fe6d718e47b152ef5bb4d",
"editable": false,
"required": false,
"type": "Date",
"slug": "updated-on",
"name": "Updated On"
},
{
"id": "2a3cd866d5dbb294896130b233218626",
"editable": false,
"required": false,
"type": "Date",
"slug": "published-on",
"name": "Published On"
},
{
"id": "62c18561b9e89517751c6d8712d48f91",
"editable": false,
"required": false,
"type": "User",
"slug": "created-by",
"name": "Created By"
},
{
"id": "50918093b4e4d4eca1e83c25bcdc06a4",
"editable": false,
"required": false,
"type": "User",
"slug": "updated-by",
"name": "Updated By"
},
{
"id": "5c4587f18b32ef245daeaadfcba7860b",
"editable": false,
"required": false,
"type": "User",
"slug": "published-by",
"name": "Published By"
}
]
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields | [Field] | The list of fields in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Items
List 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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
offset | query | number | false | Offset used for pagination if the results have more than limit records |
limit | query | number | false | Maximum number of records to be returned (max limit: 100) |
Response
Example Response
{
"items": [
{
"value": {
"_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",
"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"
},
"x-ref": "#/components/examples/Item",
"x-model": "Item"
}
],
"count": 1,
"limit": 1,
"offset": 0,
"total": 5
}
Name | Type | Description |
---|---|---|
items | [Item] | List of Items within the collection |
count | number | Number of items returned |
limit | number | The limit specified in the request |
offset | number | The offset specified for pagination |
total | number | Total number of items in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}' \
--header 'content-type: application/json' \
--data '{
"fields": {
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
Javascript Example
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items',
qs: {live: 'true'},
headers: {
'Accept-Version': '1.0.0',
Authorization: 'Bearer {access_token}',
'content-type': 'application/json'
},
body: {
fields: {
name: 'Exciting blog post title',
slug: 'exciting-post',
_archived: false,
_draft: false,
color: '#a98080',
author: '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749'
}
},
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
headers = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
request["Authorization"] = 'Bearer {access_token}'
request["content-type"] = 'application/json'
request.body = "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
live | query | boolean | false | Boolean indicating if the item should be published/unpublished to/from the live site |
fields | body | Field | false | An instance of the Field object. |
Response
Example Response
{
"value": {
"_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",
"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"
},
"x-ref": "#/components/examples/Item",
"x-model": "Item"
}
Name | Type | Description |
---|---|---|
_archived | boolean | Boolean determining if the Item is set to archived |
_draft | boolean | Boolean determining if the Item is set to draft |
_id | string | Unique identifier for the Item |
_cid | string | Unique identifier for the Collection the Item belongs within |
name | string | Name given to the Item |
slug | string | URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}' \
--header 'content-type: application/json' \
--data '{
"fields": {
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
Javascript Example
const request = require('request');
const options = {
method: 'PUT',
url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754',
qs: {live: 'true'},
headers: {
'Accept-Version': '1.0.0',
Authorization: 'Bearer {access_token}',
'content-type': 'application/json'
},
body: {
fields: {
name: 'Exciting blog post title',
slug: 'exciting-post',
_archived: false,
_draft: false,
color: '#a98080',
author: '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749'
}
},
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
headers = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
request["Authorization"] = 'Bearer {access_token}'
request["content-type"] = 'application/json'
request.body = "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
item_id | path | string | true | Unique identifier for and Item |
live | query | boolean | false | Boolean indicating if the item should be published/unpublished to/from the live site |
fields | body | Field | false | An instance of the Field object. |
Response
Example Response
{
"value": {
"_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",
"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"
},
"x-ref": "#/components/examples/Item",
"x-model": "Item"
}
Name | Type | Description |
---|---|---|
_archived | boolean | Boolean determining if the Item is set to archived |
_draft | boolean | Boolean determining if the Item is set to draft |
_id | string | Unique identifier for the Item |
_cid | string | Unique identifier for the Collection the Item belongs within |
name | string | Name given to the Item |
slug | string | URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}' \
--header 'content-type: application/json' \
--data '{
"fields": {
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
Javascript Example
const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/580e64008c9a982ac9b8b754',
qs: {live: 'true'},
headers: {
'Accept-Version': '1.0.0',
Authorization: 'Bearer {access_token}',
'content-type': 'application/json'
},
body: {
fields: {
name: 'Exciting blog post title',
slug: 'exciting-post',
_archived: false,
_draft: false,
color: '#a98080',
author: '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749'
}
},
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
headers = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
request["Authorization"] = 'Bearer {access_token}'
request["content-type"] = 'application/json'
request.body = "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
item_id | path | string | true | Unique identifier for and Item |
live | query | boolean | false | Boolean indicating if the item should be published/unpublished to/from the live site |
fields | body | Field | false | An instance of the Field object. |
Response
Example Response
{
"value": {
"_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",
"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"
},
"x-ref": "#/components/examples/Item",
"x-model": "Item"
}
Name | Type | Description |
---|---|---|
_archived | boolean | Boolean determining if the Item is set to archived |
_draft | boolean | Boolean determining if the Item is set to draft |
_id | string | Unique identifier for the Item |
_cid | string | Unique identifier for the Collection the Item belongs within |
name | string | Name given to the Item |
slug | string | URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
item_id | path | string | true | Unique identifier for and Item |
Response
Example Response
{
"items": [
{
"_archived": false,
"_draft": false,
"color": "#4CAF50",
"featured": false,
"name": "5 Principles Of Effective Web Design",
"post-body": "<h2>Earum laboriosam ab velit.</h2><p>Et aliquam fuga corporis sit assumenda culpa minima nostrum. Rerum corrupti cum quod laborum a. Non voluptatum ipsam ut et nostrum. Omnis deleniti hic est velit nemo et.</p><h3>Ut recusandae eveniet cum fugit.</h3><blockquote>Sed consectetur nulla dolorem explicabo temporibus aut. Assumenda ea reprehenderit voluptatem quis odit. Sequi sunt vel et dolorem qui dolorum ex. Omnis qui debitis eaque.</blockquote><p>Cumque et reiciendis sit ipsa. Odit sint dolor aliquam. Autem est odio voluptates deleniti. Voluptas quod dolorem minus natus necessitatibus. Autem ea iusto sunt repudiandae. Voluptatem ut et distinctio vero aliquid.</p><p>Aut ut eius. Sit quia labore nesciunt enim nemo eius pariatur odio inventore. Dolorem sapiente maxime laudantium vero praesentium. Fuga neque ipsam doloremque officia accusamus beatae ut occaecati aut. Aperiam perferendis et.</p><h2>Incidunt dolores assumenda tenetur ut recusandae officiis inventore modi quia.</h2><p>Aut necessitatibus qui nesciunt dolores dolores delectus nostrum occaecati odit. Quia optio et enim. Illo ipsa omnis quia quo ducimus voluptas placeat. Voluptatum consequatur id rem aut dolorem nesciunt. Est occaecati vero. Velit magni amet dignissimos.</p><h3>Voluptatem magni dolor quis hic quia iusto aut rerum quasi.</h3><blockquote>Repudiandae laborum necessitatibus dolorem accusamus sit et amet doloremque. Rerum illum rerum officia dolorum perferendis soluta aut incidunt autem. Rerum ut non corrupti maiores architecto vitae rerum quaerat ab. Est sint dolores quia repudiandae et eveniet. Et tenetur similique non ad. Quibusdam qui dolores dignissimos vitae reiciendis nulla aut necessitatibus.</blockquote><p>Voluptatem quia enim quos laudantium est. Dolorem earum est. Ut autem nemo accusamus quibusdam et dignissimos ut. Similique quia cumque. Aut pariatur repellendus voluptates error fugit illo. Neque pariatur impedit accusantium sed aut ea fuga magni ex.</p><p>Iusto accusamus quia nisi rerum reiciendis minus quam debitis. Sit illo eos qui. Nisi et autem sequi.</p>",
"post-summary": "Quo eligendi nihil quia voluptas qui.\nNon distinctio voluptatu",
"thumbnail-image": {
"fileId": "580e63ff8c9a982ac9b8b74d",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63ff8c9a982ac9b8b74d_1477338111010-image3.jpg"
},
"main-image": {
"fileId": "580e63fe8c9a982ac9b8b749",
"url": "https://d1otoma47x30pg.cloudfront.net/580e63fc8c9a982ac9b8b744/580e63fe8c9a982ac9b8b749_1477338110257-image20.jpg"
},
"slug": "5-principles-of-effective-web-design",
"updated-on": "2016-10-24T19:42:46.957Z",
"updated-by": "Person_5660c5338e9d3b0bee3b86aa",
"created-on": "2016-10-24T19:41:52.325Z",
"created-by": "Person_5660c5338e9d3b0bee3b86aa",
"published-on": "2016-10-24T19:43:15.745Z",
"published-by": "Person_5660c5338e9d3b0bee3b86aa",
"author": "580e640c8c9a982ac9b8b77a",
"_cid": "580e63fc8c9a982ac9b8b745",
"_id": "580e64008c9a982ac9b8b754"
}
],
"count": 1,
"limit": 100,
"offset": 0,
"total": 5
}
Name | Type | Description |
---|---|---|
items | [Item] | List of Items within the collection |
count | number | Number of items returned |
limit | number | The limit specified in the request |
offset | number | The offset specified for pagination |
total | number | Total number of items in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
item_id | path | string | true | Unique identifier for and Item |
live | query | boolean | false | Boolean indicating if the item should be published/unpublished to/from the live site |
Response
Example Response
{
"deleted": 1
}
Name | Type | Description |
---|---|---|
deleted | number | Number of items deleted |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Users
List Users
Get a list of users for a site
Request
GET /sites/:site_id/users
Parameters
Shell Example
curl --request GET \
--url 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users?offset=0&limit=100&sort=CreatedOn' \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users',
qs: {offset: '0', limit: '100', sort: 'CreatedOn'},
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/users?offset=0&limit=100&sort=CreatedOn", 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/users?offset=0&limit=100&sort=CreatedOn")
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["Accept-Version"] = '1.0.0'
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/users?offset=0&limit=100&sort=CreatedOn"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/users?offset=0&limit=100&sort=CreatedOn");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
offset | query | number | false | Offset used for pagination if the results have more than limit records |
limit | query | number | false | Maximum number of records to be returned (max limit: 100) |
sort | query | string | false | Sort string to use when ordering users Example( CreatedOn , Email , Status , LastLogin , UpdatedOn ).Can be prefixed with a - to reverse the sort (ex. -CreatedOn ) |
Response
Example Response
{
"users": [
{
"_id": "6287ec36a841b25637c663df",
"createdOn": "2022-05-20T13:46:12.093Z",
"updatedOn": "2022-05-20T13:46:12.093Z",
"emailVerified": false,
"status": "unverified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Person.One@home.com",
"name": "Person One"
}
},
{
"_id": "6287ec36a841b25637c663f0",
"createdOn": "2022-05-19T05:32:04.581Z",
"updatedOn": "2022-05-19T05:32:04.581Z",
"emailVerified": false,
"status": "unverified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Person.Two@home.com",
"name": "Person Two"
}
},
{
"_id": "6287ec36a841b25637c663d9",
"createdOn": "2022-05-17T03:34:06.720Z",
"updatedOn": "2022-05-17T03:34:06.720Z",
"emailVerified": true,
"status": "verified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Person.Three@home.com",
"name": "Person Three"
}
},
{
"_id": "6287ec37a841b25637c6641b",
"createdOn": "2022-05-15T03:46:09.748Z",
"updatedOn": "2022-05-15T03:46:09.748Z",
"emailVerified": false,
"status": "unverified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Person.Four@home.com",
"name": "Person Four"
}
},
{
"_id": "6287ec37a841b25637c66449",
"createdOn": "2022-05-15T02:55:38.786Z",
"updatedOn": "2022-05-15T02:55:38.786Z",
"emailVerified": true,
"status": "verified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Person.Five@home.com",
"name": "Person Five"
}
}
],
"count": 5,
"limit": 5,
"offset": 0,
"total": 201
}
Name | Type | Description |
---|---|---|
count | number | Number of users returned |
limit | number | The limit specified in the request |
offset | number | The offset specified for pagination |
total | number | Total number of users in the collection |
users | [User] | List of Users for a Site |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Get User
Get a User by id
Request
GET /sites/:site_id/users/:user_id
Parameters
Shell Example
curl --request GET \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741 \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/users/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/users/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["Accept-Version"] = '1.0.0'
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/users/580e63e98c9a982ac9b8b741"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/users/580e63e98c9a982ac9b8b741");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
user_id | path | string | true | Unique identifier for a User |
Response
Example Response
{
"_id": "6287ec36a841b25637c663df",
"createdOn": "2022-05-20T13:46:12.093Z",
"updatedOn": "2022-05-20T13:46:12.093Z",
"emailVerified": true,
"status": "verified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Some.One@home.com",
"name": "Some One"
}
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for the User |
createdOn | string | The timestamp the user was created |
updatedOn | string | The timestamp the user was updated |
invitedOn | string | The timestamp the user was invited |
lastLogin | string | The timestamp the user was logged in |
emailVerified | boolean | Shows whether the user has verified their email address |
status | string | The status of the user |
data | object | An object containing the User's basic info and custom fields |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Update User
Update a User by id
Request
PATCH /sites/:site_id/users/:user_id
Parameters
Shell Example
curl --request PATCH \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741 \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}' \
--header 'content-type: application/json' \
--data '{
"accept-privacy": false,
"accept-communications": false,
"name": "Some One"
}'
Javascript Example
const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741',
headers: {
'Accept-Version': '1.0.0',
Authorization: 'Bearer {access_token}',
'content-type': 'application/json'
},
body: {'accept-privacy': false, 'accept-communications': false, name: 'Some One'},
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 = "{\"accept-privacy\":false,\"accept-communications\":false,\"name\":\"Some One\"}"
headers = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}",
'content-type': "application/json"
}
conn.request("PATCH", "/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741", 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/users/580e63e98c9a982ac9b8b741")
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["Accept-Version"] = '1.0.0'
request["Authorization"] = 'Bearer {access_token}'
request["content-type"] = 'application/json'
request.body = "{\"accept-privacy\":false,\"accept-communications\":false,\"name\":\"Some One\"}"
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/users/580e63e98c9a982ac9b8b741"
payload := strings.NewReader("{\"accept-privacy\":false,\"accept-communications\":false,\"name\":\"Some One\"}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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/users/580e63e98c9a982ac9b8b741");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"accept-privacy\":false,\"accept-communications\":false,\"name\":\"Some One\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
user_id | path | string | true | Unique identifier for a User |
data | body | object | false | The User's updated data fields |
Response
Example Response
{
"_id": "6287ec36a841b25637c663df",
"createdOn": "2022-05-20T13:46:12.093Z",
"updatedOn": "2022-05-20T13:46:12.093Z",
"emailVerified": true,
"status": "verified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Some.One@home.com",
"name": "Some One"
}
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for the User |
createdOn | string | The timestamp the user was created |
updatedOn | string | The timestamp the user was updated |
invitedOn | string | The timestamp the user was invited |
lastLogin | string | The timestamp the user was logged in |
emailVerified | boolean | Shows whether the user has verified their email address |
status | string | The status of the user |
data | object | An object containing the User's basic info and custom fields |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Delete User
Delete a User by id
Request
DELETE /sites/:site_id/users/:user_id
Parameters
Shell Example
curl --request DELETE \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741 \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'DELETE',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/580e63e98c9a982ac9b8b741',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("DELETE", "/sites/580e63e98c9a982ac9b8b741/users/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/users/580e63e98c9a982ac9b8b741")
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["Accept-Version"] = '1.0.0'
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/users/580e63e98c9a982ac9b8b741"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/users/580e63e98c9a982ac9b8b741");
var request = new RestRequest(Method.DELETE);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
user_id | path | string | true | Unique identifier for a User |
Response
Example Response
{
"deleted": 1
}
Name | Type | Description |
---|---|---|
deleted | number | Number of users deleted |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Invite User
Invite a user by email address
Request
POST /sites/:site_id/users/invite
Parameters
Shell Example
curl --request POST \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/invite \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}' \
--header 'content-type: application/json' \
--data '{
"email": "some.one@home.com",
"access_groups": [
"webflowers"
]
}'
Javascript Example
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/invite',
headers: {
'Accept-Version': '1.0.0',
Authorization: 'Bearer {access_token}',
'content-type': 'application/json'
},
body: {email: 'some.one@home.com', access_groups: ['webflowers']},
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 = "{\"email\":\"some.one@home.com\",\"access_groups\":[\"webflowers\"]}"
headers = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}",
'content-type': "application/json"
}
conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/users/invite", 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/users/invite")
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["Accept-Version"] = '1.0.0'
request["Authorization"] = 'Bearer {access_token}'
request["content-type"] = 'application/json'
request.body = "{\"email\":\"some.one@home.com\",\"access_groups\":[\"webflowers\"]}"
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/users/invite"
payload := strings.NewReader("{\"email\":\"some.one@home.com\",\"access_groups\":[\"webflowers\"]}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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/users/invite");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"email\":\"some.one@home.com\",\"access_groups\":[\"webflowers\"]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
email | body | string | false | Email address of user to send invite to |
access_groups | body | [string] | false | Array of access groups slugs |
Response
Example Response
{
"_id": "6287ec36a841b25637c663df",
"createdOn": "2022-05-20T13:46:12.093Z",
"updatedOn": "2022-05-20T13:46:12.093Z",
"emailVerified": true,
"status": "verified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Some.One@home.com",
"name": "Some One"
}
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for the User |
createdOn | string | The timestamp the user was created |
updatedOn | string | The timestamp the user was updated |
invitedOn | string | The timestamp the user was invited |
lastLogin | string | The timestamp the user was logged in |
emailVerified | boolean | Shows whether the user has verified their email address |
status | string | The status of the user |
data | object | An object containing the User's basic info and custom fields |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
List Access Groups
Get a list of access groups for a site
Request
GET /sites/:site_id/users/accessgroups
Parameters
Shell Example
curl --request GET \
--url 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/accessgroups?offset=0&limit=100&sort=CreatedOn' \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/users/accessgroups',
qs: {offset: '0', limit: '100', sort: 'CreatedOn'},
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/users/accessgroups?offset=0&limit=100&sort=CreatedOn", 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/users/accessgroups?offset=0&limit=100&sort=CreatedOn")
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["Accept-Version"] = '1.0.0'
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/users/accessgroups?offset=0&limit=100&sort=CreatedOn"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/users/accessgroups?offset=0&limit=100&sort=CreatedOn");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
offset | query | number | false | Offset used for pagination if the results have more than limit records |
limit | query | number | false | Maximum number of records to be returned (max limit: 100) |
sort | query | string | false | Sort string to use when ordering access groups Can be prefixed with a - to reverse the sort (ex. -CreatedOn ) |
Response
Example Response
{
"accessGroups": [
{
"_id": "62be58d404be8a6cc900c081",
"name": "Webflowers",
"shortId": "jo",
"slug": "webflowers",
"createdOn": "2022-08-01T19:41:48.349Z"
}
],
"count": 1,
"limit": 10,
"offset": 0,
"total": 1
}
Name | Type | Description |
---|---|---|
count | number | Number of access groups returned |
limit | number | The limit specified in the request |
offset | number | The offset specified for pagination |
total | number | Total number of access groups in the collection |
accessGroups | [AccessGroup] | List of Site Access Groups |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
offset | query | number | false | Offset used for pagination if the results have more than limit records |
limit | query | number | false | Maximum number of records to be returned (max limit: 100) |
Response
Example Response
{
"items": [
{
"product": {
"shippable": true,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "ff42fee0113744f693a764e3431a9cc2",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
},
"skus": [
{
"price": {
"unit": "USD",
"value": 120000
},
"_archived": false,
"_draft": false,
"sku-values": {},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
"more-images": [
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
}
],
"download-files": [
{
"id": "5ebb1676c3244c2c6ae18814",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"slug": "cloak-of-invisibility-color-obsidian-black-7",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-01T22:40:19.287Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:19.287Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5dd44c493543b37d5449b383",
"_id": "5e8518536e147040726cc416"
}
]
}
],
"count": 1,
"limit": 100,
"offset": 0,
"total": 12
}
Name | Type | Description |
---|---|---|
items | [Product] | List of Item objects within the Collection. Contains product and skus keys |
count | number | Number of items returned |
limit | number | The limit specified in the request |
offset | number | The offset specified for pagination |
total | number | Total number of items in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 thesku-properties
enums. - With those IDs, update the default SKU with valid
sku-values
and create any additional SKUs (if needed), with validsku-values
. - You can also create the Product without
sku-properties
and add them in later. - If you add any
sku
properties, the default SKU will default to the first value of each option.
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 'Accept-Version: 1.0.0' \
--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: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
product | body | Product | false | An instance of the Product object. |
sku | body | SKU | false | An instance of the SKU object. |
Response
Example Response
{
"product": {
"shippable": true,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "ff42fee0113744f693a764e3431a9cc2",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
},
"sku": {
"price": {
"unit": "USD",
"value": 120000
},
"_archived": false,
"_draft": false,
"sku-values": {},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
"more-images": [
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
}
],
"download-files": [
{
"id": "5ebb1676c3244c2c6ae18814",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"slug": "cloak-of-invisibility-color-obsidian-black-7",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-01T22:40:19.287Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:19.287Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5dd44c493543b37d5449b383",
"_id": "5e8518536e147040726cc416"
}
}
Name | Type | Description |
---|---|---|
product | Product | An instance of the Product object. |
sku | SKU | An instance of the SKU object. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
product_id | path | string | true | Unique identifier for a Product |
Response
Example Response
{
"items": [
{
"product": {
"shippable": true,
"_archived": false,
"_draft": false,
"name": "Cloak Of Invisibility",
"ec-product-type": "ff42fee0113744f693a764e3431a9cc2",
"sku-properties": [
{
"id": "a37a7991f7ca1be0d349a805a2bddb5b",
"name": "Color",
"enum": [
{
"id": "a9506da8e70a8b087f35a4094ec34a53",
"name": "Obsidian Black",
"slug": "obsidian-black"
},
{
"id": "c92a465a1298c95fd1cd7f4c1c96c2ba",
"name": "Smoke Grey",
"slug": "smoke-grey"
},
{
"id": "ef9511c0b56cc11ff47c5669f65030b4",
"name": "Forest Green",
"slug": "forest-green"
}
]
}
],
"description": "A cloak that renders the wearer invisible to the eye.",
"slug": "cloak-of-invisibility-1",
"updated-on": "2020-04-01T22:40:19.329Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:17.602Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"default-sku": "5e8518536e147040726cc416",
"_cid": "5dd44c493543b37d5449b3a5",
"_id": "5e8518516e147040726cc415"
},
"skus": [
{
"price": {
"unit": "USD",
"value": 120000
},
"_archived": false,
"_draft": false,
"sku-values": {},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Obsidian Black",
"main-image": {
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
"more-images": [
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
},
{
"fileId": "5e85161dabd9ea4072cf1414",
"url": "https://d1otoma47x30pg.cloudfront.net/5d93ba5e38c6b0160ab711d6/5e85161dabd9ea4072cf1414_5e8512181ae993035b15f315_external-content.duckduckgo.com.jpeg",
"alt": null
}
],
"download-files": [
{
"id": "5ebb1676c3244c2c6ae18814",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"slug": "cloak-of-invisibility-color-obsidian-black-7",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-01T22:40:19.287Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-01T22:40:19.287Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5dd44c493543b37d5449b383",
"_id": "5e8518536e147040726cc416"
}
]
}
],
"count": 1,
"limit": 100,
"offset": 0,
"total": 12
}
Name | Type | Description |
---|---|---|
items | [Product] | List of Item objects within the Collection. Contains product and skus keys |
count | number | Number of items returned |
limit | number | The limit specified in the request |
offset | number | The offset specified for pagination |
total | number | Total number of items in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Update 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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}' \
--header 'content-type: application/json' \
--data '{
"fields": {
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
}'
Javascript Example
const request = require('request');
const options = {
method: 'PATCH',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/products/580e63fc8c9a982ac9b8b745',
headers: {
'Accept-Version': '1.0.0',
Authorization: 'Bearer {access_token}',
'content-type': 'application/json'
},
body: {
fields: {
name: 'Exciting blog post title',
slug: 'exciting-post',
_archived: false,
_draft: false,
color: '#a98080',
author: '580e640c8c9a982ac9b8b778',
'post-body': '<p>Blog post contents...</p>',
'post-summary': 'Summary of exciting blog post',
'main-image': '580e63fe8c9a982ac9b8b749'
}
},
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
headers = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
request["Authorization"] = 'Bearer {access_token}'
request["content-type"] = 'application/json'
request.body = "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}"
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\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"fields\":{\"name\":\"Exciting blog post title\",\"slug\":\"exciting-post\",\"_archived\":false,\"_draft\":false,\"color\":\"#a98080\",\"author\":\"580e640c8c9a982ac9b8b778\",\"post-body\":\"<p>Blog post contents...</p>\",\"post-summary\":\"Summary of exciting blog post\",\"main-image\":\"580e63fe8c9a982ac9b8b749\"}}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
product_id | path | string | true | Unique identifier for a Product |
fields | body | Field | false | An instance of the Field object. |
Response
Example Response
{
"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"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “product” if the Collection is called “Product”) |
fields | [Field] | The list of fields in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
product_id | path | string | true | Unique identifier for a Product |
skus | body | [SKU] | false | An array of the SKU data your are adding |
Response
Example Response
{
"skus": [
{
"slug": "cloak-of-invisibility-color-smoke-grey",
"_archived": false,
"_draft": false,
"price": {
"unit": "USD",
"value": 120000
},
"more-images": [],
"download-files": [
{
"id": "5ebb1945c3244c2c6ae18822",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "c92a465a1298c95fd1cd7f4c1c96c2ba"
},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Smoke Grey",
"main-image": {
"fileId": "5e8512181ae993035b15f315",
"file": {
"_id": "5e8512181ae993035b15f315",
"variants": [
{
"_id": "5e85121b1ae993035b15f316",
"origFileName": "external-content.duckduckgo.com-p-500.jpeg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg",
"format": "jpeg",
"size": 54068,
"width": 500,
"quality": 100,
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg"
}
],
"origFileName": "invisibility_cloak.jpg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"fileHash": "860b1b99ce90aa6c175bfcd9fd59fd42",
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"mimeType": "image/jpeg",
"size": 192263,
"width": 550,
"height": 550,
"database": "5e8402eb8a402e354bd469bb",
"createdOn": "2020-04-01T22:13:44.889Z",
"__v": 1,
"updatedOn": "2020-04-01T22:13:59.777Z"
},
"fileSize": 192263,
"url": "https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"alt": null
},
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-03T18:50:45.947Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-03T18:50:45.947Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5e8402eb8a402e354bd469be",
"_id": "5e8785855617d73f34627a93"
},
{
"_archived": false,
"_draft": false,
"price": {
"unit": "USD",
"value": 120000
},
"more-images": [],
"download-files": [
{
"id": "5ebb1945c3244c2c6ae18823",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://dropbox.com/files/modern-web-design-process.pdf"
}
],
"sku-values": {
"a37a7991f7ca1be0d349a805a2bddb5b": "ef9511c0b56cc11ff47c5669f65030b4"
},
"width": 56,
"length": 0.3,
"height": 72,
"weight": 24,
"name": "Cloak Of Invisibility Color: Forest Green",
"main-image": {
"fileId": "5e8512181ae993035b15f315",
"file": {
"_id": "5e8512181ae993035b15f315",
"variants": [
{
"_id": "5e85121b1ae993035b15f316",
"origFileName": "external-content.duckduckgo.com-p-500.jpeg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg",
"format": "jpeg",
"size": 54068,
"width": 500,
"quality": 100,
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com-p-500.jpeg"
}
],
"origFileName": "invisibility_cloak.jpg",
"fileName": "5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"fileHash": "860b1b99ce90aa6c175bfcd9fd59fd42",
"s3Url": "https://s3.amazonaws.com/webflow-dev-assets/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"mimeType": "image/jpeg",
"size": 192263,
"width": 550,
"height": 550,
"database": "5e8402eb8a402e354bd469bb",
"createdOn": "2020-04-01T22:13:44.889Z",
"__v": 1,
"updatedOn": "2020-04-01T22:13:59.777Z"
},
"fileSize": 192263,
"url": "https://d1otoma47x30pg.cloudfront.net/5e8402eb8a402e354bd469bb/5e8512181ae993035b15f315_external-content.duckduckgo.com.jpg",
"alt": null
},
"slug": "cloak-of-invisibility-color-forest-green",
"product": "5e8518516e147040726cc415",
"updated-on": "2020-04-03T18:50:45.949Z",
"updated-by": "Person_5d8fcb6d94dd1853060fb3b3",
"created-on": "2020-04-03T18:50:45.949Z",
"created-by": "Person_5d8fcb6d94dd1853060fb3b3",
"published-on": null,
"published-by": null,
"_cid": "5e8402eb8a402e354bd469be",
"_id": "5e8785855617d73f34627a94"
}
]
}
Name | Type | Description |
---|---|---|
skus | [SKU] |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Update 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 'Accept-Version: 1.0.0' \
--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: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
product_id | path | string | true | Unique identifier for a Product |
sku_id | path | string | true | Unique identifier for a SKU |
sku | body | SKU | false | An instance of the SKU object. |
Response
Example Response
{
"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"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “sku” if the Collection is called “SKU”) |
fields | [Field] | The list of fields in the collection |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
status | query | string | false | Filter the orders by status |
offset | query | number | false | Offset used for pagination if the results have more than limit records |
limit | query | number | false | Maximum number of records to be returned (max limit: 100) |
Response
Example Response
[
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount-shipping",
"name": "Free Shipping (SHIP4FREE)",
"description": "",
"price": {
"unit": "USD",
"value": -599,
"string": "-$ 5.99 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6023,
"string": "$60.23"
}
},
"customData": [
{
"textInput": "(415) 123-4567",
"name": "Telephone"
},
{
"textArea": "Happy birthday Mom!",
"name": "Gift note"
},
{
"checkbox": true,
"name": "Send as gift"
}
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
]
Name | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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/order/:order_id
Parameters
Shell Example
curl --request GET \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415 \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("GET", "/sites/580e63e98c9a982ac9b8b741/order/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/order/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["Accept-Version"] = '1.0.0'
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/order/5e8518516e147040726cc415"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/order/5e8518516e147040726cc415");
var request = new RestRequest(Method.GET);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
order_id | path | string | true | Unique identifier for an Order |
Response
Example Response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{
"textInput": "(415) 123-4567",
"name": "Telephone"
},
{
"textArea": "Happy birthday Mom!",
"name": "Gift note"
},
{
"checkbox": true,
"name": "Send as gift"
}
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Name | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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/order/:order_id
Parameters
Shell Example
curl --request PATCH \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415 \
--header 'Accept-Version: 1.0.0' \
--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/order/5e8518516e147040726cc415',
headers: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}",
'content-type': "application/json"
}
conn.request("PATCH", "/sites/580e63e98c9a982ac9b8b741/order/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/order/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["Accept-Version"] = '1.0.0'
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/order/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("Accept-Version", "1.0.0")
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/order/5e8518516e147040726cc415");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
order_id | path | string | true | Unique identifier for an Order |
fields | body | object | false |
Response
Example Response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{
"textInput": "(415) 123-4567",
"name": "Telephone"
},
{
"textArea": "Happy birthday Mom!",
"name": "Gift note"
},
{
"checkbox": true,
"name": "Send as gift"
}
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Name | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Fulfill Order
Updates an order's status to fulfilled
Request
POST /sites/:site_id/order/:order_id/fulfill
Parameters
Shell Example
curl --request POST \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415/fulfill \
--header 'Accept-Version: 1.0.0' \
--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/order/5e8518516e147040726cc415/fulfill',
headers: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}",
'content-type': "application/json"
}
conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/order/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/order/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["Accept-Version"] = '1.0.0'
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/order/5e8518516e147040726cc415/fulfill"
payload := strings.NewReader("{\"sendOrderFulfilledEmail\":false}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Accept-Version", "1.0.0")
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/order/5e8518516e147040726cc415/fulfill");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
order_id | path | string | true | Unique identifier for an Order |
sendOrderFulfilledEmail | body | boolean | false | Whether or not the Order Fulfilled email should be sent |
Response
Example Response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{
"textInput": "(415) 123-4567",
"name": "Telephone"
},
{
"textArea": "Happy birthday Mom!",
"name": "Gift note"
},
{
"checkbox": true,
"name": "Send as gift"
}
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Name | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Unfulfill Order
Updates an order's status to unfulfilled
Request
POST /sites/:site_id/order/:order_id/unfulfill
Parameters
Shell Example
curl --request POST \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415/unfulfill \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415/unfulfill',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/order/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/order/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["Accept-Version"] = '1.0.0'
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/order/5e8518516e147040726cc415/unfulfill"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/order/5e8518516e147040726cc415/unfulfill");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
order_id | path | string | true | Unique identifier for an Order |
Response
Example Response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{
"textInput": "(415) 123-4567",
"name": "Telephone"
},
{
"textArea": "Happy birthday Mom!",
"name": "Gift note"
},
{
"checkbox": true,
"name": "Send as gift"
}
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Name | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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/order/:order_id/refund
Parameters
Shell Example
curl --request POST \
--url https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415/refund \
--header 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/order/5e8518516e147040726cc415/refund',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'Authorization': "Bearer {access_token}"
}
conn.request("POST", "/sites/580e63e98c9a982ac9b8b741/order/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/order/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["Accept-Version"] = '1.0.0'
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/order/5e8518516e147040726cc415/refund"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Accept-Version", "1.0.0")
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/order/5e8518516e147040726cc415/refund");
var request = new RestRequest(Method.POST);
request.AddHeader("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
order_id | path | string | true | Unique identifier for an Order |
Response
Example Response
{
"orderId": "dfa-3f1",
"status": "unfulfilled",
"comment": "",
"orderComment": "",
"acceptedOn": "2018-12-03T22:06:15.761Z",
"disputedOn": null,
"disputeUpdatedOn": null,
"disputeLastStatus": null,
"fulfilledOn": null,
"refundedOn": null,
"customerPaid": {
"unit": "USD",
"value": 6099,
"string": "$60.99"
},
"netAmount": {
"unit": "USD",
"value": 5892,
"string": "$58.92"
},
"requiresShipping": true,
"shippingProvider": null,
"shippingTracking": null,
"customerInfo": {
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
},
"allAddresses": [
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
{
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
],
"shippingAddress": {
"type": "shipping",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"billingAddress": {
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
},
"purchasedItems": [
{
"count": 1,
"rowTotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"productId": "5eb9fd05caef491eb9757183",
"productName": "White Cup",
"productSlug": "white-cup",
"variantId": "5eb9fcace279761d8199790c",
"variantName": "white-cup_default_sku",
"variantSlug": "white-cup-default-sku",
"variantImage": {
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
},
"variantPrice": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"height": 7,
"length": 2,
"weight": 5,
"width": 4
}
],
"purchasedItemsCount": 1,
"stripeDetails": {
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
},
"stripeCard": {
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
},
"totals": {
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
},
"extras": [
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
},
{
"type": "tax",
"name": "County Taxes",
"description": "LOS ANGELES Taxes (1.00%)",
"price": {
"unit": "USD",
"value": 55,
"string": "$0.55"
}
},
{
"type": "tax",
"name": "Special District Taxes",
"description": "Special District Taxes (2.25%)",
"price": {
"unit": "USD",
"value": 124,
"string": "$1.24"
}
},
{
"type": "shipping",
"name": "Flat Rate",
"description": "",
"price": {
"unit": "USD",
"value": 599,
"string": "$5.99"
}
},
{
"type": "discount",
"name": "Discount (SAVE5)",
"description": "",
"price": {
"unit": "USD",
"value": -500,
"string": "-$ 5.00 USD"
}
}
],
"total": {
"unit": "USD",
"value": 6122,
"string": "$61.22"
}
},
"customData": [
{
"textInput": "(415) 123-4567",
"name": "Telephone"
},
{
"textArea": "Happy birthday Mom!",
"name": "Gift note"
},
{
"checkbox": true,
"name": "Send as gift"
}
],
"downloadFiles": [
{
"id": "5e9a5eba75e0ac242e1b6f64",
"name": "The modern web design process - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5eb1aac72912ec06f561278c;5e9a5eba75e0ac242e1b6f63:ka2nehxy:4a1ee0a632feaab94294350087215ed89533f2f530903e3b933b638940e921aa"
},
{
"id": "5e9a5eba75e0ac242e1b6f63",
"name": "The freelance web designers guide - Webflow Ebook.pdf",
"url": "https://webflow.com/dashboard/download-digital-product?payload=5d93ba5e38c6b0160ab711d3;e7634a;5dd44c493543b37d5449b3cd;5e9a5eba75e0ac242e1b6f63:ka2nehxy:6af5adf7c6fff7a3b0f54404fac1be492ac6f1ed5340416f1fe27c5fd4dd8079"
}
]
}
Name | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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. |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
item_id | path | string | true | Unique identifier for and Item |
site_id | path | string | true | Unique identifier for a Site |
Response
Example Response
{
"_id": "5bfedb42bab0ad90fa7dad39",
"quantity": 83,
"inventoryType": "finite"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for a SKU item |
quantity | number | Total quantity of items remaining in inventory (if finite) |
inventoryType | string | infinite or finite |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
collection_id | path | string | true | Unique identifier for a Collection |
item_id | path | string | true | Unique identifier for and Item |
site_id | path | string | true | Unique identifier for a Site |
fields | body | object | false | The inventory fields to update |
Response
Example Response
{
"_id": "5bfedb42bab0ad90fa7dad39",
"quantity": 83,
"inventoryType": "finite"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for a SKU item |
quantity | number | Total quantity of items remaining in inventory (if finite) |
inventoryType | string | infinite or finite |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--header 'Authorization: Bearer {access_token}'
Javascript Example
const request = require('request');
const options = {
method: 'GET',
url: 'https://api.webflow.com/sites/580e63e98c9a982ac9b8b741/webhooks',
headers: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
Response
Example Response
[
{
"_id": "57ca0a9e418c504a6e1acbb6",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.148Z",
"createdOn": "2016-09-02T23:26:22.241Z"
},
{
"_id": "578d85cce0c47cd2865f4cf2",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.142Z",
"createdOn": "2016-07-19T01:43:40.585Z"
},
{
"_id": "578d85cce0c47cd2865f4cf3",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"filter": {
"name": "Email Form"
},
"lastUsed": "2016-09-06T21:12:22.192Z",
"createdOn": "2016-07-19T01:43:40.605Z"
}
]
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for a Webhook |
triggerType | TriggerType | An instance of the TriggerType object. |
triggerId | string | Unique identifier for the Webhook Trigger |
site | string | Unique identifier for a Webhook |
filter | object | filter for selecting which events you want webhooks to be triggered for. |
lastUsed | string | Date trigger was last used |
createdOn | string | Date trigger was created |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {
'Accept-Version': '1.0.0',
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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
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);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
triggerType | body | TriggerType | false | An instance of the TriggerType object. |
url | body | string | false | The https URL on your server the webhook will send a request to when the webhook is triggered |
filter | body | object | false | filter for selecting which events you want webhooks to be triggered for. |
Response
Example Response
{
"_id": "582266e0cd48de0f0e3c6d8b",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"createdOn": "2016-11-08T23:59:28.572Z"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for a Webhook |
triggerType | TriggerType | An instance of the TriggerType object. |
triggerId | string | Unique identifier for the Webhook Trigger |
site | string | Unique identifier for a Webhook |
filter | object | filter for selecting which events you want webhooks to be triggered for. |
lastUsed | string | Date trigger was last used |
createdOn | string | Date trigger was created |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
webhook_id | path | string | true | Unique identifier for a Webhook |
Response
Example Response
{
"_id": "582266e0cd48de0f0e3c6d8b",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"createdOn": "2016-11-08T23:59:28.572Z"
}
Name | Type | Description |
---|---|---|
_id | string | Unique identifier for a Webhook |
triggerType | TriggerType | An instance of the TriggerType object. |
triggerId | string | Unique identifier for the Webhook Trigger |
site | string | Unique identifier for a Webhook |
filter | object | filter for selecting which events you want webhooks to be triggered for. |
lastUsed | string | Date trigger was last used |
createdOn | string | Date trigger was created |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
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 'Accept-Version: 1.0.0' \
--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: {'Accept-Version': '1.0.0', 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 = {
'Accept-Version': "1.0.0",
'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["Accept-Version"] = '1.0.0'
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("Accept-Version", "1.0.0")
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("Accept-Version", "1.0.0");
request.AddHeader("Authorization", "Bearer {access_token}");
IRestResponse response = client.Execute(request);
Name | In | Type | Required | Description |
---|---|---|---|---|
Accept-Version | header | string | false | The API version |
site_id | path | string | true | Unique identifier for a Site |
webhook_id | path | string | true | Unique identifier for a Webhook |
Response
Example Response
{
"deleted": 1
}
Name | Type | Description |
---|---|---|
deleted | number | Number of webhooks deleted |
Response Codes
Status | Meaning | Description |
---|---|---|
200 | OK | Request was successful |
400 | SyntaxError | Request body was incorrectly formatted. Likely invalid JSON being sent up. |
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. |
Models
Error
{
"msg": "Cannot access resource",
"code": 401,
"name": "Unauthorized",
"path": "/sites/invalid_site",
"err": "Unauthorized: Cannot access resource"
}
Field | Type | Description |
---|---|---|
code | number | HTTP error code |
msg | string | Error message |
name | string | Name of error |
path | string | Path of request resulting in error |
err | string | Full error string |
problems | [string] | Array of errors (commonly on ValidationErrors) |
TriggerType
Value | Description |
---|---|
form_submission | A JSON payload of submitted form data |
site_publish | Sends an Site Publish |
ecomm_new_order | Sends an Ecommerce Order |
ecomm_order_changed | Sends an Ecommerce Order |
ecomm_inventory_changed | Sends an Ecommerce 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 |
collection_item_changed | Sends a Collection Item |
collection_item_deleted | Sends { deleted: 1, itemId: String } |
collection_item_unpublished | Sends { deleted: 1, itemId: String } |
Webhook
{
"_id": "582266e0cd48de0f0e3c6d8b",
"triggerType": "form_submission",
"triggerId": "562ac0395358780a1f5e6fbd",
"site": "562ac0395358780a1f5e6fbd",
"createdOn": "2016-11-08T23:59:28.572Z"
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for a Webhook |
triggerType | TriggerType | An instance of the TriggerType object. |
triggerId | string | Unique identifier for the Webhook Trigger |
site | string | Unique identifier for a Webhook |
filter | object | filter for selecting which events you want webhooks to be triggered for. |
lastUsed | string | Date trigger was last used |
createdOn | string | Date trigger was created |
Field
{
"name": "Exciting blog post title",
"slug": "exciting-post",
"_archived": false,
"_draft": false,
"color": "#a98080",
"author": "580e640c8c9a982ac9b8b778",
"post-body": "<p>Blog post contents...</p>",
"post-summary": "Summary of exciting blog post",
"main-image": "580e63fe8c9a982ac9b8b749"
}
Field | Type | Description |
---|---|---|
id | string | Unique identifier for the field |
slug | string | Slug of the field in the URL structure of your site for template pages |
name | string | Name given to the field |
type | FieldType | An instance of the FieldType object. |
editable | boolean | Determines if field is editable (some fields are automatically created and cannot be edited) |
required | boolean | Determines if field is required |
validations | Validation | An instance of the Validation object. |
InnerFieldType
Inner field types follow the same rules as field types, but are used to describe the type of a “Set” field Array element. They may use slightly different names in the Designer and Editor and have an “alt name” listed here which is the name of the field we publicly display. (For the API however, we only use the actual name of the field type).
Value | Description |
---|---|
ExtFileRef | An object containing name (string) and URL (string) properties |
ImageRef | Unique id for images in CMS |
FieldType
Value | Description |
---|---|
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
{
"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": {}
}
Field | Type | Description |
---|---|---|
maxLength | number | |
minLength | number | |
minimum | number | |
maximum | number | |
maxSize | number | |
decimalPlaces | number | |
singleLine | boolean | |
options | [string] | |
format | string | |
precision | number | |
allowNegative | boolean | |
collectionId | string |
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"
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “product” if the Collection is called “Product”) |
fields | [Field] | The list of fields in the collection |
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"
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “sku” if the Collection is called “SKU”) |
fields | [Field] | The list of fields in the collection |
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
}
]
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “category” if the Collection is called “Category”) |
fields | [Field] | The list of fields in the collection |
StripeDetails
{
"refundReason": null,
"refundId": null,
"disputeId": null,
"chargeId": "ch_1DdPYQKMjGA7k9mI2AKiBY6u",
"customerId": "cus_E5ajeiWNHEtcAW"
}
Field | Type | Description |
---|---|---|
refundReason | string | Stripe customer ID, or null. |
refundId | string | Stripe charge ID, or null. |
disputeId | string | Stripe dispute ID, or null. |
chargeId | string | Stripe refund ID, or null. |
customerId | string |
StripeCard
{
"last4": "4242",
"brand": "Visa",
"ownerName": "Customerio Namen",
"expires": {
"year": 2023,
"month": 12
}
}
Field | Type | Description |
---|---|---|
last4 | string | The last 4 digits on the card. |
brand | string | The card’s brand. |
ownerName | string | The name on the card. |
expires | object | The card’s expiration date. |
OrderAmount
{
"unit": "USD",
"value": 5892,
"string": "$58.92"
}
Field | Type | Description |
---|---|---|
unit | string | |
value | string | |
string | string |
OrderAddress
{
"type": "billing",
"addressee": "Customerio Namen",
"line1": "123 Example Rd",
"line2": "",
"city": "Examplesville",
"state": "CA",
"country": "US",
"postalCode": "90012"
}
Field | Type | Description |
---|---|---|
type | string | |
addressee | string | |
line1 | string | |
line2 | string | |
city | string | |
state | string | |
country | string | |
postalCode | string |
OrderCustomerInfo
{
"fullName": "Customerio Namen",
"email": "renning+customer@webflow.com"
}
Field | Type | Description |
---|---|---|
fullName | string | |
email | string |
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"
}
Field | Type | Description |
---|---|---|
id | string | |
name | string | |
url | string |
OrderItemImage
{
"fileId": "5bfedb42bab0ad90fa7dad2e",
"url": "https://d1otoma47x30pg.cloudfront.net/5bfedb42bab0ad90fa7dac03/5bfedb42bab0ad90fa7dad2e_5bb3d019b3465c6e8a324dd7_458036-unsplas.png"
}
Field | Type | Description |
---|---|---|
fileId | string | |
url | string |
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
}
Field | Type | Description |
---|---|---|
count | number | Number of item purchased. |
rowTotal | OrderAmount | An instance of the OrderAmount object. |
productId | string | String Product Id. |
productName | string | Name of the product. |
productSlug | string | Slug of the product. |
variantId | string | String Variant Id. (SKU) |
variantName | string | Name of the variant. (SKU) |
variantSlug | string | Slug of the variant. (SKU) |
variantImage | OrderItemImage | An instance of the OrderItemImage object. |
variantPrice | OrderAmount | An instance of the OrderAmount object. |
height | number | The height of the variant if provided, 0 otherwise. |
length | number | The length of the variant if provided, 0 otherwise. |
width | number | The width of the variant if provided, 0 otherwise |
weight | number | The weight of the variant if provided, 0 otherwise. |
purchasedItemsCount | number | The sum of all 'count' fields in 'purchasedItems'. |
OrderExtra
{
"type": "tax",
"name": "State Taxes",
"description": "CA Taxes (6.25%)",
"price": {
"unit": "USD",
"value": 344,
"string": "$3.44"
}
}
Field | Type | Description |
---|---|---|
type | string | The type of extra item this is. |
name | string | A human-readable (but English) name for this extra charge. |
description | string | A human-readable (but English) description of this extra charge. |
price | OrderAmount | An instance of the OrderAmount object. |
OrderTotals
{
"subtotal": {
"unit": "USD",
"value": 5500,
"string": "$55.00"
}
}
Field | Type | Description |
---|---|---|
subtotal | OrderAmount | An instance of the OrderAmount object. |
extras | [OrderExtra] | An array of extra items, includes discounts, shipping, and taxes. |
total | OrderAmount | An instance of the OrderAmount object. |
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"
}
]
}
Field | Type | Description |
---|---|---|
orderId | string | The order id. Will usually be 6 hex characters, but can also be 9 hex characters if the site has a very large number of orders. Randomly assigned. |
status | string | One of pending , unfulfilled , fulfilled , disputed , dispute-lost , or refunded |
comment | string | A comment string for this order editable by API user (not used by Webflow). |
orderComment | string | A comment that the customer left when making their order |
acceptedOn | string | The ISO8601 timestamp that an order was placed. |
disputedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp that Stripe notifies Webflow. Null if not disputed. |
disputeUpdatedOn | string | If an order was disputed by the customer, then this key will be set with the ISO8601 timestamp of the last time that we got an update. Null if not disputed. |
disputeLastStatus | string | If an order was disputed by the customer, then this key will be set |
with the dispute's status. | ||
fulfilledOn | string | If an order was marked as 'fulfilled', then this is the ISO8601 timestamp when that happened. |
refundedOn | string | If an order was refunded, this is the ISO8601 of when that happened. |
customerPaid | OrderAmount | An instance of the OrderAmount object. |
netAmount | OrderAmount | An instance of the OrderAmount object. |
requiresShipping | boolean | A boolean indicating whether the order contains one or more purchased items that require shipping. |
shippingProvider | string | A string editable by the API user to note the shipping provider used (not used by Webflow). |
shippingTracking | string | A string editable by the API user to note the shipping tracking number for the order (not used by Webflow). |
customerInfo | OrderCustomerInfo | An instance of the OrderCustomerInfo object. |
allAddresses | [OrderAddress] | All addresses provided by the customer during the ordering flow. |
shippingAddress | OrderAddress | An instance of the OrderAddress object. |
billingAddress | OrderAddress | An instance of the OrderAddress object. |
purchasedItems | [OrderPurchasedItem] | An array of all things that the customer purchased. |
stripeDetails | StripeDetails | An instance of the StripeDetails object. |
stripeCard | StripeCard | An instance of the StripeCard object. |
totals | OrderTotals | An instance of the OrderTotals object. |
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
{
"_id": "5bfedb42bab0ad90fa7dad39",
"quantity": 83,
"inventoryType": "finite"
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for a SKU item |
quantity | number | Total quantity of items remaining in inventory (if finite) |
inventoryType | string | infinite or finite |
EcommerceSettings
{}
Field | Type | Description |
---|---|---|
createdOn | string | Date that the site was created on |
site | string | The id of the site being queried |
defaultCurrency | string | The three-letter currency code of the site |
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"
}
}
Field | Type | Description |
---|---|---|
_id | string | |
createdOn | string | |
grantType | string | |
lastUsed | string | |
sites | [Site] | |
orgs | [string] | |
workspaces | [string] | |
users | [string] | |
rateLimit | integer | |
status | string | |
application | Application | An instance of the Application object. |
Application
{}
Field | Type | Description |
---|---|---|
_id | string | |
description | string | |
homepage | string | |
name | string | |
owner | string | |
ownerType | string |
AuthorizedUser
{
"user": {
"_id": "545bbecb7bdd6769632504a7",
"email": "some@email.com",
"firstName": "Some",
"lastName": "One"
}
}
Field | Type | Description |
---|---|---|
_id | string | The unique id of the user |
email | string | The user's email address |
firstName | string | The user's first name |
lastName | string | The user's last name |
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"
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for site |
createdOn | string | Date the site was created |
name | string | Name given to site |
shortName | string | Slugified version of name |
lastPublished | string | Date site was last published |
previewUrl | string | URL of a generated image for the given site |
timezone | string | Site timezone set under Site Settings |
SitePublish
{
"site": "62749158efef318abc8d5a0f",
"publishTime": 1653619272801,
"domains": [
"my-website.webflow.io"
],
"publishedBy": {
"name": "Some One",
"id": "123460a7b6c16def4527122d"
}
}
Field | Type | Description |
---|---|---|
site | string | The site id that was published |
publishTime | string | The timestamp of the publish event |
domains | [string] | The domains that were published |
publishedBy | object | The name and id of the user who published the site |
Domain
{}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for domain |
name | string | The domain name |
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"
}
]
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for collection |
lastUpdated | string | The date the collection was last updated |
createdOn | string | The date the collection was create |
name | string | Name given to Collection |
slug | string | Slug of Collection in Site URL structure |
singularName | string | The name of one Item in Collection (e.g. “post” if the Collection is called “Posts”) |
fields | [Field] | The list of fields in the collection |
Item
{
"value": {
"_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",
"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"
},
"x-ref": "#/components/examples/Item",
"x-model": "Item"
}
Field | Type | Description |
---|---|---|
_archived | boolean | Boolean determining if the Item is set to archived |
_draft | boolean | Boolean determining if the Item is set to draft |
_id | string | Unique identifier for the Item |
_cid | string | Unique identifier for the Collection the Item belongs within |
name | string | Name given to the Item |
slug | string | URL structure of the Item in your site. Note: Updates to an item slug will break all links referencing the old slug. |
User
{
"_id": "6287ec36a841b25637c663df",
"createdOn": "2022-05-20T13:46:12.093Z",
"updatedOn": "2022-05-20T13:46:12.093Z",
"emailVerified": true,
"status": "verified",
"data": {
"accept-privacy": false,
"accept-communications": false,
"email": "Some.One@home.com",
"name": "Some One"
}
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for the User |
createdOn | string | The timestamp the user was created |
updatedOn | string | The timestamp the user was updated |
invitedOn | string | The timestamp the user was invited |
lastLogin | string | The timestamp the user was logged in |
emailVerified | boolean | Shows whether the user has verified their email address |
status | string | The status of the user |
data | object | An object containing the User's basic info and custom fields |
AccessGroup
{
"_id": "62be58d404be8a6cc900c081",
"name": "Webflowers",
"shortId": "jo",
"slug": "webflowers",
"createdOn": "2022-08-01T19:41:48.349Z"
}
Field | Type | Description |
---|---|---|
_id | string | Unique identifier for the Access Group |
name | string | Name of the the Access Group |
shortId | string | Shortened unique identifier based on name, optimized for its use in the user’s JWT |
slug | string | Shortened unique identifier based on name, optimized for human readability and public API use |
createdOn | string | The date the Access Group was created |