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: 15 required: false schema: type: integer description: 'The page number to return.' example: 15 - 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: eum discountTotal: '0' total: 44.62 shippingCost: 45.94 orderDate: null numVouchers: 1 customer: 4569 properties: data: type: object example: orderNumber: 5 discountCode: eum discountTotal: '0' total: 44.62 shippingCost: 45.94 orderDate: null numVouchers: 1 customer: 4569 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: et required: true schema: type: string description: 'The order ID of the order to return.' example: et - 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: odio discountTotal: '0' total: 96.04 shippingCost: 45.34 orderDate: null numVouchers: 1 customer: 4570 properties: data: type: object example: orderNumber: 6 discountCode: odio discountTotal: '0' total: 96.04 shippingCost: 45.34 orderDate: null numVouchers: 1 customer: 4570 tags: - Order parameters: - in: path name: order_number description: '' example: occaecati 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: 15 required: false schema: type: integer description: 'The page number to return.' example: 15 - 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: kgb-000190-000095 description: '2 Night stay with Breakfast' issuedDate: '2024-08-14 16:27:04' validFromDate: '2024-08-14 16:27:04' expiryDate: '2025-12-06 00:00:00' personalisation: to: alias message: 'Et repudiandae in reiciendis voluptatibus. Dolores quae maiores quam pariatur qui rerum reiciendis. In illum eum minus autem quia molestias. Beatae voluptatem deserunt et architecto.' total: 70.83 paid: 70.83 balance: 61.94 status: Redeemed customerName: 'Dylan Price' partRedeemable: false delivery: method: Post type: 'Envelope Standard 1st class' cost: 84.96 properties: data: type: object example: code: kgb-000190-000095 description: '2 Night stay with Breakfast' issuedDate: '2024-08-14 16:27:04' validFromDate: '2024-08-14 16:27:04' expiryDate: '2025-12-06 00:00:00' personalisation: to: alias message: 'Et repudiandae in reiciendis voluptatibus. Dolores quae maiores quam pariatur qui rerum reiciendis. In illum eum minus autem quia molestias. Beatae voluptatem deserunt et architecto.' total: 70.83 paid: 70.83 balance: 61.94 status: Redeemed customerName: 'Dylan Price' partRedeemable: false delivery: method: Post type: 'Envelope Standard 1st class' cost: 84.96 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: osg-000101-000782 description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest ' issuedDate: '2024-10-18 04:10:58' validFromDate: '2024-10-18 04:10:58' expiryDate: '2026-09-18 00:00:00' personalisation: to: accusamus message: 'Pariatur excepturi consequatur temporibus quo consequuntur soluta. Dicta harum amet eveniet et. Quidem earum impedit et molestiae. Accusantium deserunt explicabo mollitia ipsum maxime.' total: 99.7 paid: 99.7 balance: 71.86 status: Redeemed customerName: 'Anthony Stevens' partRedeemable: false delivery: method: Post type: 'Gift Box Signed 1st class ' cost: 38.82 properties: data: type: object example: code: osg-000101-000782 description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest ' issuedDate: '2024-10-18 04:10:58' validFromDate: '2024-10-18 04:10:58' expiryDate: '2026-09-18 00:00:00' personalisation: to: accusamus message: 'Pariatur excepturi consequatur temporibus quo consequuntur soluta. Dicta harum amet eveniet et. Quidem earum impedit et molestiae. Accusantium deserunt explicabo mollitia ipsum maxime.' total: 99.7 paid: 99.7 balance: 71.86 status: Redeemed customerName: 'Anthony Stevens' partRedeemable: false delivery: method: Post type: 'Gift Box Signed 1st class ' cost: 38.82 tags: - Voucher parameters: - in: path name: code_voucher_id description: 'The ID of the code voucher.' example: neque required: true schema: type: string - in: path name: code description: 'The code of the voucher to return.' example: unde 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: axx-000795-000742 description: 'Afternoon Tea
for Two' issuedDate: '2025-02-23 20:33:02' validFromDate: '2025-02-23 20:33:02' expiryDate: '2026-05-27 00:00:00' personalisation: to: veritatis message: 'Aliquam iure maiores molestias ducimus ab amet. Itaque recusandae repudiandae voluptatem qui officiis. Aut ut ut fuga et error.' total: 24.66 paid: 24.66 balance: 65.05 status: Redeemed customerName: 'Claire Murray' partRedeemable: false delivery: method: Email cost: 25.49 email: null properties: data: type: object example: code: axx-000795-000742 description: 'Afternoon Tea
for Two' issuedDate: '2025-02-23 20:33:02' validFromDate: '2025-02-23 20:33:02' expiryDate: '2026-05-27 00:00:00' personalisation: to: veritatis message: 'Aliquam iure maiores molestias ducimus ab amet. Itaque recusandae repudiandae voluptatem qui officiis. Aut ut ut fuga et error.' total: 24.66 paid: 24.66 balance: 65.05 status: Redeemed customerName: 'Claire Murray' partRedeemable: false delivery: method: Email cost: 25.49 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: 5 parameters: - in: path name: code_voucher_id description: 'The ID of the code voucher.' example: molestiae required: true schema: type: string - in: path name: code description: 'The code of the voucher to be redeemed.' example: unde 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: []