Treazure Giftcard - Backend API¶
Giftcard Backend API is only available for Cow Hills. Setting up the gift card Backend API is a one time task.
Product¶
Giftcards belong to a product. A gift card product has the following properties:
- Brand Name, logical name for the giftcard that is used for booking
- EAN, the product barcode on the giftcard
- Currency, currency of the value
- Prefix
- Serial number number of digits, together with
Prefixthis determines the barcode length - Scratch code number of digits, see paragraph below.
- Load type, either
PreLoadedorLoadable - Barcode type, either
Code128orItf2Of5 - Load amount, value for pre-loaded gift cards
- Max load amount
- Refund, either
PossibleorNot possible - Reloadable, either
trueorfalse - Activate with card id, either
trueorfalse - Number of days valid (default = no expiry)
Batches¶
Gift cards are pre-generated in Treazure Vault. This guarantees an available giftcard and a unique number. This is done in a background process.
Batches are logistical, this is not visible on Frontend API.
Uniqueness¶
There is a certain level of uniqueness that has to be met before creating new gift cards. This is to prevent guessing valid gift card numbers. Rule of thumb is that of all possible numbers only up to 1 in 10000 can exist.
Auto grow¶
If gift card stock runs low, Treazure Vault can automatically create new gift cards.
For this the following auto-grow parameters exist:
Threshold, from what number of available giftcards a new batch should be createdSize, the size of the new batch
Scratch code¶
Gift cards can be genererated with a scratch code. This is a random value that can be printed on a phsycical gift card, under a scratch layer.
Markets¶
It is possible to assign a market to a giftcard product. This can be used to segregate gift cards for different geographical markets, e.g. giftcards for different countries.
The same market can be assigned to a login so for Frontoffice API access can be limited to one or more markets.
Refund¶
Gift cards can be refunded, if setup.
Import¶
Gift cards can be imported into the system. Currently this can only be done by Cow Hills.
Gift card status change¶
Individual gift card status mutation can be done in rCOS Cloud.

The endpoint for this is not publicly available.