REST API Endpoints for Gift Cards

Overview

Gift cards are a great way to get your customers to refer their friends and family in a way that always results in sales.  These endpoints allow you to manage the gift cards in your store.

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

If you haven’t already done so, you should probably have a development environment ready to development against, complete with Hotcakes installed and configured.

REST API endpoints for Gift Cards

There are a handful of REST API endpoints that allow you to display or manage various aspects of gift cards.  Those endpoints are detailed below.

Endpoint Return Type Description
GiftCardCountOfAll long Allows you to get a count of the total number of gift cards. 
GiftCardCreate GiftCardDTO Creates a gift card card with the specified properties and returns it back to you.
GiftCardDelete boolean Permanently deletes the specified gift card from the store.
GiftCardFind GiftCardDTO Looks for and returns the gift card you've specified.
GiftCardFindAll List of GiftCardDTO Returns all of the gift cards that are found in the store.
GiftCardFindAllByPage List of GiftCardDTO This is a more efficient alternative to GiftCardFindAll since it only returns a specified subset of all gift cards in the store.
GiftCardUpdate GiftCardDTO Updates the gift card matching the given ID and returns the object back to you.

 

Have more questions? Submit a request

Need More Help?

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