index.php?m=giftcard&action=api&apikey=KEY&apipass=PASS |
Where apikey/apipass is the respective key/pass found in the module
| URL Variable | Explanation |
|---|---|
| &apimode | 0 |
| &quantity | integer larger than 0 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=0&quantity=10
JSON, giftcardcode,giftcardcode,giftcardcode
["GC-1","GC2","GC3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:quantity not valid"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
| URL Variable | Explanation |
|---|---|
| &apimode | 1 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=0
JSON, giftcardcode:card value:clientid,giftcardcode:card value:clientid
["GC-1:123:1","GC2:123:2","GC3:123:3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
| URL Variable | Explanation |
|---|---|
| &apimode | 2 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=2
JSON, giftcardcode:card value:clientid
["GC-1:123:1","GC2:123:2","GC3:123:3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
| URL Variable | Explanation |
|---|---|
| &apimode | 3 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| URL Variable | Explaination |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=3
JSON, giftcardcode:card value:clientid
["GC-1:123:1","GC2:123:2","GC3:123:3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
| URL Variable | Explanation |
|---|---|
| &apimode | 4 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| &clientid | the client id you want to assign the card to |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=4&clientid=2
JSON, giftcardcode:card value:clientid
["GC-1:123:1"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
["fail:Client ID invalid"]
| URL Variable | Explanation |
|---|---|
| &apimode | 5 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| &clientgroupid | the client group id |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=5&clientgroupid=1
JSON, giftcardcode:card value:clientid
["GC-1:123:1","GC2:123:2","GC3:123:3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
["fail:Client group ID is invalid"]
| URL Variable | Explanation |
|---|---|
| &apimode | 6 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| &clientgroupid | the client group id |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=6&clientgroupid=1
JSON, giftcardcode:card value:clientid
["GC-1:123:1","GC2:123:2","GC3:123:3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
["fail:Client group ID is invalid"]
| URL Variable | Explanation |
|---|---|
| &apimode | 7 |
| &gctemplate | is the Listing ID of the Card template you wish to use to generate the cards |
| &clientgroupid | the client group id |
| URL Variable | Explanation |
|---|---|
| &pending | when set to 1. All generated cards will set to pending |
| &priceoverride | integer larger than 0 -when used, it will override the card's face value |
| ¬ifyemail | when set to 1. An email notification is sent to the client regarding gift card assigned |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&gctemplate=1&apimode=7&clientgroupid=1
JSON, giftcardcode:card value:clientid
["GC-1:123:1","GC2:123:2","GC3:123:3"]
JSON, fail:msg
["fail:gctemplate ID don't exist"]
["fail:pending can only be 1"]
["fail:priceoverride must be positive integer larger than 0"]
["fail:notifyemail can only be 1"]
["fail:Client group ID is invalid"]
| URL Variable | Explanation |
|---|---|
| &apimode | 10 |
| &giftcard | urlencode(the gift card) |
| URL Variable | Explanation |
|---|
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&apimode=10&giftcard=abccd
JSON, success:gift card:status:expiry time:expiry mode:gift card value:buyer id:redeemer id:order id:invoice id:allow self redemption:master card:subcards:onetime use
{"success":"GC-12345:redeemed:31536000:7days:20:0:1:0:0:0:0:0:1"}JSON, fail:msg
["fail:Gift Card not exist"]
| URL Variable | Explanation |
|---|---|
| &apimode | 11 |
| &clientid | the client id |
| &giftcard | urlencode(the gift card) |
| URL Variable | Explanation |
|---|
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&apimode=11&client=1&giftcard=abccd
JSON, success:msg
["success:deposited to client]
JSON, fail:msg
["fail:Client ID invalid"]
["fail:Gift Card not exist"]
["fail:Gift Card Invalid"]
["fail:Card not allow to self redemption"]
["fail:Card already used"]
["fail:Card Expired"]
["fail:Unable to deposit"]
["fail:Similar Card Used"] (New in 2.31)
| URL Variable | Explanation |
|---|---|
| &apimode | 12 |
| &giftcard | urlencode(the gift card) Must not be redeemed or voided |
| URL Variable | Explanation |
|---|---|
| &setvalue | positive integer for new gift value |
| &setexpiry | 0-6 (never/24 hours/7 days/30 days/90days/180 days/365 days) for expiry mode |
| &setstatus | 0/1/9 (Pending/Approved/Void) |
| &setselfredeem | 1 to enable self redemption, 0 to disable |
| &setmaster | 1 to enable splitting for the card, 0 to disable |
| &resetdate | 1 to reset the creation date to today |
| &setassign | Client ID to assign the card to |
| &setonetime (new in 2.31) | 1 to enable one time use, 0 to disable |
index.php?m=giftcard&action=api&apikey=123&apipass=DEF&apimode=12&client=1&giftcard=abccd
JSON, success:msg
["success:gift card updated]
JSON, fail:msg
["fail:Gift Card already redeemded"]
["fail:Gift Card is void"]
["fail:setvalue must be positive integer larger than 0"]
["fail:setexpiry must be between 0-6"]
["fail:setstatus must be between 0,1,9"]
["fail:setselfredeem must be between 0 or 1"]
["fail:setmaster must be between 0 or 1"]
["fail:resetdate must be 1"]
["fail:clientid invalid"]