Wildfire APIs
Gift Card
21min
there are two different payment methods for the customers to redeem the cash back in their account paypal (multiple currencies supported) gift card (usd only at this time) gift card is a payment method where the user who has a redeemable amount greater than 5 usd can receive a gift card of a supported merchant of their choice wildfire currently only supports redeeming the full amount available in the user's account there are three api endpoints get redeemable amount redeem (create a gift card redemption link) get redemption history get redeemable amount the get redeemable amount call will return the balance of a user's account this is useful for determining if a user is eligible for a gift card based on the minimum 5 usd threshold required to redeem endpoint https //api wfi re/v2/giftcard/\ device id/redeemable method get parameters device id (required) the device id of the user note if a user has multiple devices, any device id associated with the user will return the same redeemable amount sample response { { "amount" "15 00", "currency" "usd" } } amount amount available to redeem for the particular user errors if a request is sent for a device id that isn't associated with the application, the api will respond with the following { "errormessage" "no device found for id= '76'" } if there is no rewards associated with the sender id, the api will respond with the following { "errormessage" "no rewards found for sender id='123'" } note that "sender" is a reference to your user id this response denotes that any of the associated devices can be passed into this api but the response is not specific to that device if there is no sender id associated with the device id, the api will respond with the following { "errormessage" "no sender associated with device 76" } redeem this post call will give all the details of a user along with the url to redeem the gift card and amount available to redeem endpoint https //api wfi re/v2/giftcard method post request body { 	"deviceid" 9318216 } deviceid (required) the device id of a user which may or may not be the same as the one in the previous get redeemable call (a user can have multiple device ids) sample response { { "senderid" 278000, "url" "https //www rewardlink io/r/1/uxmjqswqzxxldfgkvci2qga068mx3x0yq", "amount" "15", "currency" "usd", "createddate" "2023 01 10t22 39 50 42z" } } senderid the id of the user unlike device id, sender id is unique to a logged in user url unique url generated by wildfire which is a direct link to redeem the newly generated gift card on reward link website this url should not be shared with anyone since there is no additional security around using this url to redeem, it should be considered the same as cash to test the url one can copy and paste it into any browser to be redirected to the reward link redemption website errors if a request is made without a device id, the api will respond with the following { "errormessage" "missing device id" } user account balance should be greater than 5 usd for the user to redeem the gift card if the user account balance is less than 5 usd the api will respond with the following { "errormessage" "redeemable balance is less than $5" } if a request is sent for a device id that isn't associated with the application, the api will respond with the following { "errormessage" "no device found for id= '76'" } if there is no rewards associated with the sender id, the api will respond with the following { "errormessage" "no rewards found for sender id='123'" } if there is no sender id associated with the device id, the api will respond with the following { "errormessage" "no sender associated with device 76" } get redemption history the get redemption history call returns all the previous redemptions for a given user based on any of their device ids endpoint https //api wfi re/v2/giftcard?device id=9318216 parameters device id (required) any device id associated with the user sample response { "links" \[ { "senderid" 274000, "url" "https //www rewardlink io/r/1/mxvftvplbdwcco8 xzw5pfxembhvxjbb0gjtpb1006a", "amount" "15", "currency" "usd", "createddate" "2023 01 10t19 45 36 346516z" }, { "senderid" 274000, "url" "https //www rewardlink io/r/1/uxmjqswqzxxldfgkvci2qga06yfcvo6f7fq8mx3x0yq", "amount" "35", "currency" "usd", "createddate" "2023 01 10t22 39 50 798193z" } ] } senderid the id of the user unlike device id, sender id is unique to a logged in user amount amount redeemed by the user (which is the same as the entire redeemable amount at the time of request for a gift card) url unique url generated by wildfire which is direct link to redeem the gift card in the reward link website createddate the date which the user requested the gift card errors if a request is made without a device id, the api will respond with the following { "errormessage" "missing device id" } if the user sends a wrong device id, user will receive below error message { "errormessage" "invalid device id" } if a request is made with the wrong device id (i e a device id not associated with the application), the api will respond with the following { "errormessage" "no device found for id='76'" } if there is no redeemable links associated with the sender id, the api will respond with the following { "errormessage" "no links found for sender id='76'" } if there is no sender id associated with the device id, the api will respond with the following { "errormessage" "no sender associated with device \[device app id]" }