Search

getGiftCards

Retrieve gift cards.

To create a new gift card, or update the balance of an existing gift card, use saveGiftCard. To get a log of gift card redeemings, see getGiftCardRedeemings.

In ERPLY, gift cards have a “balance”. A gift card can be used multiple times, until all the balance has been spent. A customer can use any gift card that has not expired and has a non-zero balance.

Input parameters

Parameter nameDescriptionPossible valueRequired
giftCardIDID of gift cardInteger
codeGift card's codeString
purchaseInvoiceIDAvailable only if "Gift card extras" module is enabled on your account.Integer
purchasedUnixTimeFromFilter gift cards by the "time of purchase" timestamp.Unix timestamp
purchasedUnixTimeToFilter gift cards by the "time of purchase" timestamp.Unix timestamp
redeemedUnixTimeFromFilter gift cards by the "time when redeemed" timestamp.Unix timestamp
redeemedUnixTimeToFilter gift cards by the "time when redeemed" timestamp.Unix timestamp
changedSinceRetrieve only items that have been added or modified since the specified timestamp. Use it to keep a local database in sync with ERPLY.Integer (Unix timestamp)
recordsOnPageNumber of records API should return. By default 20, at most 100.Integer
pageNoAPI returns at most recordsOnPage items at a time. To retrive the next recordsOnPage items, send a new request with pageNo incremented by one. By default, API returns "page 1".Integer

Response

Field nameTypeDescription
giftCardIDIntegerID of gift card
codeString
valueDecimal
balanceDecimalRemaining balance
purchasingCustomerIDInteger
purchaseDateTimeUnix timestampDate and time of purchase
redeemingCustomerIDInteger
redemptionDateTimeUnix timestampDate and time of redemption
expirationDateDate (yyyy-mm-dd)Gift card expiration date. Note that gift card expiration is not enabled by default. Contact us if you need to enable gift card expiration. If not enabled, this field's value will always be an empty string. If this gift card does not have an expiration date, value will be an empty string.
purchaseInvoiceIDIntegerInvoice with which the gift card was purchased. Available only if "Gift card extras" module is enabled on your account.
addedUnix timestampCreation time.
lastModifiedUnix timestampLast modification time.