Introduction
API for Gift Voucher Brilliance
This documentation aims to provide all the information you need to work with our API.
Base URL
https://admin.giftvoucherbrilliance.co.uk
Authenticating requests
This API is authenticated by sending an Authorization
header with the value "Bearer {YOUR_AUTH_KEY}"
.
All authenticated endpoints are marked with a requires authentication
badge in the documentation below.
You can retrieve your token by visiting your dashboard and clicking API on the menu. If you don't have this feature, please contact support@giftvoucherbrilliance.co.uk.
Order
Return details about the latest orders.
requires authentication
Example request:
curl --request GET \
--get "https://admin.giftvoucherbrilliance.co.uk/api/orders?page=15&expanded=" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/orders"
);
const params = {
"page": "15",
"expanded": "0",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://admin.giftvoucherbrilliance.co.uk/api/orders',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '15',
'expanded'=> '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"orderNumber": 5,
"discountCode": "eum",
"discountTotal": "0",
"total": 44.62,
"shippingCost": 45.94,
"orderDate": null,
"numVouchers": 1,
"customer": 4569
}
}
Received response:
Request failed with error:
Return details about a single order.
requires authentication
Example request:
curl --request GET \
--get "https://admin.giftvoucherbrilliance.co.uk/api/orders/occaecati?$order=et&expanded=1" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/orders/occaecati"
);
const params = {
"$order": "et",
"expanded": "1",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://admin.giftvoucherbrilliance.co.uk/api/orders/occaecati',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'$order'=> 'et',
'expanded'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"orderNumber": 6,
"discountCode": "odio",
"discountTotal": "0",
"total": 96.04,
"shippingCost": 45.34,
"orderDate": null,
"numVouchers": 1,
"customer": 4570
}
}
Received response:
Request failed with error:
Shop
Endpoints for getting information about the current shop which is decided via the API Token used.
Return details about the current authenicated shop
requires authentication
Example request:
curl --request GET \
--get "https://admin.giftvoucherbrilliance.co.uk/api/shop" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/shop"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://admin.giftvoucherbrilliance.co.uk/api/shop',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
Show headers
cache-control: no-cache, private
content-type: application/json
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
{
"data": {
"title": "Clockwork",
"url": "https://clockwork.giftvoucherbrilliance.co.uk"
}
}
Received response:
Request failed with error:
Voucher
Return details about the latest vouchers issued.
requires authentication
Example request:
curl --request GET \
--get "https://admin.giftvoucherbrilliance.co.uk/api/vouchers-sold?page=15" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/vouchers-sold"
);
const params = {
"page": "15",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://admin.giftvoucherbrilliance.co.uk/api/vouchers-sold',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '15',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"code": "kgb-000190-000095",
"description": "2 Night stay with Breakfast",
"issuedDate": "2024-08-14 16:27:04",
"validFromDate": "2024-08-14 16:27:04",
"expiryDate": "2025-12-06 00:00:00",
"personalisation": {
"to": "alias",
"message": "Et repudiandae in reiciendis voluptatibus. Dolores quae maiores quam pariatur qui rerum reiciendis. In illum eum minus autem quia molestias. Beatae voluptatem deserunt et architecto."
},
"total": 70.83,
"paid": 70.83,
"balance": 61.94,
"status": "Redeemed",
"customerName": "Dylan Price",
"partRedeemable": false,
"delivery": {
"method": "Post",
"type": "Envelope Standard 1st class",
"cost": 84.96
}
}
}
Received response:
Request failed with error:
Return details about a single voucher.
requires authentication
Example request:
curl --request GET \
--get "https://admin.giftvoucherbrilliance.co.uk/api/vouchers-sold/neque" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/vouchers-sold/neque"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "GET",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'https://admin.giftvoucherbrilliance.co.uk/api/vouchers-sold/neque',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"code": "osg-000101-000782",
"description": "Lunch or Pre-Theatre Supper<br/>Two Courses for One Guest ",
"issuedDate": "2024-10-18 04:10:58",
"validFromDate": "2024-10-18 04:10:58",
"expiryDate": "2026-09-18 00:00:00",
"personalisation": {
"to": "accusamus",
"message": "Pariatur excepturi consequatur temporibus quo consequuntur soluta. Dicta harum amet eveniet et. Quidem earum impedit et molestiae. Accusantium deserunt explicabo mollitia ipsum maxime."
},
"total": 99.7,
"paid": 99.7,
"balance": 71.86,
"status": "Redeemed",
"customerName": "Anthony Stevens",
"partRedeemable": false,
"delivery": {
"method": "Post",
"type": "Gift Box Signed 1st class ",
"cost": 38.82
}
}
}
Received response:
Request failed with error:
Redeem a voucher.
requires authentication
Example request:
curl --request POST \
"https://admin.giftvoucherbrilliance.co.uk/api/voucher/molestiae/redeem" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 5
}"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/voucher/molestiae/redeem"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 5
};
fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'https://admin.giftvoucherbrilliance.co.uk/api/voucher/molestiae/redeem',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'amount' => 5,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"code": "axx-000795-000742",
"description": "Afternoon Tea<br/>for Two",
"issuedDate": "2025-02-23 20:33:02",
"validFromDate": "2025-02-23 20:33:02",
"expiryDate": "2026-05-27 00:00:00",
"personalisation": {
"to": "veritatis",
"message": "Aliquam iure maiores molestias ducimus ab amet. Itaque recusandae repudiandae voluptatem qui officiis. Aut ut ut fuga et error."
},
"total": 24.66,
"paid": 24.66,
"balance": 65.05,
"status": "Redeemed",
"customerName": "Claire Murray",
"partRedeemable": false,
"delivery": {
"method": "Email",
"cost": 25.49,
"email": null
}
}
}
Received response:
Request failed with error: