API Documentation: Objects: Product

Patrick Thill edited this page Oct 23, 2013 · 8 revisions

Go back to read introductory information and usage guidelines about the API.

Object name

product

Associated Capabilities

read_products

Object Description

A Product is an item for sale by the merchant. Products cannot be purchased - only Product Variants can be bought. For example, an apparel seller has products for each t-shirt style. For a given t-shirt style, each size is its own product variant; the customer buys a particular size (variant) of a particular t-shirt (product).

The Lexity implementation of this API is intended to be familiar to Shopify developers, and so the fields that a product may contain are the same as those currently offered by Shopify. Because we do not store all of the data that Shopify does, some of these fields may be null. The provided fields are:

Field Description Notes
body_html The displayable description of the product.
created_at The date that the product was first added. Format: ISO 8601
url The url for the product page. Not guaranteed to be the canonical URL, for stores with many paths for the same product.
handle Always null. Not yet supported.
id A string holding the platform-specific unique product id.
product_type A string describing the general type of the product. Often but not always related to a collection that the product is in.
published_at Always null. Not yet supported.
template_suffix Always null. Not yet supported.
title The name of the product
updated_at The date the product was last updated. Format: ISO 8601
vendor The manufacturer of the product.
tags Zero or more product attributes, separated by commas.
variants An embedded list of all product variants for this product. See Product Variants.
images An embedded list of all product images for this product. See Product Images.
options Always null. Not yet supported.

Support for these fields may vary among the different platforms we support.

Query Parameters Available for this Object:

Field Description Notes
vendor Return product(s) with the given vendor (or an empty list). Filters via exact match.
product_type Return product(s) with the given product_type (or an empty list). Filters via exact match.
category_id Return product(s) contained in the category with the given category_id (or an empty list). Filters via exact match.
limit Limit of number of prodcuts in the response. Defaults to 50, maximum allowed value is 250.
page For paginated responses, the page to show. Defaults to 1.
since_id Only show objects with product_id greater than this value. Works by string comparison, even if the strings hold integers.
created_at_min Show objects created after this date. Format: YYYY-MM-DD
created_at_max Show objects created before this date. Format: YYYY-MM-DD
updated_at_min Show objects updated after this date. Format: YYYY-MM-DD
updated_at_max Show objects updated before this date. Format: YYYY-MM-DD
fields Comma-separated string with the fields you want returned in the response body. Defaults to null, indicating you want all fields to be returned.

Available API Interactions

Get all products

Request

GET {base_url}/products.json

Request data

(empty)

Example response

HTTP/1.1 200 OK

{
    "products": [{
        "updated_at": "2010-05-14T02:02:42Z",
        "title": "Vision-oriented exuding adapter",
        "body_html": "<p>So this is a product.</p>\n<p>The text you see here is a Product Description. Every product has a price, a weight, a picture and a description.  To edit the description of this product or to create a new product you can go to the <a href=\"/admin/products\">Products Tab</a> of the administration menu.</p>\n<p>Once you have mastered the creation and editing of products you will want your products to show up on your Shopify site.  There is a two step process to do this.</p>\n<p>First you need to add your products to a Collection.  A Collection is an easy way to group products together. If you go to the <a href=\"/admin/collections\">Collections Tab</a> of the administration menu you can begin creating collections and adding products to them.</p>\n<p>Second you&#8217;ll need to create a link from your shop&#8217;s navigation menu to your Collections. You can do this by going to the <a href=\"/admin/links\">Navigations Tab</a> of the administration menu and clicking on &#8220;Add a link&#8221;.</p>\n<p>Good luck with your shop!</p>",
        "vendor": "Shopify",
        "product_type": "Shirts",
        "images": [],
        "tags": "Demo, T-Shirt",
        "variants": [{
            "updated_at": "2010-05-14T02:02:42Z",
            "product_id": "11968542",
            "taxable": null,
            "title": "Medium",
            "fulfillment_service": null,
            "price": "19.00",
            "inventory_management": null,
            "inventory_policy": null,
            "requires_shipping": null,
            "grams": null,
            "position": null,
            "option3": "",
            "option2": "",
            "option1": "Medium",
            "id": "30426592",
            "inventory_quantity": 5,
            "created_at": "2010-05-14T02:02:42Z",
            "compare_at_price": null,
            "sku": null
        }],
        "options": null,
        "id": "11968542",
        "template_suffix": null,
        "handle": null,
        "created_at": "2010-05-14T02:02:42Z",
        "published_at": null
    }, {
        "updated_at": "2010-05-14T02:02:41Z",
        "title": "Optimized client-driven migration",
        "body_html": "<p>So this is a product.</p>\n<p>The text you see here is a Product Description. Every product has a price, a weight, a picture and a description.  To edit the description of this product or to create a new product you can go to the <a href=\"/admin/products\">Products Tab</a> of the administration menu.</p>\n<p>Once you have mastered the creation and editing of products you will want your products to show up on your Shopify site.  There is a two step process to do this.</p>\n<p>First you need to add your products to a Collection.  A Collection is an easy way to group products together. If you go to the <a href=\"/admin/collections\">Collections Tab</a> of the administration menu you can begin creating collections and adding products to them.</p>\n<p>Second you&#8217;ll need to create a link from your shop&#8217;s navigation menu to your Collections. You can do this by going to the <a href=\"/admin/links\">Navigations Tab</a> of the administration menu and clicking on &#8220;Add a link&#8221;.</p>\n<p>Good luck with your shop!</p>",
        "vendor": "Shopify",
        "product_type": "Shirts",
        "images": [],
        "tags": "Demo, T-Shirt",
        "variants": [{
            "updated_at": "2010-05-14T02:02:41Z",
            "product_id": "11968552",
            "taxable": null,
            "title": "Medium",
            "fulfillment_service": null,
            "price": "19.00",
            "inventory_management": null,
            "inventory_policy": null,
            "requires_shipping": null,
            "grams": null,
            "position": null,
            "option3": "",
            "option2": "",
            "option1": "Medium",
            "id": "30426602",
            "inventory_quantity": 5,
            "created_at": "2010-05-14T02:02:41Z",
            "compare_at_price": null,
            "sku": null
        }],
        "options": null,
        "id": "11968552",
        "template_suffix": null,
        "handle": null,
        "created_at": "2010-05-14T02:02:41Z",
        "published_at": null
    }, {
        "updated_at": "2010-05-14T02:02:42Z",
        "title": "Vision-oriented tertiary monitoring",
        "body_html": "<p>So this is a product.</p>\n<p>The text you see here is a Product Description. Every product has a price, a weight, a picture and a description.  To edit the description of this product or to create a new product you can go to the <a href=\"/admin/products\">Products Tab</a> of the administration menu.</p>\n<p>Once you have mastered the creation and editing of products you will want your products to show up on your Shopify site.  There is a two step process to do this.</p>\n<p>First you need to add your products to a Collection.  A Collection is an easy way to group products together. If you go to the <a href=\"/admin/collections\">Collections Tab</a> of the administration menu you can begin creating collections and adding products to them.</p>\n<p>Second you&#8217;ll need to create a link from your shop&#8217;s navigation menu to your Collections. You can do this by going to the <a href=\"/admin/links\">Navigations Tab</a> of the administration menu and clicking on &#8220;Add a link&#8221;.</p>\n<p>Good luck with your shop!</p>",
        "vendor": "Shopify",
        "product_type": "Shirts",
        "images": [],
        "tags": "Demo, T-Shirt",
        "variants": [{
            "updated_at": "2010-05-14T02:02:42Z",
            "product_id": "11968562",
            "taxable": null,
            "title": "Medium",
            "fulfillment_service": null,
            "price": "19.00",
            "inventory_management": null,
            "inventory_policy": null,
            "requires_shipping": null,
            "grams": null,
            "position": null,
            "option3": "",
            "option2": "",
            "option1": "Medium",
            "id": "30426612",
            "inventory_quantity": 5,
            "created_at": "2010-05-14T02:02:42Z",
            "compare_at_price": null,
            "sku": null
        }],
        "options": null,
        "id": "11968562",
        "template_suffix": null,
        "handle": null,
        "created_at": "2010-05-14T02:02:42Z",
        "published_at": null
    }]
}

Get a product by id

Request

GET {base_url}/products/{product_id}.json

Request data

(empty)

Example response

HTTP/1.1 200 OK

{
    "product": {
        "updated_at": "2010-05-14T02:02:42Z",
        "title": "Vision-oriented exuding adapter",
        "body_html": "<p>So this is a product.</p>\n<p>The text you see here is a Product Description. Every product has a price, a weight, a picture and a description.  To edit the description of this product or to create a new product you can go to the <a href=\"/admin/products\">Products Tab</a> of the administration menu.</p>\n<p>Once you have mastered the creation and editing of products you will want your products to show up on your Shopify site.  There is a two step process to do this.</p>\n<p>First you need to add your products to a Collection.  A Collection is an easy way to group products together. If you go to the <a href=\"/admin/collections\">Collections Tab</a> of the administration menu you can begin creating collections and adding products to them.</p>\n<p>Second you&#8217;ll need to create a link from your shop&#8217;s navigation menu to your Collections. You can do this by going to the <a href=\"/admin/links\">Navigations Tab</a> of the administration menu and clicking on &#8220;Add a link&#8221;.</p>\n<p>Good luck with your shop!</p>",
        "vendor": "Shopify",
        "product_type": "Shirts",
        "images": [],
        "tags": "Demo, T-Shirt",
        "variants": [{
            "updated_at": "2010-05-14T02:02:42Z",
            "product_id": "11968542",
            "taxable": null,
            "title": "Medium",
            "fulfillment_service": null,
            "price": "19.00",
            "inventory_management": null,
            "inventory_policy": null,
            "requires_shipping": null,
            "grams": null,
            "position": null,
            "option3": "",
            "option2": "",
            "option1": "Medium",
            "id": "30426592",
            "inventory_quantity": 5,
            "created_at": "2010-05-14T02:02:42Z",
            "compare_at_price": null,
            "sku": null
        }],
        "options": null,
        "id": "11968542",
        "template_suffix": null,
        "handle": null,
        "created_at": "2010-05-14T02:02:42Z",
        "published_at": null
    }
}

Count products

Request

GET {base_url}/products/count.json

Request data

(empty)

Example response

HTTP/1.1 200 OK

{
  "count": 100
}

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.