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
Authenticate requests to this API's endpoints 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=16&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"
);
const params = {
"page": "16",
"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',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'page'=> '16',
'expanded'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"orderNumber": 5,
"discountCode": "quo",
"discountTotal": "0",
"total": 65.25,
"shippingCost": 71.52,
"orderDate": null,
"numVouchers": 1,
"customer": 4464
}
}
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/maxime?$order=quisquam&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/maxime"
);
const params = {
"$order": "quisquam",
"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/maxime',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'$order'=> 'quisquam',
'expanded'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"orderNumber": 6,
"discountCode": "nisi",
"discountTotal": "0",
"total": 63.12,
"shippingCost": 94.77,
"orderDate": null,
"numVouchers": 1,
"customer": 4465
}
}
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": "xmn-000684-000671",
"description": "Monetary Vouchers<br/>To the value of £40.00",
"issuedDate": "2025-03-04 18:32:35",
"validFromDate": "2025-03-04 18:32:35",
"expiryDate": "2025-06-23 00:00:00",
"personalisation": {
"to": "rerum",
"message": "Vero sed nisi in. Dolor nostrum non sunt nobis adipisci aspernatur odit. Dignissimos pariatur nobis alias occaecati consequuntur est."
},
"total": 38.01,
"paid": 38.01,
"balance": 22.51,
"status": "Unredeemed",
"customerName": "Charlotte Clark",
"partRedeemable": false,
"delivery": {
"method": "Post",
"type": "Envelope Standard 1st class",
"cost": 50.74
}
}
}
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/ea" \
--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/ea"
);
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/ea',
[
'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": "coy-000778-000206",
"description": "Afternoon Tea<br/>for Two",
"issuedDate": "2025-02-22 01:08:46",
"validFromDate": "2025-02-22 01:08:46",
"expiryDate": "2025-09-12 00:00:00",
"personalisation": {
"to": "et",
"message": "Pariatur omnis dolores nostrum et. Ut nam vero voluptatem omnis aut deserunt. Atque mollitia aut asperiores iure labore saepe asperiores voluptatem."
},
"total": 67.07,
"paid": 67.07,
"balance": 37.72,
"status": "Unredeemed",
"customerName": "Helen Wilkinson",
"partRedeemable": false,
"delivery": {
"method": "Post",
"type": "Vouchers will be sent via email",
"cost": 34.86
}
}
}
Received response:
Request failed with error:
Redeem a voucher.
requires authentication
Example request:
curl --request POST \
"https://admin.giftvoucherbrilliance.co.uk/api/voucher/exercitationem/redeem" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 16
}"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/voucher/exercitationem/redeem"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 16
};
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/exercitationem/redeem',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'amount' => 16,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"code": "qsp-000503-000219",
"description": "Monetary Vouchers<br/>To the value of £50.00",
"issuedDate": "2024-05-06 22:51:28",
"validFromDate": "2024-05-06 22:51:28",
"expiryDate": "2026-08-31 00:00:00",
"personalisation": {
"to": "sequi",
"message": "Quo architecto qui et quo. Eaque reprehenderit aut perferendis corporis et. Assumenda magni accusantium vel velit sunt maiores nesciunt. Voluptatibus impedit nostrum odit voluptatem quidem delectus."
},
"total": 71.2,
"paid": 71.2,
"balance": 33.93,
"status": "Unredeemed",
"customerName": "Tina Mitchell",
"partRedeemable": false,
"delivery": {
"method": "Email",
"cost": 66.47,
"email": null
}
}
}
Received response:
Request failed with error: