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: non
discountTotal: '0'
total: 88.36
shippingCost: 41.98
orderDate: null
numVouchers: 1
customer: 5135
properties:
data:
type: object
example:
orderNumber: 5
discountCode: non
discountTotal: '0'
total: 88.36
shippingCost: 41.98
orderDate: null
numVouchers: 1
customer: 5135
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: ea
required: true
schema:
type: string
description: 'The order ID of the order to return.'
example: ea
-
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: totam
discountTotal: '0'
total: 1.04
shippingCost: 50.98
orderDate: null
numVouchers: 1
customer: 5136
properties:
data:
type: object
example:
orderNumber: 6
discountCode: totam
discountTotal: '0'
total: 1.04
shippingCost: 50.98
orderDate: null
numVouchers: 1
customer: 5136
tags:
- Order
parameters:
-
in: path
name: order_number
description: ''
example: ab
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: brm-000923-000127
description: 'Monetary Vouchers
To the value of £40.00'
issuedDate: '2025-03-16 12:10:11'
validFromDate: '2025-03-16 12:10:11'
expiryDate: '2027-07-20 00:00:00'
personalisation:
to: animi
message: 'Fugit eligendi blanditiis vitae dicta reprehenderit repellendus deserunt. Architecto adipisci rerum deserunt voluptas maiores doloribus.'
total: 18.11
paid: 18.11
balance: 76.86
status: Redeemed
customerName: 'Jason Ross'
partRedeemable: false
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 25
properties:
data:
type: object
example:
code: brm-000923-000127
description: 'Monetary Vouchers
To the value of £40.00'
issuedDate: '2025-03-16 12:10:11'
validFromDate: '2025-03-16 12:10:11'
expiryDate: '2027-07-20 00:00:00'
personalisation:
to: animi
message: 'Fugit eligendi blanditiis vitae dicta reprehenderit repellendus deserunt. Architecto adipisci rerum deserunt voluptas maiores doloribus.'
total: 18.11
paid: 18.11
balance: 76.86
status: Redeemed
customerName: 'Jason Ross'
partRedeemable: false
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 25
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: xyg-000946-000570
description: 'Monetary Vouchers
To the value of £40.00'
issuedDate: '2025-07-02 09:45:01'
validFromDate: '2025-07-02 09:45:01'
expiryDate: '2027-04-08 00:00:00'
personalisation:
to: cum
message: 'Fugit corrupti non voluptatem dolores quis. Exercitationem et qui aliquam ipsa voluptates minima perspiciatis. Eos laudantium accusantium qui nulla accusantium. Aut velit molestiae itaque qui.'
total: 41.58
paid: 41.58
balance: 63.52
status: Redeemed
customerName: 'Lindsay Ross'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 25.74
properties:
data:
type: object
example:
code: xyg-000946-000570
description: 'Monetary Vouchers
To the value of £40.00'
issuedDate: '2025-07-02 09:45:01'
validFromDate: '2025-07-02 09:45:01'
expiryDate: '2027-04-08 00:00:00'
personalisation:
to: cum
message: 'Fugit corrupti non voluptatem dolores quis. Exercitationem et qui aliquam ipsa voluptates minima perspiciatis. Eos laudantium accusantium qui nulla accusantium. Aut velit molestiae itaque qui.'
total: 41.58
paid: 41.58
balance: 63.52
status: Redeemed
customerName: 'Lindsay Ross'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 25.74
tags:
- Voucher
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: culpa
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to return.'
example: laboriosam
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: zgs-000073-000195
description: 'Monetary Vouchers
To the value of £100.00'
issuedDate: '2025-10-28 15:09:04'
validFromDate: '2025-10-28 15:09:04'
expiryDate: '2027-08-18 00:00:00'
personalisation:
to: vitae
message: 'Blanditiis corrupti molestiae dolor. Sapiente eos nulla aliquid vel accusamus. Et nostrum placeat eum repellat sequi.'
total: 87.14
paid: 87.14
balance: 62.3
status: Unredeemed
customerName: 'Callum Morgan'
partRedeemable: false
delivery:
method: Email
cost: 46.27
email: null
properties:
data:
type: object
example:
code: zgs-000073-000195
description: 'Monetary Vouchers
To the value of £100.00'
issuedDate: '2025-10-28 15:09:04'
validFromDate: '2025-10-28 15:09:04'
expiryDate: '2027-08-18 00:00:00'
personalisation:
to: vitae
message: 'Blanditiis corrupti molestiae dolor. Sapiente eos nulla aliquid vel accusamus. Et nostrum placeat eum repellat sequi.'
total: 87.14
paid: 87.14
balance: 62.3
status: Unredeemed
customerName: 'Callum Morgan'
partRedeemable: false
delivery:
method: Email
cost: 46.27
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: 12
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: harum
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to be redeemed.'
example: delectus
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: []