Retrieve voucher record
curl --request GET \
--url https://staging-vouchers.ventogram.com/api/v1/vouchers \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-User: <api-key>'import requests
url = "https://staging-vouchers.ventogram.com/api/v1/vouchers"
headers = {
"X-Api-User": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-User': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://staging-vouchers.ventogram.com/api/v1/vouchers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging-vouchers.ventogram.com/api/v1/vouchers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Api-User: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging-vouchers.ventogram.com/api/v1/vouchers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-User", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging-vouchers.ventogram.com/api/v1/vouchers")
.header("X-Api-User", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-vouchers.ventogram.com/api/v1/vouchers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-User"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": [
{
"id": "<string>",
"email": "<string>",
"amount": 123,
"fullname": "<string>",
"currency": "<string>",
"fee": 123,
"feeBearer": "<string>",
"paymentExpiresAt": "2023-11-07T05:31:56Z",
"merchant": "<string>",
"memo": "<string>",
"voucherCode": "<string>",
"createdAt": "<string>",
"dateRedeemed": "2023-11-07T05:31:56Z",
"accountType": "<string>",
"cancelledAt": "2023-11-07T05:31:56Z"
}
]
}{
"success": false,
"message": "<string>",
"errors": []
}Collect & Onramp
Retrieve voucher record
Retrieves an existing voucher record(s). When no query param is provided, all the voucher record for the merchant will be returned. If accountNumber field is provided in the query, all the voucher records associated with the given accountNumber for the merchant will be returned.
GET
/
v1
/
vouchers
Retrieve voucher record
curl --request GET \
--url https://staging-vouchers.ventogram.com/api/v1/vouchers \
--header 'X-Api-Key: <api-key>' \
--header 'X-Api-User: <api-key>'import requests
url = "https://staging-vouchers.ventogram.com/api/v1/vouchers"
headers = {
"X-Api-User": "<api-key>",
"X-Api-Key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-User': '<api-key>', 'X-Api-Key': '<api-key>'}};
fetch('https://staging-vouchers.ventogram.com/api/v1/vouchers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging-vouchers.ventogram.com/api/v1/vouchers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Api-Key: <api-key>",
"X-Api-User: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging-vouchers.ventogram.com/api/v1/vouchers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-User", "<api-key>")
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://staging-vouchers.ventogram.com/api/v1/vouchers")
.header("X-Api-User", "<api-key>")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging-vouchers.ventogram.com/api/v1/vouchers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-User"] = '<api-key>'
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>",
"data": [
{
"id": "<string>",
"email": "<string>",
"amount": 123,
"fullname": "<string>",
"currency": "<string>",
"fee": 123,
"feeBearer": "<string>",
"paymentExpiresAt": "2023-11-07T05:31:56Z",
"merchant": "<string>",
"memo": "<string>",
"voucherCode": "<string>",
"createdAt": "<string>",
"dateRedeemed": "2023-11-07T05:31:56Z",
"accountType": "<string>",
"cancelledAt": "2023-11-07T05:31:56Z"
}
]
}{
"success": false,
"message": "<string>",
"errors": []
}Query Parameters
Voucher id
Voucher memo or reference number
The account number used to pay for voucher
Was this page helpful?
⌘I