ProductDTO Object

Overview

The REST API makes extensive use of the ProductDTO object whenever working with a single product.  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. 

ProductDTO

The ProductDTO object will contain all of the details of a single product for your Hotcakes Commerce store.

Members

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

Member Default Description
AllowReviews False If set to true, this product will allow reviews to be saved by customers.
Bvin (empty string) The unique ID or primary key of the product.
CreationDateUtc UtcNow The creation date is used for auditing purposes to know when the product was first created.
CustomProperties Empty List of CustomPropertyDTO A collection of custom product meta data that can be used for any API or integration-based purposes.
Featured False When set to true, this property tells the application to allow this product to be listed in the featured product view.
ImageFileMedium (empty string) The file name of the medium version of the primary product image.
ImageFileMediumAlternateText (empty string) The localized text saved specifically to be used for the medium version of the primary product image.
ImageFileSmall (empty string) The file name of the small version of the primary product image.
ImageFileSmallAlternateText (empty string) The localized text saved specifically to be used for the small version of the primary product image.
InventoryMode 100 The value of this property defines how the product will be treated by the application once it is out of stock. The possible values include:
  • NotSet = -1
  • Unknown = 0
  • AlwaysInStock = 100
  • WhenOutOfStockHide = 101
  • WhenOutOfStockShow = 102
  • WhenOutOfStockAllowBackorders = 103
IsAvailableForSale True A dymanically propulated property to help the views know if this product is available, based upon status and inventory mode/levels.
IsSearchable False If true, the product will be indexed and available in the store's search engine.
Keywords (empty string) This property contains search keywords that will be used by the native search engine, but not exposed to public search engines.  This is a great place to put keywords that might relate to competitive product/service names.
ListPrice 0.00 This is the price that the product is normally sold to the public as.
LongDescription (empty string) This is the product description that is shown to customers.  This value contains HTML.
ManufacturerId (empty string) This property defines a manufacturer that this product is created by.
MetaDescription (empty string) The meta description is used for both indexing the product in the local search engine and for injecting into the meta data of the web page.
MetaKeywords (empty string) The meta keywords are used for both indexing the product in the local search engine and for injecting into the meta data of the web page.
MetaTitle (empty string) The meta title is used for both indexing the product in the local search engine and for injecting into the meta data of the web page.
MinimumQty 1 When greater than zero, this value will be the minimum allowable quantity for the product before the cart allows it to be added.
PostContentColumnId (empty string) If specified, the content block matching the given ID will be presented as a footer element below the product listing.
PreContentColumnId (empty string) If specified, the content block matching the given ID will be presented as a header element above the product listing.
ProductName (empty string) The product name is the title of the product as a customer will see it.  This value should be the localized version of the product name.
ProductTypeId (empty string) A unique ID matching a product type that this product should be treated as.
ShippingDetails Empty ShippableItemDTO This represents a collection of properties related to shipping the current product.
ShippingMode 1 This defines where the product will be shipped from. The possible values include:
  • NotSet = -1
  • Unknown = 0
  • AlwaysInStock = 100
  • WhenOutOfStockHide = 101
  • WhenOutOfStockShow = 102
  • WhenOutOfStockAllowBackorders = 103
SiteCost 0.00 This property should reflect the amount that this product cost to acquire.
SitePrice 0.00 The site price reflects the actual price that a customer will pay, regardless to the list price (MSRP).  This value will not reflect changes made by sales, price groups, or offers.
Sku (empty string) A SKU is the "stock keeping unit" and is often used as a primary or unique key to identify the product across multiple mediums and systems.
Status 1 This property maps to the "active" checkbox in the user interface and determines if the product will be available to customers or not. The possible values include:
  • NotSet = -1
  • Disabled = 0
  • Active = 1
StoreId 0 This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
Tabs Empty List of ProductDescriptionTabDTO A collection of info tabs that contain additional product details and are generally found below the product description.
TaxExempt False If true, tax rules and calculation will not be applied to this product.
TaxSchedule -1 When specified, this allows the current product to be applied against the specified tax schedule.
UrlSlug (empty string) This unique value will be the final set of characters after the last slash in the page URL.
VendorId (empty string) This property defines a vendor that this product is distributed by.

 

Example of ProductDTO

{
   "Errors":[

   ],
   "Content":{
      "Bvin":"e1a7d7fe-ac54-4d2f-9292-c66b279cea63",
      "Sku":"HCC-SWAG-0001",
      "ProductName":"Hotcakes Commerce Lunchbox",
      "ProductTypeId":"",
      "CustomProperties":[
         {
            "DeveloperId":"HCC",
            "Key":"ERPID",
            "Value":"0123456789"
         }
      ],
      "ListPrice":0,
      "SitePrice":39.00,
      "SitePriceOverrideText":"",
      "SiteCost":0,
      "MetaKeywords":"",
      "MetaDescription":"",
      "MetaTitle":"",
      "TaxExempt":false,
      "TaxSchedule":-1,
      "ShippingDetails":{
         "IsNonShipping":false,
         "ExtraShipFee":0,
         "Weight":2,
         "Length":10,
         "Width":8,
         "Height":6,
         "ShippingSource":0,
         "ShippingSourceId":"",
         "ShipSeparately":false
      },
      "ShippingMode":0,
      "Status":1,
      "ImageFileSmall":"",
      "ImageFileSmallAlternateText":"",
      "ImageFileMedium":"",
      "ImageFileMediumAlternateText":"",
      "CreationDateUtc":"\/Date(1401404833759)\/",
      "MinimumQty":1,
      "ShortDescription":"",
      "LongDescription":"",
      "ManufacturerId":"",
      "VendorId":"",
      "GiftWrapAllowed":false,
      "GiftWrapPrice":0,
      "Keywords":"",
      "PreContentColumnId":"",
      "PostContentColumnId":"",
      "UrlSlug":"Hotcakes-Commerce-Lunchbox",
      "InventoryMode":100,
      "IsAvailableForSale":true,
      "IsSearchable":true,
      "Featured":false,
      "AllowReviews":false,
      "Tabs":[
         {
            "Bvin":"b217a21e-a744-4ff6-a0ad-8c8adf90d3b3",
            "TabTitle":"Videos",
            "HtmlData":"\u003cp\u003eHere is what some of our fans have to say.\u003c/p\u003e\u003ciframe width=\"640\" height=\"360\" src=\"//www.youtube.com/embed/jJeSkXPQr64?list=UU4nJrjQn81VRiT8PC9E9oZA\" frameborder=\"0\" allowfullscreen\u003e\u003c/iframe\u003e",
            "SortOrder":0
         },
         {
            "Bvin":"c7a56bb9-de12-4489-ae34-762894f947aa",
            "TabTitle":"Photos",
            "HtmlData":"\u003cp\u003eHere are some of our fans using the lunchbox.\u003c/p\u003e\u003ciframe src=\"//www.flickr.com/photos/39131389@N08/6321518895/lightbox/player/\" width=\"75\" height=\"75\" frameborder=\"0\" allowfullscreen webkitallowfullscreen mozallowfullscreen oallowfullscreen msallowfullscreen\u003e\u003c/iframe\u003e",
            "SortOrder":0
         }
      ],
      "StoreId":1
   }
}
Have more questions? Submit a request

Need More Help?

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