Page 1 of 1

API : Endpoint name to get/read vouchers list, vouchers under one specific domain (where clause)

Posted: 03 Jun 2020, 23:40
by azhar
Hi Support,

May I have list of Endpoint name to get/read all Vouchers, vouchers (where clause for Domain, date creation).
We can create voucher, see the following sample which work perfectly. But don't know Endpoint name to get vouchers info.

<?php
require_once('RESTfulAPI.php');

$ApiKey = "XXXX";
$ApiSecret = "YYYYY";

$API = new RESTfulAPI("http://103.219.4.4", $ApiKey, $ApiSecret);


/*
Below code will generate
10 vouchers
6 hours internet connection - product
CoffeeHouse - domain
*/


$Endpoint = "voucherAdd";
$Data = json_encode(
array(
"DomainID" => "1",
"ProductID" => "25",
"SellPrice" => "10",
"Language" => "en",
"Quantity" => "10",
));

$JSonRetVal = $API->APICall($Endpoint, $Data);
if (isset($RetVal["error"]) && $RetVal["error"] != "") {
echo "Error: " .$RetVal["error"];
}else {
print_r($JSonRetVal);
}

Br,

Azhar

Re: API : Endpoint name to get/read vouchers list, vouchers under one specific domain (where clause)

Posted: 04 Jun 2020, 10:21
by HSNMSupport
Hi Azhar,
actually, we don't have an endpoint to list vouchers, but only for create theirs.
Have a nice day.