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: 8
required: false
schema:
type: integer
description: 'The page number to return.'
example: 8
-
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: autem
discountTotal: '0'
total: 1.46
shippingCost: 2.19
orderDate: null
numVouchers: 1
customer: 5385
properties:
data:
type: object
example:
orderNumber: 5
discountCode: autem
discountTotal: '0'
total: 1.46
shippingCost: 2.19
orderDate: null
numVouchers: 1
customer: 5385
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: id
required: true
schema:
type: string
description: 'The order ID of the order to return.'
example: id
-
in: query
name: expanded
description: 'Expand related values to full objects e.g return the order with voucher and customer details.'
example: false
required: false
schema:
type: boolean
description: 'Expand related values to full objects e.g return the order with voucher and 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: 6
discountCode: cum
discountTotal: '0'
total: 76.51
shippingCost: 28.45
orderDate: null
numVouchers: 1
customer: 5386
properties:
data:
type: object
example:
orderNumber: 6
discountCode: cum
discountTotal: '0'
total: 76.51
shippingCost: 28.45
orderDate: null
numVouchers: 1
customer: 5386
tags:
- Order
parameters:
-
in: path
name: order_number
description: ''
example: quibusdam
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: 14
required: false
schema:
type: integer
description: 'The page number to return.'
example: 14
-
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: swk-000172-000861
description: 'Monetary Vouchers
To the value of £40.00'
issuedDate: '2025-07-20 05:50:18'
validFromDate: '2025-07-20 05:50:18'
expiryDate: '2026-09-14 00:00:00'
personalisation:
to: expedita
message: 'Mollitia nemo quas sit doloribus. Doloribus facere cupiditate temporibus voluptatum sunt. Officiis iusto nihil enim et aut.'
total: 91.12
paid: 91.12
balance: 95.25
status: Redeemed
customerName: 'Duncan Reid'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 28.51
properties:
data:
type: object
example:
code: swk-000172-000861
description: 'Monetary Vouchers
To the value of £40.00'
issuedDate: '2025-07-20 05:50:18'
validFromDate: '2025-07-20 05:50:18'
expiryDate: '2026-09-14 00:00:00'
personalisation:
to: expedita
message: 'Mollitia nemo quas sit doloribus. Doloribus facere cupiditate temporibus voluptatum sunt. Officiis iusto nihil enim et aut.'
total: 91.12
paid: 91.12
balance: 95.25
status: Redeemed
customerName: 'Duncan Reid'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 28.51
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: gbo-000950-000000
description: 'Mud Rasul
2 people (45 mins) '
issuedDate: '2025-08-31 01:47:48'
validFromDate: '2025-08-31 01:47:48'
expiryDate: '2026-07-21 00:00:00'
personalisation:
to: molestias
message: 'Et voluptatem illum quia aliquam eum. Autem error aut iure iure sunt perferendis. Ea nulla debitis impedit nemo ut odit rerum. Corporis quibusdam voluptatem nihil et et sit aut.'
total: 52.35
paid: 52.35
balance: 3.1
status: Unredeemed
customerName: 'Vicky Baker'
partRedeemable: false
delivery:
method: Email
cost: 31.3
email: null
properties:
data:
type: object
example:
code: gbo-000950-000000
description: 'Mud Rasul
2 people (45 mins) '
issuedDate: '2025-08-31 01:47:48'
validFromDate: '2025-08-31 01:47:48'
expiryDate: '2026-07-21 00:00:00'
personalisation:
to: molestias
message: 'Et voluptatem illum quia aliquam eum. Autem error aut iure iure sunt perferendis. Ea nulla debitis impedit nemo ut odit rerum. Corporis quibusdam voluptatem nihil et et sit aut.'
total: 52.35
paid: 52.35
balance: 3.1
status: Unredeemed
customerName: 'Vicky Baker'
partRedeemable: false
delivery:
method: Email
cost: 31.3
email: null
tags:
- Voucher
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: labore
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to return.'
example: veniam
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: fbn-000542-000822
description: 'Ultimate Spa Treatment
For Two '
issuedDate: '2025-08-04 10:02:54'
validFromDate: '2025-08-04 10:02:54'
expiryDate: '2026-07-28 00:00:00'
personalisation:
to: qui
message: 'Rerum doloribus sapiente possimus atque repudiandae. Occaecati earum quam illum dolor minus. Eos voluptatem adipisci consequatur molestiae aliquid. Placeat reiciendis in et neque.'
total: 22.42
paid: 22.42
balance: 10.88
status: Unredeemed
customerName: 'Linda Robertson'
partRedeemable: false
delivery:
method: Post
type: 'Gift Box Signed 1st class '
cost: 69.34
properties:
data:
type: object
example:
code: fbn-000542-000822
description: 'Ultimate Spa Treatment
For Two '
issuedDate: '2025-08-04 10:02:54'
validFromDate: '2025-08-04 10:02:54'
expiryDate: '2026-07-28 00:00:00'
personalisation:
to: qui
message: 'Rerum doloribus sapiente possimus atque repudiandae. Occaecati earum quam illum dolor minus. Eos voluptatem adipisci consequatur molestiae aliquid. Placeat reiciendis in et neque.'
total: 22.42
paid: 22.42
balance: 10.88
status: Unredeemed
customerName: 'Linda Robertson'
partRedeemable: false
delivery:
method: Post
type: 'Gift Box Signed 1st class '
cost: 69.34
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: 14
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: quas
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to be redeemed.'
example: illum
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: []