Beginner
13m read

Admin Setup

1
Upload Image

To upload a new image set the image URL to the corresponding item’s field in a POST, PUT or PATCH request. Collection items that reuse images previously uploaded can just reference their fileId property.

curl -X PUT 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8' \
 -H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
 -H 'accept-version: 1.0.0' \
 -H "Content-Type: application/json" \
 --data-binary $'{
     "fields": {
       "name": "Updated Exciting blog post title",
       "slug": "exciting-post",
       "_archived": false,
       "_draft": false,
       "color": "#a98080",
       "author": "580e640c8c9a982ac9b8b778",
       "post-body": "<p>Blog post contents...</p>",
       "post-summary": "Summary of exciting blog post",
       "main-image": "http://somesite.com/image20.jpg"
     }
   }'

const webflow = new Webflow({ token: api_token });

// Promise <Item>
const item = webflow.updateItem({
 collectionId: '580e63fc8c9a982ac9b8b745',
 itemId: '58338a5735ca4f023b9f1847',
 fields: {
   'name': 'Updated Exciting blog post title',
   'slug': 'exciting-post',
   '_archived': false,
   '_draft': false,
   'color': '#a98080',
   'author': '580e640c8c9a982ac9b8b778',
   'post-body': '<p>Blog post contents...</p>',
   'post-summary': 'Summary of exciting blog post',
   'main-image': 'http://somesite.com/image20.jpg',
 }
});

item.then(i => console.log(i));

2

Obtain your API keys

Stripe authenticates your API requests using your account’s API keys. If you don’t include your key when making an API request, or use one that is incorrect or outdated, Stripe returns an error.

Every account has two pairs of keys: one for testing and one for running live transactions. All API requests exist in either test or live mode, and objects—customers, prices, coupons, and so forth—in one mode can’t be manipulated by objects in the other.

Your API keys are always available in the Dashboard. For your convenience, your test API keys for your account

{
 "_id": "5da0e5abc0fbee1769d2861f",
 "name": "Products",
 "slug": "product",
 "singularName": "Product",
 "createdOn": "2019-10-11T20:27:23.139Z",
 "lastUpdated": "2019-10-11T20:27:23.219Z",
 "fields": [
   {

{
     "id": "a523d65419cb62e54ec13f62e3e01c48",
     "name": "Description",
     "slug": "description",
     "type": "PlainText",
     "required": false,
     "editable": true
   },
   {

3

Android SDK

The Android SDK is open source and fully documented.

To install the SDK, add stripe-android to the dependencies block of your app/build.gradle file:

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

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

4
Upload Image

To upload a new image set the image URL to the corresponding item’s field in a POST, PUT or PATCH request. Collection items that reuse images previously uploaded can just reference their fileId property.

curl -X PATCH 'https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items/582bbba8dae4fb7a75bd30e8' \
 -H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
 -H 'accept-version: 1.0.0' \
 -H "Content-Type: application/json" \
 --data-binary $'{
     "fields": {
       "name": "Updated Exciting blog post title",
     }
   }'

const webflow = new Webflow({ token: api_token });

// Promise <Item>
const item = webflow.patchItem({
 collectionId: '580e63fc8c9a982ac9b8b745',
 itemId: '58338a5735ca4f023b9f1847',
 fields: {
   'name': 'Patched Exciting blog post title',
   'slug': 'exciting-post',
   '_archived': false,
   '_draft': false,
   'color': '#4353FF',
 }
}, { live: true });

5

Inner Field Types

Inner field types follow the same rules as field types, but are used to describe the type of a “Set” field Array element. They may use slightly different names in the Designer and Editor and have an “alt name” listed here which is the name of the field we publicly display. (For the API however, we only use the actual name of the field type)

curl https://api.webflow.com/collections/580e63fc8c9a982ac9b8b745/items?limit=1 \
   -H "Authorization: Bearer d59f681797fbb3758b2a0ce8e5f31a199e2733110cb468bb2bb0d77f23417b32" \
   -H 'accept-version: 1.0.0'

const webflow = new Webflow({ token: api_token });

// Promise <[ Item ]>
const items = webflow.items({ collectionId: '580e63fc8c9a982ac9b8b745' }, { limit: 1 });

items.then(i => console.log(i));

Next doc

Try Engrafa — it's free

Engrafa is number one project managment tool. Make your team collaboration as seamless as possible.

Go to Engrafa.com