DiscountDetailDTO Object

Overview

The REST API makes use of the DiscountDetailDTO object whenever working with orders that have one or more discounts applied.  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. 

DiscountDetailDTO

The DiscountDetailDTO object will contain all of the most common details of the discounts for orders made in your Hotcakes Commerce store.

Members

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

Member Default Description
Amount 0 The amount of the discount to be applied to the qualifying order/line item(s).
Description (empty string) Description of what the discount is.
DiscountType Unknown (0) Indicates the type of discount that this is.  Possible values include:
  • Unknown = 0
  • Sale = 1
  • Offer = 2
  • Affiliate = 3
Id new GUID Unique ID or primary key of the discount.
OrderBvin (empty string) The unique ID or bvin of the order that this order coupon belongs to.
StoreId 0 This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
UserId (empty string) Records the user account ID that is using the coupon.

 

Example of DiscountDetailDTO

{
      "OrderDiscountDetails":[
         {
            "Id":"98357567-e3c4-4596-bce2-fc9eab23d947",
            "Description":"10% Off Coupon",
            "Amount":-7.29,
            "DiscountType":0
         }
      ]
}
Have more questions? Submit a request

Need More Help?

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