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: 13
required: false
schema:
type: integer
description: 'The page number to return.'
example: 13
-
in: query
name: expanded
description: 'Expand related values to full objects e.g return all orders with customer details.'
example: true
required: false
schema:
type: boolean
description: 'Expand related values to full objects e.g return all orders with 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: 5
discountCode: asperiores
discountTotal: '0'
total: 19.37
shippingCost: 96.07
orderDate: null
numVouchers: 1
customer: 4681
properties:
data:
type: object
example:
orderNumber: 5
discountCode: asperiores
discountTotal: '0'
total: 19.37
shippingCost: 96.07
orderDate: null
numVouchers: 1
customer: 4681
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: omnis
required: true
schema:
type: string
description: 'The order ID of the order to return.'
example: omnis
-
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: quos
discountTotal: '0'
total: 40.08
shippingCost: 18.38
orderDate: null
numVouchers: 1
customer: 4682
properties:
data:
type: object
example:
orderNumber: 6
discountCode: quos
discountTotal: '0'
total: 40.08
shippingCost: 18.38
orderDate: null
numVouchers: 1
customer: 4682
tags:
- Order
parameters:
-
in: path
name: order_number
description: ''
example: animi
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: 6
required: false
schema:
type: integer
description: 'The page number to return.'
example: 6
-
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: ydl-000448-000729
description: 'Afternoon Tea
for One'
issuedDate: '2025-02-10 00:25:49'
validFromDate: '2025-02-10 00:25:49'
expiryDate: '2027-01-15 00:00:00'
personalisation:
to: qui
message: 'Assumenda porro ea quae laborum veritatis rerum. Iusto qui nihil asperiores ut fuga et.'
total: 65.75
paid: 65.75
balance: 73.07
status: Unredeemed
customerName: 'Joshua Morris'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 46.72
properties:
data:
type: object
example:
code: ydl-000448-000729
description: 'Afternoon Tea
for One'
issuedDate: '2025-02-10 00:25:49'
validFromDate: '2025-02-10 00:25:49'
expiryDate: '2027-01-15 00:00:00'
personalisation:
to: qui
message: 'Assumenda porro ea quae laborum veritatis rerum. Iusto qui nihil asperiores ut fuga et.'
total: 65.75
paid: 65.75
balance: 73.07
status: Unredeemed
customerName: 'Joshua Morris'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 46.72
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: bpk-000338-000846
description: 'Prosecco Afternoon Tea
2 people '
issuedDate: '2024-08-12 01:00:38'
validFromDate: '2024-08-12 01:00:38'
expiryDate: '2027-07-29 00:00:00'
personalisation:
to: quis
message: 'Est et repellat iure nesciunt et sequi. Occaecati molestiae modi qui id et. Labore sunt in magnam libero saepe. Qui quisquam repellat accusantium beatae.'
total: 1.08
paid: 1.08
balance: 27.91
status: Unredeemed
customerName: 'Oscar Hunt'
partRedeemable: false
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 67.06
properties:
data:
type: object
example:
code: bpk-000338-000846
description: 'Prosecco Afternoon Tea
2 people '
issuedDate: '2024-08-12 01:00:38'
validFromDate: '2024-08-12 01:00:38'
expiryDate: '2027-07-29 00:00:00'
personalisation:
to: quis
message: 'Est et repellat iure nesciunt et sequi. Occaecati molestiae modi qui id et. Labore sunt in magnam libero saepe. Qui quisquam repellat accusantium beatae.'
total: 1.08
paid: 1.08
balance: 27.91
status: Unredeemed
customerName: 'Oscar Hunt'
partRedeemable: false
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 67.06
tags:
- Voucher
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: corrupti
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to return.'
example: aperiam
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: plg-000359-000624
description: 'Sparkling Afternoon Tea
for One with a Glass of Cava '
issuedDate: '2024-09-27 04:59:48'
validFromDate: '2024-09-27 04:59:48'
expiryDate: '2025-12-11 00:00:00'
personalisation:
to: sunt
message: 'Temporibus praesentium doloremque doloremque non. Non fuga dolorem consequatur. Facere numquam ut sed itaque.'
total: 67.13
paid: 67.13
balance: 16.1
status: Unredeemed
customerName: 'Mandy Lewis'
partRedeemable: false
delivery:
method: Email
cost: 44.14
email: null
properties:
data:
type: object
example:
code: plg-000359-000624
description: 'Sparkling Afternoon Tea
for One with a Glass of Cava '
issuedDate: '2024-09-27 04:59:48'
validFromDate: '2024-09-27 04:59:48'
expiryDate: '2025-12-11 00:00:00'
personalisation:
to: sunt
message: 'Temporibus praesentium doloremque doloremque non. Non fuga dolorem consequatur. Facere numquam ut sed itaque.'
total: 67.13
paid: 67.13
balance: 16.1
status: Unredeemed
customerName: 'Mandy Lewis'
partRedeemable: false
delivery:
method: Email
cost: 44.14
email: null
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: 1
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: omnis
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to be redeemed.'
example: molestiae
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: []