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: 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: nulla
discountTotal: '0'
total: 49.78
shippingCost: 69.69
orderDate: null
numVouchers: 1
customer: 4512
properties:
data:
type: object
example:
orderNumber: 5
discountCode: nulla
discountTotal: '0'
total: 49.78
shippingCost: 69.69
orderDate: null
numVouchers: 1
customer: 4512
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: assumenda
required: true
schema:
type: string
description: 'The order ID of the order to return.'
example: assumenda
-
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: expedita
discountTotal: '0'
total: 55.03
shippingCost: 64.06
orderDate: null
numVouchers: 1
customer: 4513
properties:
data:
type: object
example:
orderNumber: 6
discountCode: expedita
discountTotal: '0'
total: 55.03
shippingCost: 64.06
orderDate: null
numVouchers: 1
customer: 4513
tags:
- Order
parameters:
-
in: path
name: order_number
description: ''
example: libero
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: 7
required: false
schema:
type: integer
description: 'The page number to return.'
example: 7
-
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: qoo-000725-000471
description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest '
issuedDate: '2025-05-19 04:14:09'
validFromDate: '2025-05-19 04:14:09'
expiryDate: '2026-02-26 00:00:00'
personalisation:
to: quidem
message: 'Earum eum et delectus est molestiae harum incidunt. Iste quae incidunt id velit animi. Est maxime vel asperiores iusto. Ab maxime dicta tenetur.'
total: 7.56
paid: 7.56
balance: 39.7
status: Unredeemed
customerName: 'Courtney Hill'
partRedeemable: false
delivery:
method: Email
cost: 75.82
email: null
properties:
data:
type: object
example:
code: qoo-000725-000471
description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest '
issuedDate: '2025-05-19 04:14:09'
validFromDate: '2025-05-19 04:14:09'
expiryDate: '2026-02-26 00:00:00'
personalisation:
to: quidem
message: 'Earum eum et delectus est molestiae harum incidunt. Iste quae incidunt id velit animi. Est maxime vel asperiores iusto. Ab maxime dicta tenetur.'
total: 7.56
paid: 7.56
balance: 39.7
status: Unredeemed
customerName: 'Courtney Hill'
partRedeemable: false
delivery:
method: Email
cost: 75.82
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: sgz-000481-000623
description: 'Mud Rasul
2 people (45 mins) '
issuedDate: '2025-01-05 05:40:37'
validFromDate: '2025-01-05 05:40:37'
expiryDate: '2026-12-07 00:00:00'
personalisation:
to: numquam
message: 'Commodi eos eum excepturi aut. Aut esse voluptate quisquam commodi non molestias. Laborum reiciendis in ratione non ut. Quod dignissimos qui quod veritatis qui esse itaque dolorum.'
total: 11.23
paid: 11.23
balance: 0.92
status: Unredeemed
customerName: 'Amber Mitchell'
partRedeemable: true
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 45.92
properties:
data:
type: object
example:
code: sgz-000481-000623
description: 'Mud Rasul
2 people (45 mins) '
issuedDate: '2025-01-05 05:40:37'
validFromDate: '2025-01-05 05:40:37'
expiryDate: '2026-12-07 00:00:00'
personalisation:
to: numquam
message: 'Commodi eos eum excepturi aut. Aut esse voluptate quisquam commodi non molestias. Laborum reiciendis in ratione non ut. Quod dignissimos qui quod veritatis qui esse itaque dolorum.'
total: 11.23
paid: 11.23
balance: 0.92
status: Unredeemed
customerName: 'Amber Mitchell'
partRedeemable: true
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 45.92
tags:
- Voucher
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: quos
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to return.'
example: excepturi
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: sfr-000522-000360
description: 'Back, Face & Scalp Massage '
issuedDate: '2024-06-25 23:33:32'
validFromDate: '2024-06-25 23:33:32'
expiryDate: '2026-06-06 00:00:00'
personalisation:
to: provident
message: 'Omnis vel perspiciatis totam tempora aperiam et. Et omnis vitae et quia cupiditate qui ratione. Debitis distinctio non laudantium officia eum rerum ut.'
total: 86.88
paid: 86.88
balance: 37.2
status: Redeemed
customerName: 'Vanessa Jones'
partRedeemable: true
delivery:
method: Email
cost: 70.3
email: null
properties:
data:
type: object
example:
code: sfr-000522-000360
description: 'Back, Face & Scalp Massage '
issuedDate: '2024-06-25 23:33:32'
validFromDate: '2024-06-25 23:33:32'
expiryDate: '2026-06-06 00:00:00'
personalisation:
to: provident
message: 'Omnis vel perspiciatis totam tempora aperiam et. Et omnis vitae et quia cupiditate qui ratione. Debitis distinctio non laudantium officia eum rerum ut.'
total: 86.88
paid: 86.88
balance: 37.2
status: Redeemed
customerName: 'Vanessa Jones'
partRedeemable: true
delivery:
method: Email
cost: 70.3
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: 8
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: aut
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to be redeemed.'
example: perferendis
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: []