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=2&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": "2",
"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'=> '2',
'expanded'=> '0',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"orderNumber": 5,
"discountCode": "aut",
"discountTotal": "0",
"total": 25.35,
"shippingCost": 20.29,
"orderDate": null,
"numVouchers": 1,
"customer": 4440
}
}
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/enim?$order=dolores&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/enim"
);
const params = {
"$order": "dolores",
"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/enim',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'$order'=> 'dolores',
'expanded'=> '1',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"orderNumber": 6,
"discountCode": "et",
"discountTotal": "0",
"total": 43.77,
"shippingCost": 30.44,
"orderDate": null,
"numVouchers": 1,
"customer": 4441
}
}
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=11" \
--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": "11",
};
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'=> '11',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"code": "idm-000801-000180",
"description": "Afternoon Tea<br/>for Two",
"issuedDate": "2024-12-19 19:51:01",
"validFromDate": "2024-12-19 19:51:01",
"expiryDate": "2025-06-19 00:00:00",
"personalisation": {
"to": "molestiae",
"message": "Autem vel consequuntur blanditiis neque vitae. Quia non quod minus nihil. Ipsum illo eligendi expedita animi tempore. Asperiores voluptates ut expedita hic sed culpa repudiandae quia."
},
"total": 47.66,
"paid": 47.66,
"balance": 64.62,
"status": "Unredeemed",
"customerName": "Duncan Palmer",
"partRedeemable": false,
"delivery": {
"method": "Email",
"cost": 80.61,
"email": null
}
}
}
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/quo" \
--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/quo"
);
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/quo',
[
'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": "xlx-000184-000684",
"description": "Afternoon Tea<br/>for Two",
"issuedDate": "2024-07-20 09:44:58",
"validFromDate": "2024-07-20 09:44:58",
"expiryDate": "2025-07-25 00:00:00",
"personalisation": {
"to": "enim",
"message": "Et qui est minus. Et et architecto dolor ratione. Iusto odit modi sit error consequatur qui culpa."
},
"total": 24.76,
"paid": 24.76,
"balance": 35.14,
"status": "Redeemed",
"customerName": "Patricia Thomas",
"partRedeemable": false,
"delivery": {
"method": "Post",
"type": "Gift Box Signed 1st class ",
"cost": 11.64
}
}
}
Received response:
Request failed with error:
Redeem a voucher.
requires authentication
Example request:
curl --request POST \
"https://admin.giftvoucherbrilliance.co.uk/api/voucher/libero/redeem" \
--header "Authorization: Bearer {YOUR_AUTH_TOKEN}" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"amount\": 11
}"
const url = new URL(
"https://admin.giftvoucherbrilliance.co.uk/api/voucher/libero/redeem"
);
const headers = {
"Authorization": "Bearer {YOUR_AUTH_TOKEN}",
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"amount": 11
};
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/libero/redeem',
[
'headers' => [
'Authorization' => 'Bearer {YOUR_AUTH_TOKEN}',
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'json' => [
'amount' => 11,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (200):
{
"data": {
"code": "tld-000577-000968",
"description": "Monetary Vouchers<br/>To the value of £100.00",
"issuedDate": "2024-12-26 02:46:08",
"validFromDate": "2024-12-26 02:46:08",
"expiryDate": "2026-10-12 00:00:00",
"personalisation": {
"to": "vero",
"message": "Qui ea voluptatum rem harum culpa. Minima delectus repudiandae laborum adipisci."
},
"total": 4.95,
"paid": 4.95,
"balance": 89.37,
"status": "Unredeemed",
"customerName": "Yvonne Moore",
"partRedeemable": false,
"delivery": {
"method": "Email",
"cost": 0.42,
"email": null
}
}
}
Received response:
Request failed with error: