Data Object: Product

Get Product


{{ data.product.get(:id) }}

Parameter Type Description
id required int Product Identifier

HHTP/1.1 200 OK
{
     id: 5,
     alias: 'lego-batman',
     categoryId: 10,
     categoryName: Baby Toys,
     brandId: 2,
     title: "Lego BatMan",
     description: "Celebrate THE LEGO® BATMAN MOVIE with a LEGO BrickHeadz Batman!",
     seoTitle: "Lego BatMan - Store",
     seoKeywords: "lego, batman, sale",
     seoDescription: "Celebrate The Lego Batman Movie",
     schemaJson: "{}",
     quantity: 5,
     price: 9.99,
     salePrice: 7.5
     saleStartDate: "", 
     saleEndDate: "",
     propertyGroups: [
         {
              id: 0,
              title: "Default",
              properties: [
                  {
                      id: 1,
                      type: 1,
                      title: "Technology",
                      valueId: null,
                      value: "GSM HSPA LTE/4G 3G CDMA EVDO"  
                  }
              ]
         },
         {
              id: 1,
              title: "Platform",
              properties: [
                  {
                      id: 1,
                      type: 1,
                      title: "Operation System",
                      valueId: 2,
                      value: "Android 11"  
                  }
              ]
         }
     ],
     thumbnail: "https://test.com/middle-image.png",
     photos: [
         800: "https://test.com/large-image.png",
         300: "https://test.com/middle-image.png",
         100: "https://test.com/small-image.png"
     ],
     facebookImageUrl: "https://test.com/fb.png",
     created: {
         date: "2017-08-13 04:47:28.000000", 
         timezone: "America/Los_Angeles"
     },
     updated: {
         date: "2017-08-13 04:47:28.000000", 
         timezone: "America/Los_Angeles"
     }
}

or

false

Parameter Type Description
id int Product Identifier
alias string Product alias
categoryId int Category Identifier
categoryName string Category Name
brandId int Brand Identifier
title string Product Title
description string Product Description
seoTitle string Meta title
seoKeywords string SEO keywords
seoDescription string SEO description
schemaJson string Schema for search engines
quantity int Product availability
price float Product actual price
salePrice float Product sale price
saleStartDate string Product sale start date
saleEndDate string Product sale end date
propertyGroups array Product related property groups
propertyGroup.id int Property group identifier. Group with id=0, it's a default group
propertyGroup.title string Title of property group
propertyGroup.properties array Related properties
propertyGroup.property.id int Property identifier
propertyGroup.property.type int Property type (1: Predefined, 2: Custom Value)
propertyGroup.property.title string Property title
propertyGroup.property.valueId int | null Property value identifier. Value with valueId=null, it's a custom value for product
propertyGroup.property.value string Property value
thumbnail string Product thumbnail
photos array Product photos
facebookImageUrl string Facebook og:image
created object Product creation date info
created.date string Product creation date
created.timezone string Server timezone
updated object Product modified date
updated.date string Product updated date
updated.timezone string Server timezone


Get Products List


{{ data.product.list({}) }}

Parameter Type Description
limit int Limit for listing
recently boolean Order by recently products
random boolean Order by random products
category-id int Products by category identifier
in-stock string Included products with status out of stock (in-stock='all' include products)
not-product-id int Without product by identifier
not-product-alias string Without product by alias
categories string Category identifiers by string query
propertyValues string Property value identifiers by string query
brand int Products by brand identifier
search string Search keyword for product title
ids array Product identifiers by array
sale boolean Only Sale Products
min-price float Product minimum price or sale price
max-price float Product maximum price or sale price
pagination boolean Convert response to array (See Pagination Response tab)

HTTP/1.1 200 OK
{
    {
         id: 5,
         alias: 'lego-batman',
         categoryId: 10,
         categoryName: Baby Toys,
         brandId: 2,
         title: "Lego BatMan",
         description: "Celebrate THE LEGO® BATMAN MOVIE with a LEGO BrickHeadz Batman!",
         seoTitle: "Lego BatMan - Store",
         seoKeywords: "lego, batman, sale",
         seoDescription: "Celebrate The Lego Batman Movie",
         schemaJson: "{}",
         quantity: 5,
         price: 9.99,
         salePrice: 7.5
         saleStartDate: "", 
         saleEndDate: "",
         thumbnail: "https://test.com/middle-image.png",
         photos: [
              800: "https://test.com/large-image.png",
              300: "https://test.com/middle-image.png",
              100: "https://test.com/small-image.png"
         ],
         facebookImageUrl: "https://test.com/fb.png",
         created: "",
         updated: ""
    }
    ...
}

or

[]
HTTP/1.1 200 OK
{
    count: 10,
    data: [
       {
            id: 5,
            categoryId: 10,
            categoryName: Baby Toys,
            brandId: 2,
            title: "Lego BatMan",
            description: "Celebrate THE LEGO® BATMAN MOVIE with a LEGO BrickHeadz Batman!",
            quantity: 5,
            price: 9.99,
            salePrice: 7.5
            saleStartDate: "", 
            saleEndDate: "",
            thumbnail: "https://test.com/middle-image.png",
            photos: [
                 800: "https://test.com/large-image.png",
                 300: "https://test.com/middle-image.png",
                 100: "https://test.com/small-image.png"
            ],
            facebookImageUrl: "https://test.com/fb.png"
            created: "",
            updated: ""
       }
       ...
    ]
}

or

{
    count: 0,
    data: []
}

Parameter Type Description
id int Product Identifier
alias string Product alias
categoryId int Category Identifier
categoryName string Category Name
brandId int Brand Identifier
title string Product Title
description string Product Description
seoTitle string Meta title
seoKeywords string SEO keywords
seoDescription string SEO description
schemaJson string Schema for search engines
quantity int Product availability
price float Product actual price
salePrice float Product sale price
saleStartDate string Product sale start date
saleEndDate string Product sale end date
thumbnail string Product thumbnail
photos array Product photos
facebookImageUrl string Facebook og:image
created string Product creation date
updated string Product modified date


Compare Products


{{ data.product.compare([productId1, productId2]) }}

Parameter Type Description
productId1 required int First product Identifier
productId2 required int Second product Identifier

HTTP/1.1 200 OK
{
    properties: [
        {
            id: 1,
            type: 1,
            title: "Screen Size",
            values: [
                productId1: {
                    id: 5,
                    title: "14 inch"
                }
                productId2: {
                    id: 5,
                    title: "16 inch"
                },      
            ]
        },
        {
            id: 2,
            type: 2,
            title: "Wireless",
            values: [
                productId1: null,
                productId2: {
                    id: null,
                    title: "Yes"
                },      
            ]
        } 
    ]    
}

or

{
    properties: []
}

Parameter Type Description
properties array Compared properties
property.id int Compared property Identifier
property.type int Compared property type (1: Predefined, 2: Custom Value)
property.title string Compared property title
property.values array Compared property values
property.value.id int Compared property value identifier
property.value.title string Compared property value title