LineItemDTO Object

Overview

The REST API makes use of the LineItemDTO object whenever working with orders.  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. 

LineItemDTO

The LineItemDTO object will contain all of the most details of the individual line items or products for orders made in your Hotcakes Commerce store.

Members

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

Member Default Description
BasePricePerItem 0 The base price of the product matching this line item.
CustomProperties new List of CustomPropertyDTO A collection of the custom properties for this line item - great to be used for integration.
DiscountDetails new List of DiscountDetailDTO A collection of all promotions being applied to this line item.
ExtraShipCharge 0 A fixed amount added to the line item from the product in addition to the shipping fee required from the shipping provider.
Id 0 The unique ID of the current line item.
IsNonShipping False Reflects whether the matching product for this line item is shippable or not.
LastUpdatedUtc UtcNow The last updated date is used for auditing purposes to know when the line item was last updated.
OrderBvin (empty string) The unique ID or bvin of the order that this line item belongs to.
ProductId (empty string) The unique ID or bvin of the product matching this line item.
ProductName (empty string) The language-friendly name of the product matching this line item.
ProductShippingHeight 0 The height of a single instance of the product in this line item.
ProductShippingLength 0 The length of a single instance of the product in this line item.
ProductShippingWeight 0 The weight of a single instance of the product in this line item.
ProductShippingWidth 0 The width of a single instance of the product in this line item.
ProductShortDescription (empty string) The description of the product matching this line item.
ProductSku (empty string) The unique SKU of the product matching this line item.
Quantity 0 The number of products in this line item.
QuantityReturned 0 Used to define how many products in this line item are being returned.
QuantityShipped 0 Defines how many products in this line item have been shipped.
SelectionData new List of OptionSelectionDTO The choices/options that were selected when adding the product to this line item.
ShipFromAddress new AddressDTO The address of the source where the product will be shipped from.
ShipFromMode None (0) Defines where the product should be shipped from to help support multiple warehouses and/or drop-shipping. Possible values include:
  • None = 0
  • ShipFromSite = 1
  • ShipFromVendor = 2
  • ShipFromManufacturer = 3
ShipFromNotificationId (empty string) The unique ID of the shipping source from the matching product.
ShippingPortion 0 The amount of shipping that was spread into this line from the entire order.
ShipSeparately False Reflects whether the matching product for this line item must be shipped separately or not.
StatusCode (empty string) A built-in way to save the status code of a line item when integrating with other systems.
StatusName (empty string) A built-in way to save the status name of a line item when integrating with other systems.
StoreId 0 This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
TaxPortion 0 The amount of tax that was spread into this line from the entire order.
TaxRate 0 The rate that the products this line item should be taxed at.
TaxSchedule 0 The unique ID of the tax schedule used for this line item.
VariantId (empty string) If the product is a variant, this will contain the unique ID or bvin of the matching variant.

 

Example of LineItemDTO

{
   "Items":[
      {
         "Id":18,
         "StoreId":1,
         "LastUpdatedUtc":"\/Date(1406683911703)\/",
         "BasePricePerItem":29.9500000000,
         "DiscountDetails":[

         ],
         "OrderBvin":"ddea7421-501d-44ce-b94f-48e10b8baff5",
         "ProductId":"964163db-e733-4cbd-ace5-32717d813f3e",
         "VariantId":"",
         "ProductName":"Butterfly Earings",
         "ProductSku":"SAMPLE006",
         "ProductShortDescription":"",
         "Quantity":1,
         "QuantityReturned":0,
         "QuantityShipped":1,
         "ShippingPortion":0.0000000000,
         "StatusCode":"",
         "StatusName":"",
         "TaxRate":0.0000000000,
         "TaxPortion":0.0000000000,
         "SelectionData":[

         ],
         "IsNonShipping":false,
         "TaxSchedule":-1,
         "ProductShippingWeight":0.0000,
         "ProductShippingLength":0.0000,
         "ProductShippingWidth":0.0000,
         "ProductShippingHeight":0.0000,
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ismarkedforfreeshipping",
               "Value":"False"
            },
            {
               "DeveloperId":"hcc",
               "Key":"istaxexempt",
               "Value":"False"
            },
            {
               "DeveloperId":"hcc",
               "Key":"freeshippingmethodsids",
               "Value":""
            }
         ],
         "ShipFromMode":1,
         "ShipFromNotificationId":"",
         "ShipFromAddress":{
            "Bvin":"89aad565-1ba6-48c1-a811-d1b0544ee652",
            "LastUpdatedUtc":"\/Date(1398071669897)\/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"",
            "MiddleInitial":"",
            "LastName":"",
            "Company":"",
            "Line1":"319 N. Clematis Street",
            "Line2":"Suite 500",
            "Line3":"",
            "City":"West Palm Beach",
            "RegionName":"Florida",
            "RegionBvin":"FL",
            "PostalCode":"33401",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":99
         },
         "ShipSeparately":false,
         "ExtraShipCharge":0.0000
      },
      {
         "Id":19,
         "StoreId":1,
         "LastUpdatedUtc":"\/Date(1406683911703)\/",
         "BasePricePerItem":42.9500000000,
         "DiscountDetails":[

         ],
         "OrderBvin":"ddea7421-501d-44ce-b94f-48e10b8baff5",
         "ProductId":"fb975149-2c73-45ad-8082-68961e04915c",
         "VariantId":"",
         "ProductName":"Blue Bracelet",
         "ProductSku":"SAMPLE001",
         "ProductShortDescription":"",
         "Quantity":1,
         "QuantityReturned":0,
         "QuantityShipped":1,
         "ShippingPortion":0.0000000000,
         "StatusCode":"",
         "StatusName":"",
         "TaxRate":0.0000000000,
         "TaxPortion":0.0000000000,
         "SelectionData":[

         ],
         "IsNonShipping":false,
         "TaxSchedule":-1,
         "ProductShippingWeight":0.0000,
         "ProductShippingLength":0.0000,
         "ProductShippingWidth":0.0000,
         "ProductShippingHeight":0.0000,
         "CustomProperties":[
            {
               "DeveloperId":"hcc",
               "Key":"ismarkedforfreeshipping",
               "Value":"False"
            },
            {
               "DeveloperId":"hcc",
               "Key":"istaxexempt",
               "Value":"False"
            },
            {
               "DeveloperId":"hcc",
               "Key":"freeshippingmethodsids",
               "Value":""
            }
         ],
         "ShipFromMode":1,
         "ShipFromNotificationId":"",
         "ShipFromAddress":{
            "Bvin":"89aad565-1ba6-48c1-a811-d1b0544ee652",
            "LastUpdatedUtc":"\/Date(1398071669897)\/",
            "StoreId":0,
            "NickName":"",
            "FirstName":"",
            "MiddleInitial":"",
            "LastName":"",
            "Company":"",
            "Line1":"319 N. Clematis Street",
            "Line2":"Suite 500",
            "Line3":"",
            "City":"West Palm Beach",
            "RegionName":"Florida",
            "RegionBvin":"FL",
            "PostalCode":"33401",
            "CountryName":"United States",
            "CountryBvin":"bf7389a2-9b21-4d33-b276-23c9c18ea0c0",
            "Phone":"",
            "Fax":"",
            "WebSiteUrl":"",
            "UserBvin":"",
            "AddressType":99
         },
         "ShipSeparately":false,
         "ExtraShipCharge":0.0000
      }
   ]
}
Have more questions? Submit a request

Need More Help?

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