Product

A product is an individual item for sale in a FlickRocket shop. Products are often digital, but may also be physical products (such as a T-Shirt) or services.

A product may have licenses or product variants, images and trailers. A product may also be a part of a collection.

What can you do with Product?

The FlickRocket API lets you do the following with the Product resource. More detailed versions of these general actions may be available:

GET /api/products.json
Receive a list of all Products

GET /api/products/count.json
Receive a count of all Products

GET /api/products.json?query=title:<Product Title>
Query a list of products by field value. Supported fields are:version, title, comment ,product_id, product_type 

GET /api/products.json?fields=id,images,title
Just return the listed properties.(support only the the first level, not properties in a array )  

GET /api/products/#{id}.json
Receive a single Product

POST /api/products.json
Create a new Product

PUT /api/products/#{id}.json
Modify an existing Product

DELETE /api/products/#{id}.json
Remove a Product from the database

Product Properties

allow_download_trial
{"allow_download_trial": 0}

Set to 1 to allow a download of the software in the shop without requiring a purchase. It is typically used together with the trial option for the protection.

attribute_set_id
{"attribute_set_id": null}

The id of the associated attribute set.

categories

"categories": []

Categories are used to sort products in the shop. A product can be part of multiple categories.

{"category_id": 197}

ID uniquely identifying the category.

{"created_at": "2012-04-16T13:54:12"}

GMT date and time when the category binding was created. This property is read only.

{"id": 6788}

ID uniquely identifying this category binding.

chapters 

"chapters": []

Chapers segment video into multiple parts. The player can jump from one part to the next and previous chapters or navigate to a certain chapter. All chapters are retunred sorted by their position in the content.

{"id": 97}

ID uniquely identifying this chapter.

{"name": "The beginning"}

Name of the chapter as displayed in the player.

{"runtime": 600}

Runtime of the chapter in seconds.

Note: Supported only for video products

comment
{"comment": "Comment for this product"}

A comment which can be entered for each product in the admin interface. It is not displayed anywhere in the shop or player.

created_at
{"created_at": "2015-07-30T09:27:21"}

The date and time the product was created. This property is read only.

drm_protected
{"drm_protected": true}

Set to true if DRM protection is applied to the product. This property is read only after the initial creation.

groups

"groups": 

There are different types of groups. In general certain actions can be made for groups and thus apply to all products which belong to this group. Examples for groups are:

Subscription Group Products in a subscription group are associated to a subscription plan. All members of the subscrioption which are in good standing have access to all products in the group under the license associated with the subscription plan. 
Access Group Products in an access group are associated with a group access. All members of the access group have access to all products in the group under the license associated and times set with the group access.
Sharing Group Products in a sharing group can be shared with other FlickRocket shop owners so that these shop owners can sell the products in the sharing group in their own shop.
{"created_at": "2015-07-30T09:26:04"}

Date and time the product was added to the group. This property is read only.

{"end_at": null} 

GMT date and time until which the product is made available in the group. If no end time is specified, it is set to null and the product is available.

{"group_id": "c-1"}

The first characteris the type of the group followed by an ID. c=Access Group / s=Subscription Group  / p=Sharing Group

{"start_at": null} 

GMT date and time from which the product is made available in the group. If no start time is specified, it is set to null and the product is available.

gtin
{"gtin": "123456789012"}

Global Trade Identifiction Number used for unique identification of physical products.

id
{"id": 51957}

Unique ID identifying the product.

items_in_stock
{"items_in_stock": null}

Specifies the number of items in stock for sale. Reserved items (ordered but not shipped) are already deducted. Set to null if stock is not managed.

Note: Supported only for physical products.

locales 

"locales": []

The locales settings define the display in the shop for a certain language. If no data is specified for a certain language, the fallback is to english. If english does not exist, the shop uses the first available locale data.

{"description": "<p>A detailed product description</p>"}

The description displayed in the shop for this language. May include HTML markup.

{"email_text": "Make sure to also check out other great products."}

Text to be added to this product’s section in the the sales confirmation email. May include HTML markup.

{"id": 72565}

ID uniquely identifying the product locale

{"language_id": "en"} 

The language of this locale information.

{"product_url": ""}

The product URL can contain additional information for a product, available from a trial version of the product. It is displayed on the trial dialog of protected software.

{"seo_description": "MyProduct is the leading solution to 42"}

This text is used for the HTML description tag on the product page. If not specified, FlickRocket gen-erates it based on the product data.

{"seo_keywords": "MyProduct, solution, 42"}

This text is used for the HTML keywords tag on the product page. If not specified, FlickRocket gener-ates it based on the product data.

{"seo_title": "MyProduct"}

This text is used for the HTML title tag on the product page. If not specified, FlickRocket generates it based on the product data.

{"src": "https://admin.flickrocket.com/GetImage/ProductPicture/NTc4MzI%3d"}

This URL provides access to the product picture.

{"title": "MyProduct"}

The name displayed in the shop for this language.

{"version": "1.2"}

Localized version information for this locale.

manage_stock
{"manage_stock": null}

Set to true if the shop handles the inventory. 

Note: Supported only for physical products.

mirrrored
{ "mirrored": false }

Set to true for mirrored products from other shops. Product data of mirrored products cannot be changed.

pre_sales
{"pre_sales": false}

If set to true, the product is available in the shop for presale before the release date. This is also possible if the product is not completely set up, e.g. for digital products no content has been uploaded.  

preview_pictures

"preview_pictures": []

In addition to the product pictures, any product can have up to 256 preview pictures wich can be displayed on the product page.

{"id": 231445}

A unique ID identifying the preview picture.

{"src": "https://admin.flickrocket.com/GetImage/PreviewPicture/MjMxNDQ1"}

URL of the preview picture which can be used to download or upload a preview picture.

price_license_binding 

"price_license_binding": []

The price_license_binding defines the licenses and associated prices under which a product is offered. While digital products can have multiple entries, physical products are limited to one price_id/compare_price_id each and must not have a license_id.

{"compare_price_id": null}

The compare_price_id defines the pricing model which can be displayed in the shop as compare price.

{"hd": false}

This flag defines if this price license binding is for an HD or SD version of a video product. Ignored for other product types.

{"id": 144393}

This ID uniquely defines this price_license_binding entry.

{"license_id": null}

The license_id defines the license associated to the price in this price_license_binding (digital products only).

{"price_id": 3859}

The price_id defines the pricing model which the shop uses for the associated license (digital product) or physical product.

product_type
{"product_type": 19}

Defines the type of the product. 

Reserved

0 Reserved

Video (SD)

1 Video (SD)

Reserved

2 Reserved

Web Access

3 Access to a web site with FlickRocket based access control.

Software

4 Software (exe/app) and generic files

Audio

5 Audio Collection based on MP3 files

Physical

6 Physical product for shipping or POS.

Package

7 Packaged content (e.g. HTML based files or PDF)

Collection

8 Collection of multiple other products which are all included when the collection is sold.

Video (HD)

9 Video (HD) which includes and SD version of the content (automatically generated or manually uploaded)

Reserved

10 Reserved

Reserved

11 Reserved

Reserved 12 Reserved
Reserved 13 Reserved
Reserved 14 Reserved
Reserved

15 Reserved

eBook

16 ePub

Service

17 A service offering which unlike physical products, does nto require shipping.

App

18 An app to be used internally by a FlickRocket based shop or for being sold in the FlickRocket App store.

Theme

19 A theme to be used internally by a FlickRocket based shop or for being sold in the FlickRocket Theme store.

Certificate

20 A  certificate to be sold in a Flickrocket based shop.

Variation

21 A collection of multiple other products from which one can be selected when the variation is offered.

product_id
{"product_id": "0000-CAF5-4ED6-822A"}

Unique ID identifying the product. This ID is displayed in the admin interface and Content Tools. This property is read only after the initial product creation

published_at
{"published_at": "2015-07-30T09:27:21"}

Date and time of the release. If this date is in the future, the product is not available in the shop unless the pre_sales is set to true. This date can be used as sort order of the products in the shop.

runtime
{"runtime": 3600}

The runtime for products in seconds. Only valid for video and audio products. 

supplier
{"supplier": null}

Unique identifier of a product supplier. Suppliers can be given direct access to reports.

tagging

"tagging":

Generic tagging information for the product, which might be displayed in the shop.

{"id": 0}

Uniquely identifies this tagging data.

{"isbn": ""}

The ISBN number of the product. Only valid for books, audio and video.

{"year": ""}

The year the product was released.

tagging_genre

"tagging_genre":[] 

This data is used to associate the product with certain genres.

{"id": 14046}

Unique identifier  for this genre binding.

{"value": "Comedy"}

The associated genre.

Note: Tagging_genre is only supported for audio/video/book products

tagging_studios

"tagging_studios": []

This data is used to associate the product with certain studios.

{"id": 14046}

Unique identifier  for this studio binding.

{"value": "Comedy"}

The associated studio.

Note: tagging_studios is only supported for audio/video/book products

tagging_people

"tagging_people": []

People in volved in making the content

{"id": 43126}

Unique identifier for this person.

{"role": "Emperor James B. Pirk"}

The role of the person, e.g. the acted role name.

{"person": "Samuli Torssonen"}

The name of the person/actor.

Note: Tagging_people is only supported for audio/video/book products

tagging_script

"tagging_script": []

Script writer information

{"id": 39351}

Unique identifier  for this script writers binding.

{"person": "Rudi Airisto, Jarmo Puskala"}

the name of the script writer.

Note: Tagging_genre is only supported for audio/video/book products

tagging_director

"tagging_director": []

Director information.

{"id": 39352}

Unique identifier for this director binding.

{"person": "Timo Vuorensola"}

Name of the director

Note: Tagging_director is only supported for audio/video/book products

themes

"themes": []

Themes define the design (web site) and all communication (e.g. emails) with customers. Each theme is operated under a different domain. Products associated to a certain theme or to all themes are displayed under that theme/domain. 

{"id": 107827}

ID uniquely intifying this theme binding.

{"theme_id": -1}

ID uniquely intifying this theme. Set to "-1" for all themes.

{"created_at": "2015-07-30T09:26:04"}

GMT date and time when the theme binding was created. This property is read only.

title
{"title": "Avalanche"} 

The name of the product as used in the admin interface. If no localization is defined in the locales, this name is used as fallback in the shop and player.

updated_at
{"updated_at": "2015-07-30T15:27:37"}

The date and time of the last product update. This property is read only.

version
{"version": "1.0"}

A version identification for this product. Might be overwritte by locale information if present.

weight
{"weight": "90"}

The weight of the product in grams.

Note: Only valid for physical products.

Endpoints

GET/api/products.json

Get a list of products

ids A comma-separated list of product ids
since_id Restrict results to after the specified ID
created_at_min Show products created after date (format: 2014-04-25T16:15:47-04:00)
created_at_max Show products created before date (format: 2014-04-25T16:15:47-04:00)
updated_at_min Show products last updated after date (format: 2014-04-25T16:15:47-04:00)
updated_at_max Show products last updated before date (format: 2014-04-25T16:15:47-04:00)
published_at_min Show products published after date (format: 2014-04-25T16:15:47-04:00)
published_at_max Show products published before date (format: 2014-04-25T16:15:47-04:00)
published_status
  • published - Show only published products
  • unpublished - Show only unpublished products
  • any - Show all products (default)
product_type Show only products of specific type
query field:value; Filter list of results, supported fields are:version, title, comment ,product_id, product_type
fields comma-separated list of fields to include in the response

Get all products

GET /api/products.json

View Response

Get all products, showing only some attributes

GET /api/products.json?fields=id,images,title

View Response

Get a specific list of products

GET /api/products.json?ids=2874,2762

View Response

Get all products after the specified ID

GET /api/products.json?since_id=13235

View Response

Count all products

GET /api/products/count.json

View Response

Get a single product

GET api/products/0000-0ACA-3360-B681.json

View Response

Get only particular fields

GET api/products/0000-0ACA-3360-B681.json?fields=id,title,categories

View Response

POST/api/products.json

Create a new product

Create a product minimum information

POST /api/products.json
{
  "product": {
      "title": "New Product",
      "product_type": 1

  }
}

View Response

Trying to create a product without a product type will return an error

POST /api/products.json
{
  "product": {
      "title": "New Product",
      "locales": [{
          "title": "New Product",
          "language_id": "en"
      }]
  }
}

View Response

Create a new, movie product with theme assign and license/price binding

POST /api/products.json
{
  "product": {
      "title": "New Product",
      "product_type": 1,
      "drm_protected": true,
      "locales": [{
          "title": "New Product",
          "description": "New Product description",
          "language_id": "en"
      }],
      "themes": [{
          "theme_id": -1
      }],
      "price_license_binding": [{
          "license_id": 16,
          "price_id": 32,
          "hd": false,
          "compare_price_id": null
      }]
  }
}

View Response


Create a new product with a product image which will be downloaded by FlickRocket

POST /api/products.json

{
  "product": {
      "title": "New Product",
      "product_type": 1,
      "locales": [{
          "language_id": "en",
          "title": "Big Buck Bunny",
          "description": "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge. Licensed under the Creative Commons Attribution license.",
          "src": "https://www.example.com/images/Cover.png"
      }]
  }
}

View Response

PUT/api/products/#{id}.json

Update a product and associated variants and images

Update a product's title

PUT /api/products/0000-0B3A-5DA6-3EB3.json
{
 "product": {
      "title": "New product title"
     }
}

View Response

Update a product's title and german description

PUT /api/products/0000-0B3A-5DA6-3EB3.json
{
  "product": {
      "title": "Big Buck Bunny",
      "locales": [{
          "description": "New description",
          "id": "10631"
      }]
  }
}

View Response

Update a product's SEO title and description

PUT /api/products/#{id}.json{
"product": {
  "locales": [{
          "seo_title": "Brand New Title",
          "seo_description": "Description",
          "id": "10631"
      }]
  }
}

View Response

Update a product, clearing product images

PUT /api/products/0000-0B3A-5DA6-3EB3.json
{
  "product": {
      "preview_pictures": []
  }
}

View Response

Show a hidden product by changing the published attribute to true

PUT /api/products/#{id}.json
{
"product": {
  "id": 632910392,
  "published": true
  }
}

View Response

Update a product, adding a new product image

PUT /api/products/#{id}.json
{
  "product": {
      "id": 632910392,
      "images": [
      {
          "id": 850703190
      },
      {
          "id": 562641783
      },
      {
          "src": "https://example.com/rails_logo.gif"
      }]
  }
}

View Response

Hide a published product by changing the published attribute to false

PUT /api/products/#{id}.json
{
"product": {
  "id": 632910392,
  "published": false
  }
}

View Response

DELETE/api/products/#{id}.json

Remove a product from the shop

Delete a product along with all its variants and images

DELETE /api/products/0000-DE92-284B-A450.json

View Response