GiftCardDTO Object

Overview

The REST API makes extensive use of the GiftCardDTO object whenever working with gift cards.  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. 

GiftCardDTO

The GiftCardDTO object will contain all of the details of a single gift card for your Hotcakes Commerce store.

Members

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

Member Default Description
Amount null Decimal The total amount that the gift card was originally assigned upon purchase.
CardNumber (empty string) A alphanumeric ID that a customer will use to reference this gift card.
Enabled False Designates whether the gift card is currently active for use.
ExpirationDateUtc UtcNow The date/time that the gift card is currently set to expire.
GiftCardId null Long The unique or primary key of the gift card.
GiftMessage (empty string) A message from the purchaser of the gift card, for the recipient.
IssueDateUtc UtcNow The date/time that the gift card was purchased.
LineItemId null Long The unique ID of the line item for this gift card.
RecipientEmail (empty string) An email address for the customer that the gift card was purchased for.
RecipientName (empty string) Full name for the customer that the gift card was purchased for.
StoreId null Long This is the ID of the Hotcakes store. Typically, this is 1, except in multi-tenant environments.
UsedAmount null Decimal UsedAmount

 

Example of GiftCardDTO

{
   "Errors":[

   ],
   "Content":{
      "GiftCardId":1,
      "StoreId":1,
      "LineItemId":null,
      "CardNumber":"GC1234567890",
      "Amount":100,
      "UsedAmount":0,
      "IssueDateUtc":"\/Date(1407971499339)\/",
      "ExpirationDateUtc":"\/Date(1471129898722)\/",
      "RecipientEmail":"info@hotcakescommerce.com",
      "RecipientName":"John Dough",
      "GiftMessage":null,
      "Enabled":true
   }
}
Have more questions? Submit a request

Need More Help?

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