News on VEUGA with Gamification



Implementing API for Voucher Redemption.


Implementing our API is pretty simple and straightforward. We use REST API as it provides a great deal of flexibility, scalability, and portability.

As a Merchant, you first need to authenticate yourself in the CBVoucher system. On successful authentication, you will receive an API token which you should be passing to the redeem API with a voucher code. After successful completion of the request, your voucher will be marked as redeemed, otherwise, you will get an error.

Here's how you implement the request:

Sample Request

curl https://cbvoucher.com/api/v1/login.php \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"merchant":447
"password":"123456"
}'

You will get response like this:

{

"message": "OK",
"code": "200",
"data": [

{

"userid": "447",
"email": "[email protected]",
"url": "https://comtechitservices.com/web-services/cloud-services",
"title": "Comtech IT Services",
"felder": "19,20,21,22,23,24,25,26,126,226,326,325,324,323,322,321,320,319,219,119,120,121,122,124,123,125,225,224,223,222,221,220",
"kaesten": "32",
"hits": "387",
"print_count": "0",
"lang": "en",
"regdat": "2020-08-01 19:40:15",
"uniqueid": "5f25c51fb06e9",
"submit": "2021-04-03 15:33:25",
"gridid": "140",
"kosten": "3,200.00 USD",
"amount": "3200.00",
"currency": "USD",
"vat": "0.00",
"vat_add": "0",
"bildext": ".jpg",
"target": "",
"enddate": "2030-12-31",
"reserved": "0",
"logincode": "447",
"block_size": "8_4",
"advertiser_name": "Javed Ghani",
"act_status": "Active",
"act_type": "Single Product",
"payment_status": "Paid",
"phone": "44 01604 211461",
"fax": "44 0845 2874533",
"address": "Clifford Hill, Little Houghton, Northampton, NN7 1AL. United Kingdom",
"promotion_id": "475",
"display": "true",
"main_logo": "1",
"spotancy": "0.00",
"package_id": "6",
"package_status": "active"

}

]

}





Sample Request

curl https://cbvoucher.com/api/v1/redeem.php \
-X POST \
-H 'Content-Type: application/json' \
-d '{
"api_token":1
"voucher_code":"16193462361547"
}'

You will get response like this

{

"message": "OK",
"code": "200",
"data": [

{

"id": "32",
"userid": "268",
"logo_spotted": "447",
"spotted_time": "21.068",
"campaign_id": "1448",
"promotion_id": "475",
"promotion_code": "16193462361547",
"coupon_redeemed": "no",
"status": "ok",
"expired": "no",
"deleted": "0",
"promotion_added": "2021-03-07",
"promotion_expiry": "2021-05-03",
"date_added": "2021-04-25",
"rank": "1",
"my_feeling": "molesto",
"marketplace_status": "inactive",
"is_deal_on_demand": "yes",
"deal_on_demand_live_id": "13"

}

]

}