openapi: 3.0.3
info:
title: 'Gift Voucher Brilliance API'
description: 'API for Gift Voucher Brilliance'
version: 1.0.0
servers:
-
url: 'https://admin.giftvoucherbrilliance.co.uk'
paths:
/api/orders:
get:
summary: 'Return details about the latest orders.'
description: ''
parameters:
-
in: query
name: page
description: 'The page number to return.'
example: 16
required: false
schema:
type: integer
description: 'The page number to return.'
example: 16
-
in: query
name: expanded
description: 'Expand related values to full objects e.g return all orders with customer details.'
example: false
required: false
schema:
type: boolean
description: 'Expand related values to full objects e.g return all orders with customer details.'
example: false
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_AUTH_TOKEN}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: '0'
content:
application/json:
schema:
type: object
example:
data:
orderNumber: 5
discountCode: debitis
discountTotal: '0'
total: 1.8
shippingCost: 80.84
orderDate: null
numVouchers: 1
customer: 5097
properties:
data:
type: object
example:
orderNumber: 5
discountCode: debitis
discountTotal: '0'
total: 1.8
shippingCost: 80.84
orderDate: null
numVouchers: 1
customer: 5097
tags:
- Order
'/api/orders/{order_number}':
get:
summary: 'Return details about a single order.'
description: ''
parameters:
-
in: query
name: $order
description: 'The order ID of the order to return.'
example: dicta
required: true
schema:
type: string
description: 'The order ID of the order to return.'
example: dicta
-
in: query
name: expanded
description: 'Expand related values to full objects e.g return the order with voucher and customer details.'
example: true
required: false
schema:
type: boolean
description: 'Expand related values to full objects e.g return the order with voucher and customer details.'
example: true
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_AUTH_TOKEN}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: '0'
content:
application/json:
schema:
type: object
example:
data:
orderNumber: 6
discountCode: dolor
discountTotal: '0'
total: 75.31
shippingCost: 24.51
orderDate: null
numVouchers: 1
customer: 5098
properties:
data:
type: object
example:
orderNumber: 6
discountCode: dolor
discountTotal: '0'
total: 75.31
shippingCost: 24.51
orderDate: null
numVouchers: 1
customer: 5098
tags:
- Order
parameters:
-
in: path
name: order_number
description: ''
example: voluptate
required: true
schema:
type: string
/api/shop:
get:
summary: 'Return details about the current authenicated shop'
description: ''
parameters:
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_AUTH_TOKEN}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: ''
content:
application/json:
schema:
type: object
example:
data:
title: Clockwork
url: 'https://clockwork.giftvoucherbrilliance.co.uk'
properties:
data:
type: object
example:
title: Clockwork
url: 'https://clockwork.giftvoucherbrilliance.co.uk'
tags:
- Shop
/api/vouchers-sold:
get:
summary: 'Return details about the latest vouchers issued.'
description: ''
parameters:
-
in: query
name: page
description: 'The page number to return.'
example: 10
required: false
schema:
type: integer
description: 'The page number to return.'
example: 10
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_AUTH_TOKEN}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: '0'
content:
application/json:
schema:
type: object
example:
data:
code: quo-000540-000713
description: 'Mud Rasul
2 people (45 mins) '
issuedDate: '2025-01-04 18:52:23'
validFromDate: '2025-01-04 18:52:23'
expiryDate: '2025-12-30 00:00:00'
personalisation:
to: quia
message: 'Ut nobis enim consequatur recusandae quaerat. Laboriosam ut esse repellat sed. Modi quae voluptatum et adipisci.'
total: 15.65
paid: 15.65
balance: 77.78
status: Redeemed
customerName: 'Jennifer Holmes'
partRedeemable: false
delivery:
method: Email
cost: 25.27
email: null
properties:
data:
type: object
example:
code: quo-000540-000713
description: 'Mud Rasul
2 people (45 mins) '
issuedDate: '2025-01-04 18:52:23'
validFromDate: '2025-01-04 18:52:23'
expiryDate: '2025-12-30 00:00:00'
personalisation:
to: quia
message: 'Ut nobis enim consequatur recusandae quaerat. Laboriosam ut esse repellat sed. Modi quae voluptatum et adipisci.'
total: 15.65
paid: 15.65
balance: 77.78
status: Redeemed
customerName: 'Jennifer Holmes'
partRedeemable: false
delivery:
method: Email
cost: 25.27
email: null
tags:
- Voucher
'/api/vouchers-sold/{code_voucher_id}':
get:
summary: 'Return details about a single voucher.'
description: ''
parameters:
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_AUTH_TOKEN}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: '0'
content:
application/json:
schema:
type: object
example:
data:
code: wxf-000536-000238
description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest '
issuedDate: '2024-12-23 03:06:59'
validFromDate: '2024-12-23 03:06:59'
expiryDate: '2026-10-07 00:00:00'
personalisation:
to: autem
message: 'Dolor aperiam ut praesentium molestiae. Est dolores optio qui et voluptate. Et ea magnam quaerat est autem et.'
total: 23.31
paid: 23.31
balance: 61.35
status: Unredeemed
customerName: 'Tyler Robertson'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 38.13
properties:
data:
type: object
example:
code: wxf-000536-000238
description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest '
issuedDate: '2024-12-23 03:06:59'
validFromDate: '2024-12-23 03:06:59'
expiryDate: '2026-10-07 00:00:00'
personalisation:
to: autem
message: 'Dolor aperiam ut praesentium molestiae. Est dolores optio qui et voluptate. Et ea magnam quaerat est autem et.'
total: 23.31
paid: 23.31
balance: 61.35
status: Unredeemed
customerName: 'Tyler Robertson'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 38.13
tags:
- Voucher
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: assumenda
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to return.'
example: facere
required: true
schema:
type: string
'/api/voucher/{code_voucher_id}/redeem':
post:
summary: 'Redeem a voucher.'
description: ''
parameters:
-
in: header
name: Authorization
description: ''
example: 'Bearer {YOUR_AUTH_TOKEN}'
schema:
type: string
-
in: header
name: Content-Type
description: ''
example: application/json
schema:
type: string
-
in: header
name: Accept
description: ''
example: application/json
schema:
type: string
responses:
200:
description: '0'
content:
application/json:
schema:
type: object
example:
data:
code: nmd-000861-000324
description: 'Back, Face & Scalp Massage '
issuedDate: '2025-10-04 11:22:46'
validFromDate: '2025-10-04 11:22:46'
expiryDate: '2027-08-04 00:00:00'
personalisation:
to: provident
message: 'Magni error accusantium porro natus enim odio. Dolorem quidem temporibus veritatis. Reiciendis consequuntur beatae qui quo itaque et.'
total: 48
paid: 48
balance: 53.08
status: Redeemed
customerName: 'Sophia Jackson'
partRedeemable: true
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 61.09
properties:
data:
type: object
example:
code: nmd-000861-000324
description: 'Back, Face & Scalp Massage '
issuedDate: '2025-10-04 11:22:46'
validFromDate: '2025-10-04 11:22:46'
expiryDate: '2027-08-04 00:00:00'
personalisation:
to: provident
message: 'Magni error accusantium porro natus enim odio. Dolorem quidem temporibus veritatis. Reiciendis consequuntur beatae qui quo itaque et.'
total: 48
paid: 48
balance: 53.08
status: Redeemed
customerName: 'Sophia Jackson'
partRedeemable: true
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 61.09
tags:
- Voucher
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
amount:
type: integer
description: 'If the voucher has partRedeemable set to true then you can pass this value. It should be an amount equal or less than the balance of the voucher. The value provided must be of smallest monetary unit of the currency used (integer) e.g £10.43 => 1043.'
example: 19
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: doloribus
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to be redeemed.'
example: aliquam
required: true
schema:
type: string
tags:
-
name: Order
description: ''
-
name: Shop
description: "\nEndpoints for getting information about the current shop which is decided via the API Token used."
-
name: Voucher
description: ''
components:
securitySchemes:
default:
type: http
scheme: bearer
description: ''
security:
-
default: []