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,
     title: "Lego BatMan",
     description: "Celebrate THE LEGO® BATMAN MOVIE with a LEGO BrickHeadz Batman!",
     quantity: 5,
     price: 9.99,
     salePrice: 7.5
     saleStartDate: "", 
     saleEndDate: "",
     properties: [
         {
              id: 1,
              key: "Color",
              value: "Green"
         }
     ],
     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"
     ],
     created: "",
     updated: ""
}

or

false

Parameter Type Description
id int Product Identifier
categoryId int Category Identifier
categoryName string Category Name
title string Product Title
description string Product Description
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
properties array Product properties
thumbnail string Product thumbnail
photos array Product photos
created string Product creation date
updated string Product modified date


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
not-product-id int Without product by identifier
categories string Category 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,
         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"
         ],
         created: "",
         updated: ""
    }
    ...
}

or

[]
HTTP/1.1 200 OK
{
    count: 10,
    data: [
       {
            id: 5,
            categoryId: 10,
            categoryName: Baby Toys,
            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"
            ],
            created: "",
            updated: ""
       }
       ...
    ]
}

or

{
    count: 0,
    data: []
}

Parameter Type Description
id int Product Identifier
categoryId int Category Identifier
categoryName string Category Name
title string Product Title
description string Product Description
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
created string Product creation date
updated string Product modified date