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: 2
required: false
schema:
type: integer
description: 'The page number to return.'
example: 2
-
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: est
discountTotal: '0'
total: 63.65
shippingCost: 91.94
orderDate: null
numVouchers: 1
customer: 4196
properties:
data:
type: object
example:
orderNumber: 5
discountCode: est
discountTotal: '0'
total: 63.65
shippingCost: 91.94
orderDate: null
numVouchers: 1
customer: 4196
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: sapiente
required: true
schema:
type: string
description: 'The order ID of the order to return.'
example: sapiente
-
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: impedit
discountTotal: '0'
total: 73.47
shippingCost: 94.19
orderDate: null
numVouchers: 1
customer: 4197
properties:
data:
type: object
example:
orderNumber: 6
discountCode: impedit
discountTotal: '0'
total: 73.47
shippingCost: 94.19
orderDate: null
numVouchers: 1
customer: 4197
tags:
- Order
parameters:
-
in: path
name: order_number
description: ''
example: rerum
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: 19
required: false
schema:
type: integer
description: 'The page number to return.'
example: 19
-
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: qmp-000176-000917
description: 'Monetary Vouchers
To the value of £100.00'
issuedDate: '2024-06-23 07:00:57'
validFromDate: '2024-06-23 07:00:57'
expiryDate: '2025-04-16 00:00:00'
personalisation:
to: accusamus
message: 'In aliquam quo aut eligendi aliquid sed non. Id quia nihil explicabo et nobis corrupti. Voluptate quis est error possimus illum. Animi in et ut rerum enim sequi. Quo eveniet explicabo quisquam quod.'
total: 49.04
paid: 49.04
balance: 95.37
status: Redeemed
customerName: 'Jessica Murphy'
partRedeemable: false
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 43.24
properties:
data:
type: object
example:
code: qmp-000176-000917
description: 'Monetary Vouchers
To the value of £100.00'
issuedDate: '2024-06-23 07:00:57'
validFromDate: '2024-06-23 07:00:57'
expiryDate: '2025-04-16 00:00:00'
personalisation:
to: accusamus
message: 'In aliquam quo aut eligendi aliquid sed non. Id quia nihil explicabo et nobis corrupti. Voluptate quis est error possimus illum. Animi in et ut rerum enim sequi. Quo eveniet explicabo quisquam quod.'
total: 49.04
paid: 49.04
balance: 95.37
status: Redeemed
customerName: 'Jessica Murphy'
partRedeemable: false
delivery:
method: Post
type: 'Vouchers will be sent via email'
cost: 43.24
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: hlv-000422-000895
description: 'Back, Face & Scalp Massage '
issuedDate: '2024-10-20 11:39:33'
validFromDate: '2024-10-20 11:39:33'
expiryDate: '2026-02-09 00:00:00'
personalisation:
to: quae
message: 'Ab doloribus dicta aut adipisci quis qui ad. Modi et accusantium excepturi aut exercitationem vel velit sapiente. Repudiandae voluptatum cum id in numquam sit dolorem totam.'
total: 70.5
paid: 70.5
balance: 16.69
status: Redeemed
customerName: 'William King'
partRedeemable: false
delivery:
method: Email
cost: 49.58
email: null
properties:
data:
type: object
example:
code: hlv-000422-000895
description: 'Back, Face & Scalp Massage '
issuedDate: '2024-10-20 11:39:33'
validFromDate: '2024-10-20 11:39:33'
expiryDate: '2026-02-09 00:00:00'
personalisation:
to: quae
message: 'Ab doloribus dicta aut adipisci quis qui ad. Modi et accusantium excepturi aut exercitationem vel velit sapiente. Repudiandae voluptatum cum id in numquam sit dolorem totam.'
total: 70.5
paid: 70.5
balance: 16.69
status: Redeemed
customerName: 'William King'
partRedeemable: false
delivery:
method: Email
cost: 49.58
email: null
tags:
- Voucher
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: ad
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to return.'
example: rerum
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: haq-000121-000231
description: '2 Night stay with Breakfast'
issuedDate: '2024-09-22 23:29:03'
validFromDate: '2024-09-22 23:29:03'
expiryDate: '2026-04-11 00:00:00'
personalisation:
to: a
message: 'Rerum officiis culpa consequuntur et. Doloremque quos qui quae neque ratione. Sunt tempore et harum laudantium.'
total: 55.1
paid: 55.1
balance: 2.44
status: Redeemed
customerName: 'Helen Shaw'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 14.7
properties:
data:
type: object
example:
code: haq-000121-000231
description: '2 Night stay with Breakfast'
issuedDate: '2024-09-22 23:29:03'
validFromDate: '2024-09-22 23:29:03'
expiryDate: '2026-04-11 00:00:00'
personalisation:
to: a
message: 'Rerum officiis culpa consequuntur et. Doloremque quos qui quae neque ratione. Sunt tempore et harum laudantium.'
total: 55.1
paid: 55.1
balance: 2.44
status: Redeemed
customerName: 'Helen Shaw'
partRedeemable: false
delivery:
method: Post
type: 'Envelope Standard 1st class'
cost: 14.7
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: 4
parameters:
-
in: path
name: code_voucher_id
description: 'The ID of the code voucher.'
example: minima
required: true
schema:
type: string
-
in: path
name: code
description: 'The code of the voucher to be redeemed.'
example: itaque
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: []