API : Endpoint name to get/read vouchers list, vouchers under one specific domain (where clause)
If you installed HSNM just now, and don't know where to start - ask here!

Rate this topic
   Post Reply
2 posts   •   Page 1 of 1
azhar
Posts: 35
Joined: 11 Feb 2020, 10:50

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

by azhar » 03 Jun 2020, 23:40

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

HSNMSupport
Posts: 1304
Joined: 26 Jul 2016, 09:16

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

by HSNMSupport » 04 Jun 2020, 10:21

Hi Azhar,
actually, we don't have an endpoint to list vouchers, but only for create theirs.
Have a nice day.

Rate this topic

Who is online

Users browsing this forum: No registered users and 1 guest

It is currently 20 Jun 2021, 17:12