PageOfProducts Object

Overview

The REST API makes extensive use of the PageOfProducts object whenever working with a list of products.  This article will help you to know the various members of this object.

Requirements

The following pre-requisites will be necessary to accomplish the goals of this article:

  • General understanding of REST and API’s
  • Understanding of C# and/or JavaScript

Getting Started

There are no tasks needed to get started with understanding this object. 

PageOfProducts

The PageOfProducts object will contain all of the details of the products returned in a page format for your Hotcakes Commerce store.

Members

The following table gives you details on the various members of the PageOfProducts object.  The descriptions are based upon default functionality and the default Viewset included with Hotcakes.

Member Default Description
Products List of ProductDTO This property will contain a list of products for the requested page. You will find one ProductDTO result for each product.  If the page size was 10, then 10 products will be found in this list, unless there are less than 10 products in the store or this is the last page of results which also contains less than 10 products.
TotalProductCount Integer The total product count allows you to know how many products that there are to be returned, which helps you properly query for additional pages of results, as well as adjust the user interface or logic, as necessary.

 

Example of PageOfProducts

{
   "Errors":[

   ],
   "Content":{
      "Products":[
         {
            "Bvin":"142034eb-dc7b-4e20-989b-2efedca66150",
            "Sku":"SAMPLE001",
            "ProductName":"Blue Bracelet",
            "ProductTypeId":"",
            "CustomProperties":[
               {
                  "DeveloperId":"hcc",
                  "Key":"swatchpath",
                  "Value":""
               }
            ],
            "ListPrice":0.0000000000,
            "SitePrice":42.9500000000,
            "SitePriceOverrideText":"",
            "SiteCost":0.0000000000,
            "MetaKeywords":"Blue,Bracelet,Sample,Demo",
            "MetaDescription":"Sample Blue Bracelet for Demonstration",
            "MetaTitle":"Sample Blue Bracelet",
            "TaxExempt":false,
            "TaxSchedule":-1,
            "ShippingDetails":{
               "IsNonShipping":false,
               "ExtraShipFee":0.0000000000,
               "Weight":2.0000000000,
               "Length":6.0000000000,
               "Width":6.0000000000,
               "Height":3.0000000000,
               "ShippingSource":1,
               "ShippingSourceId":"",
               "ShipSeparately":false
            },
            "ShippingMode":1,
            "Status":1,
            "ImageFileSmall":"BraceletBlue.png",
            "ImageFileSmallAlternateText":"Blue Bracelet SAMPLE001",
            "ImageFileMedium":"BraceletBlue.png",
            "ImageFileMediumAlternateText":"Blue Bracelet SAMPLE001",
            "CreationDateUtc":"\/Date(1398071723923)\/",
            "MinimumQty":1,
            "ShortDescription":"",
            "LongDescription":"An incredible blue bracelet sample product. This item is not actually for sale. It is a sample product to demonstrate how your store may look with products loaded",
            "ManufacturerId":"",
            "VendorId":"",
            "GiftWrapAllowed":false,
            "GiftWrapPrice":0.0000000000,
            "Keywords":"bracelett",
            "PreContentColumnId":"",
            "PostContentColumnId":"",
            "UrlSlug":"blue-bracelet",
            "InventoryMode":100,
            "IsAvailableForSale":true,
            "Featured":true,
            "AllowReviews":true,
            "Tabs":[
               {
                  "Bvin":"711cbc90-0d7b-4682-a769-c8226b1db3b3",
                  "TabTitle":"Sustainability",
                  "HtmlData":"\u003cp\u003eAll of our jewelry products are recycled and made in sustainable eco-friendly environments\u003c/p\u003e",
                  "SortOrder":1
               }
            ],
            "StoreId":1
         },
         {
            "Bvin":"e4ef52ac-086c-4986-856d-c17a054b69ca",
            "Sku":"SAMPLE004",
            "ProductName":"Brown Fedora",
            "ProductTypeId":"",
            "CustomProperties":[
               {
                  "DeveloperId":"hcc",
                  "Key":"swatchpath",
                  "Value":""
               }
            ],
            "ListPrice":0.0000000000,
            "SitePrice":59.8700000000,
            "SitePriceOverrideText":"",
            "SiteCost":0.0000000000,
            "MetaKeywords":"",
            "MetaDescription":"",
            "MetaTitle":"",
            "TaxExempt":false,
            "TaxSchedule":-1,
            "ShippingDetails":{
               "IsNonShipping":false,
               "ExtraShipFee":0.0000000000,
               "Weight":20.0000000000,
               "Length":12.0000000000,
               "Width":12.0000000000,
               "Height":10.0000000000,
               "ShippingSource":1,
               "ShippingSourceId":"",
               "ShipSeparately":false
            },
            "ShippingMode":1,
            "Status":1,
            "ImageFileSmall":"indiana-jones-hat.jpg",
            "ImageFileSmallAlternateText":"Brown Fedora SAMPLE004",
            "ImageFileMedium":"indiana-jones-hat.jpg",
            "ImageFileMediumAlternateText":"Brown Fedora SAMPLE004",
            "CreationDateUtc":"\/Date(1398071726013)\/",
            "MinimumQty":1,
            "ShortDescription":"",
            "LongDescription":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum",
            "ManufacturerId":"",
            "VendorId":"",
            "GiftWrapAllowed":false,
            "GiftWrapPrice":0.0000000000,
            "Keywords":"",
            "PreContentColumnId":"",
            "PostContentColumnId":"",
            "UrlSlug":"brown-fedora",
            "InventoryMode":100,
            "IsAvailableForSale":true,
            "Featured":true,
            "AllowReviews":true,
            "Tabs":[

            ],
            "StoreId":1
         }
      ],
      "TotalProductCount":6
   }
}
Have more questions? Submit a request

Need More Help?

Do you need more assistance with this article? Please review your support options.