Retrieve all information about a specific Voucher Group
curl --request GET \
--url https://api.spirii.com/voucher-groups/{id}import requests
url = "https://api.spirii.com/voucher-groups/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spirii.com/voucher-groups/{id}', 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://api.spirii.com/voucher-groups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.spirii.com/voucher-groups/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spirii.com/voucher-groups/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/voucher-groups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 24,
"name": "AKB2022",
"perKwh": 2.5,
"currency": "DKK",
"isSpotPriceBased": false,
"spotPriceMargin": null,
"spotPriceMarginPct": null,
"spotPriceMinimum": 0.5,
"createdAt": "2021-01-07T08:21:43.000Z",
"updatedAt": "2022-11-07T04:56:18.000Z",
"voucherCount": 1,
"locations": [
{
"id": 1145,
"name": "TheVillage",
"streetAddress": "Lenin",
"zipCode": "640022",
"city": "Kurgan"
}
],
"vouchers": [
{
"id": 1020,
"code": "AKB2021",
"maxUsers": null,
"users": [
26149,
3979,
15513,
null,
18110,
3952,
31525,
4209,
16284,
2320
],
"expiresAt": null,
"createdAt": "2021-01-07T08:21:43.000Z"
}
]
}{
"error": {
"message": "Querystring parameter `id` is not allowed",
"statusCode": 400,
"code": "QueryParamNotAllowed"
}
}{
"error": {
"message": "Something went wroing, try again later",
"statusCode": 500
}
}Retrieve all information about a specific Voucher Group
GET
/
voucher-groups
/
{id}
Retrieve all information about a specific Voucher Group
curl --request GET \
--url https://api.spirii.com/voucher-groups/{id}import requests
url = "https://api.spirii.com/voucher-groups/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.spirii.com/voucher-groups/{id}', 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://api.spirii.com/voucher-groups/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://api.spirii.com/voucher-groups/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.spirii.com/voucher-groups/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spirii.com/voucher-groups/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"id": 24,
"name": "AKB2022",
"perKwh": 2.5,
"currency": "DKK",
"isSpotPriceBased": false,
"spotPriceMargin": null,
"spotPriceMarginPct": null,
"spotPriceMinimum": 0.5,
"createdAt": "2021-01-07T08:21:43.000Z",
"updatedAt": "2022-11-07T04:56:18.000Z",
"voucherCount": 1,
"locations": [
{
"id": 1145,
"name": "TheVillage",
"streetAddress": "Lenin",
"zipCode": "640022",
"city": "Kurgan"
}
],
"vouchers": [
{
"id": 1020,
"code": "AKB2021",
"maxUsers": null,
"users": [
26149,
3979,
15513,
null,
18110,
3952,
31525,
4209,
16284,
2320
],
"expiresAt": null,
"createdAt": "2021-01-07T08:21:43.000Z"
}
]
}{
"error": {
"message": "Querystring parameter `id` is not allowed",
"statusCode": 400,
"code": "QueryParamNotAllowed"
}
}{
"error": {
"message": "Something went wroing, try again later",
"statusCode": 500
}
}Path Parameters
Voucher group id
Example:
1
Response
Voucher Group
id
Example:
1
name
Example:
"Kokbjerg"
price per kwh
Example:
3
pricing currency
Example:
"DKK"
Example:
false
Example:
0.5
Example:
0.5
Example:
0.5
Created date
Example:
"2021-04-20T14:38:20.000Z"
Updated date
Example:
"2021-04-20T14:38:20.000Z"
Example:
1
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?