Get a purchased voucher
curl --request GET \
--url https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
fetch('https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher}"
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 123,
"reference": "<string>",
"initial_balance": 123,
"current_balance": 123,
"purchase_value": 123,
"currency": "<string>",
"is_monetary": true,
"allow_part_redeem": true,
"void": true,
"order_id": 123,
"order_item_id": 123,
"product_id": 123,
"product_title": "<string>",
"product_slug": "<string>",
"parent_product_id": 123,
"parent_product_title": "<string>",
"purchase_timestamp": "2023-11-07T05:31:56Z",
"date_issued": "2023-11-07T05:31:56Z",
"date_valid_start": "2023-12-25",
"date_valid_end": "2023-12-25",
"date_scheduled": "2023-11-07T05:31:56Z",
"redemption_status": "<string>",
"void_reason": "<string>",
"void_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Sales
Get a purchased voucher
view_vouchers and view_orders permissions required.
All successful responses include X-Request-Id and Cache-Control: private, no-store. Requests are limited to 120 per minute.
GET
/
tenants
/
{tenant}
/
sales
/
purchased-vouchers
/
{voucher}
Get a purchased voucher
curl --request GET \
--url https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher} \
--header 'Accept: <accept>' \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Accept: '<accept>', Authorization: 'Bearer <token>'}};
fetch('https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher}"
headers = {
"Accept": "<accept>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.giftvoucherbrilliance.co.uk/api/external/v1/tenants/{tenant}/sales/purchased-vouchers/{voucher}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Accept: <accept>",
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"id": 123,
"reference": "<string>",
"initial_balance": 123,
"current_balance": 123,
"purchase_value": 123,
"currency": "<string>",
"is_monetary": true,
"allow_part_redeem": true,
"void": true,
"order_id": 123,
"order_item_id": 123,
"product_id": 123,
"product_title": "<string>",
"product_slug": "<string>",
"parent_product_id": 123,
"parent_product_title": "<string>",
"purchase_timestamp": "2023-11-07T05:31:56Z",
"date_issued": "2023-11-07T05:31:56Z",
"date_valid_start": "2023-12-25",
"date_valid_end": "2023-12-25",
"date_scheduled": "2023-11-07T05:31:56Z",
"redemption_status": "<string>",
"void_reason": "<string>",
"void_date": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
Bearer token created in the GVB API Access page.
Headers
Must be application/json.
Available options:
application/json Path Parameters
Authorised tenant identifier from the tenant directory.
Purchased voucher identifier.
Response
Successful response.
Show child attributes
Show child attributes
⌘I