OptionItemDTO Object

Overview

The REST API makes extensive use of the OptionOtemDTO object whenever working with a product that has one or more choices for a customer.  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. 

OptionItemDTO

The OptionItemDTO object will contain all of the details of each individual choice for a specific option in your Hotcakes Commerce store.

Members

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

Member Default Description
Bvin (empty string) The unique ID or primary key of the current product option item.
IsDefault False When True, this item will be used as the default item over other items that might be associated with the same product option.
IsLabel False Used with the drop down list OptionType, this item will be rendered differently if true. All other OptionTypes will ignore this item unless this value is false.
Name (empty string) This is that localized name of the product option item as customers will see it.
OptionBvin (empty string) This value refers to the Option ID that this item belongs to.
PriceAdjustment 0 If this item belongs to a variant, this value will be the new price when this product option item is selected.
SortOrder 0 This value is used to sort this item when grouped with other items.
StoreId 0 This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
WeightAdjustment 0 If this item belongs to a variant, this value will be the new weight when this product option item is selected.

 

Example of OptionDTO

{
   "Errors":[

   ],
   "Content":
         {
            "Bvin":"92061e92-8680-47c0-a956-8c0e3152c852",
            "StoreId":1,
            "OptionBvin":"dc2d6134-0dbe-422a-beae-096273787fd3",
            "Name":"Red",
            "PriceAdjustment":0,
            "WeightAdjustment":0,
            "IsLabel":false,
            "SortOrder":1,
            "IsDefault":false
         }
}
Have more questions? Submit a request

Need More Help?

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