Products

Creating an product

Endpoint

POST /v1/products

Parameters

Name Description
name required Name of product
sku required SKU
slug slug
description description
excerpt excerpt
saleprice saleprice
free_shipping free_shipping
shippable shippable
taxable taxable
fixed_quantity fixed_quantity
weight weight
track_stock track_stock
quantity quantity
related_products related_products
seo_title seo_title
enabled enabled
video video
height height
width width
depth depth
factory_price factory_price
installments installments
stared stared
seo_description seo_description
subscription_days subscription_days
subscription_period subscription_period
subscription_trial subscription_trial
reduction_type reduction_type
purchasable purchasable
reduction_amount reduction_amount
parent_id parent_id
production_time production_time
categories List of categories
category_ids List of category ids
property_ids List of property ids
images List of images
product_type Possible values standard, packageable, variantable

Request

curl "https://capi.storyblok.com/v1/products" -d '{"name":"product 1","sku":"1530723430.8917","categories":[{"name":"Cat 1","euid":"cat1"},{"name":"Cat 2","euid":"cat2"}],"images":[{"filename":"images.jpg","type":"Teaser"}],"product_type":"standard"}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=BZFrtzaHAync8rmhC9NlhQtt" \

Response

{
  "id": 40397,
  "sku": "1530723430.8917",
  "ean": null,
  "name": "product 1",
  "slug": null,
  "description": null,
  "description_md": null,
  "excerpt": null,
  "price": 0.0,
  "saleprice": 0.0,
  "realprice": 0.0,
  "free_shipping": false,
  "shippable": true,
  "taxable": true,
  "fixed_quantity": false,
  "weight": "0",
  "track_stock": false,
  "quantity": null,
  "related_products": null,
  "images": [
    {
      "type": "Teaser",
      "alt": "Teaser",
      "original_filename": "images.jpg",
      "filename": "http://assets.storeblok.com/uploads/images/medium/images.jpg",
      "primary": null
    }
  ],
  "seo_title": null,
  "meta": null,
  "enabled": true,
  "video": "",
  "height": 0.0,
  "width": 0.0,
  "depth": 0.0,
  "factory_price": 0.0,
  "video_img": null,
  "installments": null,
  "stared": null,
  "seo_description": "",
  "seo_keywords": "",
  "variant_details": false,
  "subscription_days": null,
  "subscription_period": null,
  "subscription_trial": null,
  "lookable": null,
  "purchasable": true,
  "reduction_type": "",
  "reduction_amount": null,
  "parent_id": 0,
  "production_time": 0,
  "display_size_as": null,
  "child_image": null,
  "category_ids": [
    29920,
    29921
  ],
  "property_ids": [

  ],
  "primary_image": "http://assets.storeblok.com/uploads/images/medium/images.jpg",
  "rating_value": 0,
  "review_count": 0,
  "product_option_ids": [

  ],
  "product_type": "standard",
  "sales": 0,
  "updated_at": "2018-07-04T16:57:10.000Z",
  "created_at": "2018-07-04T16:57:10.000Z",
  "currency": "USD"
}

Deleting a product

Endpoint

DELETE /v1/products/:id

Request

curl "https://capi.storyblok.com/v1/products/40405" -d '' -X DELETE \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=8ERHd7bw2I4rUrh1XthNIQtt" \

Get a product

Endpoint

GET /v1/products/:id

Parameters

Name Description
currency Currency

Request

Query Parameters

currency=EUR
curl "https://capi.storyblok.com/v1/products/40392?currency=EUR" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=DDfQX8VD9cjqwtRJQCOkgQtt" \

Response

{
  "id": 40392,
  "sku": "1530723430.5307",
  "ean": "",
  "name": "tamara",
  "slug": "jina.sawayn",
  "description": null,
  "description_md": null,
  "excerpt": null,
  "price": 5.0,
  "saleprice": 0.0,
  "realprice": 5.0,
  "free_shipping": false,
  "shippable": true,
  "taxable": true,
  "fixed_quantity": false,
  "weight": "0",
  "track_stock": false,
  "quantity": 0,
  "related_products": null,
  "images": [

  ],
  "seo_title": null,
  "meta": null,
  "enabled": true,
  "video": "",
  "height": 0.0,
  "width": 0.0,
  "depth": 0.0,
  "factory_price": 0.0,
  "video_img": "",
  "installments": 0,
  "stared": false,
  "seo_description": "",
  "seo_keywords": "",
  "variant_details": false,
  "subscription_days": 0,
  "subscription_period": "",
  "subscription_trial": null,
  "lookable": false,
  "purchasable": true,
  "reduction_type": "",
  "reduction_amount": 0.0,
  "parent_id": 0,
  "production_time": 0,
  "display_size_as": "",
  "child_image": null,
  "category_ids": [
    29917
  ],
  "property_ids": [

  ],
  "primary_image": "",
  "rating_value": 3,
  "review_count": 2,
  "product_option_ids": [

  ],
  "product_type": "standard",
  "sales": 0,
  "updated_at": "2018-07-04T16:57:10.000Z",
  "created_at": "2018-07-04T16:57:10.000Z",
  "currency": "EUR"
}

Getting a list of products

Endpoint

GET /v1/products

Parameters

Name Description
page Current page of products
sku Filter by sku
product_ids Filter by product ids
slug Filter by Slug
filter_by Filter by product category ids
term Search by term
enabled Filter by enabled
available Filter by available
parent_id Filter by parent_id
currency Currency
product_type Possible values standard, packageable, variantable

Request

Query Parameters

page=1
curl "https://capi.storyblok.com/v1/products?page=1" -X GET \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=r8qQMNAaE8R5nuQWLgXqSgtt" \

Response

[
  {
    "id": 40377,
    "sku": "tshirt",
    "ean": "",
    "name": "Demo Product",
    "slug": "tshirt",
    "description": null,
    "description_md": null,
    "excerpt": null,
    "price": 0.0,
    "saleprice": 0.0,
    "realprice": 0.0,
    "free_shipping": false,
    "shippable": true,
    "taxable": true,
    "fixed_quantity": false,
    "weight": "0",
    "track_stock": false,
    "quantity": 0,
    "related_products": null,
    "images": [
      {
        "type": null,
        "alt": null,
        "original_filename": "s/42531/tshirt.jpg",
        "filename": "http://assets.storeblok.com/s/42531/tshirt.jpg",
        "primary": false
      }
    ],
    "seo_title": null,
    "meta": null,
    "enabled": true,
    "video": "",
    "height": 0.0,
    "width": 0.0,
    "depth": 0.0,
    "factory_price": 0.0,
    "video_img": "",
    "installments": 0,
    "stared": false,
    "seo_description": "",
    "seo_keywords": "",
    "variant_details": false,
    "subscription_days": 0,
    "subscription_period": "",
    "subscription_trial": null,
    "lookable": false,
    "purchasable": true,
    "reduction_type": "",
    "reduction_amount": 0.0,
    "parent_id": 0,
    "production_time": 0,
    "display_size_as": "",
    "child_image": null,
    "category_ids": [
      0
    ],
    "property_ids": [

    ],
    "primary_image": "http://assets.storeblok.com/s/42531/tshirt.jpg",
    "rating_value": 0,
    "review_count": 0,
    "product_option_ids": [

    ],
    "product_type": "standard",
    "sales": 0,
    "updated_at": "2018-07-04T16:57:09.000Z",
    "created_at": "2018-07-04T16:57:09.000Z",
    "currency": "USD"
  },
  {
    "id": 40378,
    "sku": "new",
    "ean": "",
    "name": "houston.gorczany",
    "slug": "nelia",
    "description": null,
    "description_md": null,
    "excerpt": null,
    "price": 10.5,
    "saleprice": 0.0,
    "realprice": 10.5,
    "free_shipping": false,
    "shippable": true,
    "taxable": true,
    "fixed_quantity": false,
    "weight": "0",
    "track_stock": false,
    "quantity": 0,
    "related_products": null,
    "images": [

    ],
    "seo_title": null,
    "meta": null,
    "enabled": true,
    "video": "",
    "height": 0.0,
    "width": 0.0,
    "depth": 0.0,
    "factory_price": 0.0,
    "video_img": "",
    "installments": 0,
    "stared": false,
    "seo_description": "",
    "seo_keywords": "",
    "variant_details": false,
    "subscription_days": 0,
    "subscription_period": "",
    "subscription_trial": null,
    "lookable": false,
    "purchasable": true,
    "reduction_type": "",
    "reduction_amount": 0.0,
    "parent_id": 0,
    "production_time": 0,
    "display_size_as": "",
    "child_image": null,
    "category_ids": [

    ],
    "property_ids": [

    ],
    "primary_image": "",
    "rating_value": 0,
    "review_count": 0,
    "product_option_ids": [

    ],
    "product_type": "standard",
    "sales": 0,
    "updated_at": "2018-07-04T16:57:09.000Z",
    "created_at": "2018-07-04T16:57:09.000Z",
    "currency": "USD"
  },
  {
    "id": 40380,
    "sku": "1530723429.406877",
    "ean": "",
    "name": "leeann",
    "slug": "shirlene",
    "description": null,
    "description_md": null,
    "excerpt": null,
    "price": 10.5,
    "saleprice": 0.0,
    "realprice": 10.5,
    "free_shipping": false,
    "shippable": true,
    "taxable": true,
    "fixed_quantity": false,
    "weight": "0",
    "track_stock": false,
    "quantity": 0,
    "related_products": null,
    "images": [

    ],
    "seo_title": null,
    "meta": null,
    "enabled": true,
    "video": "",
    "height": 0.0,
    "width": 0.0,
    "depth": 0.0,
    "factory_price": 0.0,
    "video_img": "",
    "installments": 0,
    "stared": false,
    "seo_description": "",
    "seo_keywords": "",
    "variant_details": false,
    "subscription_days": 0,
    "subscription_period": "",
    "subscription_trial": null,
    "lookable": false,
    "purchasable": true,
    "reduction_type": "",
    "reduction_amount": 0.0,
    "parent_id": 0,
    "production_time": 0,
    "display_size_as": "",
    "child_image": null,
    "category_ids": [
      29911
    ],
    "property_ids": [

    ],
    "primary_image": "",
    "rating_value": 3,
    "review_count": 2,
    "product_option_ids": [

    ],
    "product_type": "standard",
    "sales": 0,
    "updated_at": "2018-07-04T16:57:09.000Z",
    "created_at": "2018-07-04T16:57:09.000Z",
    "currency": "USD"
  },
  {
    "id": 40379,
    "sku": "1530723429.3877382",
    "ean": "",
    "name": "roma",
    "slug": "henriette.zemlak",
    "description": null,
    "description_md": null,
    "excerpt": null,
    "price": 10.5,
    "saleprice": 0.0,
    "realprice": 10.5,
    "free_shipping": false,
    "shippable": true,
    "taxable": true,
    "fixed_quantity": false,
    "weight": "0",
    "track_stock": false,
    "quantity": 0,
    "related_products": null,
    "images": [

    ],
    "seo_title": null,
    "meta": null,
    "enabled": true,
    "video": "",
    "height": 0.0,
    "width": 0.0,
    "depth": 0.0,
    "factory_price": 0.0,
    "video_img": "",
    "installments": 0,
    "stared": false,
    "seo_description": "",
    "seo_keywords": "",
    "variant_details": false,
    "subscription_days": 0,
    "subscription_period": "",
    "subscription_trial": null,
    "lookable": false,
    "purchasable": true,
    "reduction_type": "",
    "reduction_amount": 0.0,
    "parent_id": 0,
    "production_time": 0,
    "display_size_as": "",
    "child_image": null,
    "category_ids": [

    ],
    "property_ids": [

    ],
    "primary_image": "",
    "rating_value": 0,
    "review_count": 0,
    "product_option_ids": [

    ],
    "product_type": "standard",
    "sales": 0,
    "updated_at": "2018-07-04T16:57:09.000Z",
    "created_at": "2018-07-04T16:57:09.000Z",
    "currency": "USD"
  }
]

Updating a product

Endpoint

PUT /v1/products/:id

Parameters

Name Description
name required Name of product
category_ids List of category ids
property_ids List of property ids
categories List of categories
properties List of properties
translations Translation. Array of objects with key, body, language

Request

curl "https://capi.storyblok.com/v1/products/40401" -d '{"name":"product 1","category_ids":[29923],"categories":[{"name":"Cat 1","euid":"cat1"},{"name":"Cat 2","euid":"cat2"}],"properties":[{"name":"Prop 1","euid":"prop1"},{"name":"Prop 2","euid":"prop2","parent_id":"prop2"}]}' -X PUT \
	-H "Accept: application/json" \
	-H "Content-Type: application/json"
	-H "Authorization: Token token=1Un2VMFyubMpAYYopido6gtt" \

Response

{
  "id": 40401,
  "sku": "1530723431.235436",
  "ean": "",
  "name": "product 1",
  "slug": "marlena_rosenbaum",
  "description": null,
  "description_md": null,
  "excerpt": null,
  "price": 10.5,
  "saleprice": 0.0,
  "realprice": 10.5,
  "free_shipping": false,
  "shippable": true,
  "taxable": true,
  "fixed_quantity": false,
  "weight": "0",
  "track_stock": false,
  "quantity": 0,
  "related_products": null,
  "images": [

  ],
  "seo_title": null,
  "meta": null,
  "enabled": true,
  "video": "",
  "height": 0.0,
  "width": 0.0,
  "depth": 0.0,
  "factory_price": 0.0,
  "video_img": "",
  "installments": 0,
  "stared": false,
  "seo_description": "",
  "seo_keywords": "",
  "variant_details": false,
  "subscription_days": 0,
  "subscription_period": "",
  "subscription_trial": null,
  "lookable": false,
  "purchasable": true,
  "reduction_type": "",
  "reduction_amount": 0.0,
  "parent_id": 0,
  "production_time": 0,
  "display_size_as": "",
  "child_image": null,
  "category_ids": [
    29924,
    29925
  ],
  "property_ids": [
    29926,
    29927
  ],
  "primary_image": "",
  "rating_value": 3,
  "review_count": 2,
  "product_option_ids": [

  ],
  "product_type": "standard",
  "sales": 0,
  "updated_at": "2018-07-04T16:57:11.000Z",
  "created_at": "2018-07-04T16:57:11.000Z",
  "currency": "USD"
}