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: 10 required: false schema: type: integer description: 'The page number to return.' example: 10 - 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: sed discountTotal: '0' total: 44 shippingCost: 82.77 orderDate: null numVouchers: 1 customer: 3752 properties: data: type: object example: orderNumber: 5 discountCode: sed discountTotal: '0' total: 44 shippingCost: 82.77 orderDate: null numVouchers: 1 customer: 3752 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: eaque required: true schema: type: string description: 'The order ID of the order to return.' example: eaque - 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: atque discountTotal: '0' total: 30.23 shippingCost: 52.66 orderDate: null numVouchers: 1 customer: 3753 properties: data: type: object example: orderNumber: 6 discountCode: atque discountTotal: '0' total: 30.23 shippingCost: 52.66 orderDate: null numVouchers: 1 customer: 3753 tags: - Order parameters: - in: path name: order_number description: '' example: dolorem 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: 2 required: false schema: type: integer description: 'The page number to return.' example: 2 - 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: xji-000279-000581 description: 'Afternoon Tea
for Two' issuedDate: '2024-01-30 12:42:32' validFromDate: '2024-01-30 12:42:32' expiryDate: '2024-11-12 00:00:00' personalisation: to: quo message: 'Architecto accusamus repudiandae vitae et consectetur. Aut est quibusdam omnis omnis a optio. Vel nostrum doloribus voluptates dolor sunt.' total: 9.77 paid: 9.77 balance: 69.7 status: Unredeemed customerName: 'Jennifer Green' partRedeemable: false delivery: method: Post type: 'Envelope Standard 1st class' cost: 16.24 properties: data: type: object example: code: xji-000279-000581 description: 'Afternoon Tea
for Two' issuedDate: '2024-01-30 12:42:32' validFromDate: '2024-01-30 12:42:32' expiryDate: '2024-11-12 00:00:00' personalisation: to: quo message: 'Architecto accusamus repudiandae vitae et consectetur. Aut est quibusdam omnis omnis a optio. Vel nostrum doloribus voluptates dolor sunt.' total: 9.77 paid: 9.77 balance: 69.7 status: Unredeemed customerName: 'Jennifer Green' partRedeemable: false delivery: method: Post type: 'Envelope Standard 1st class' cost: 16.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: knh-000521-000132 description: 'Mud Rasul
2 people (45 mins)  ' issuedDate: '2023-10-06 22:48:24' validFromDate: '2023-10-06 22:48:24' expiryDate: '2024-07-06 00:00:00' personalisation: to: eos message: 'Accusantium dolorem id culpa repudiandae animi distinctio. Deleniti distinctio non reiciendis veritatis saepe. Quis et ut molestiae sunt tenetur.' total: 84.99 paid: 84.99 balance: 20.23 status: Redeemed customerName: 'Faye Morgan' partRedeemable: true delivery: method: Post type: 'Envelope Standard 1st class' cost: 3.94 properties: data: type: object example: code: knh-000521-000132 description: 'Mud Rasul
2 people (45 mins)  ' issuedDate: '2023-10-06 22:48:24' validFromDate: '2023-10-06 22:48:24' expiryDate: '2024-07-06 00:00:00' personalisation: to: eos message: 'Accusantium dolorem id culpa repudiandae animi distinctio. Deleniti distinctio non reiciendis veritatis saepe. Quis et ut molestiae sunt tenetur.' total: 84.99 paid: 84.99 balance: 20.23 status: Redeemed customerName: 'Faye Morgan' partRedeemable: true delivery: method: Post type: 'Envelope Standard 1st class' cost: 3.94 tags: - Voucher parameters: - in: path name: code_voucher_id description: 'The ID of the code voucher.' example: veniam required: true schema: type: string - in: path name: code description: 'The code of the voucher to return.' example: incidunt 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: qxu-000722-000825 description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest ' issuedDate: '2023-07-15 03:44:38' validFromDate: '2023-07-15 03:44:38' expiryDate: '2025-12-21 00:00:00' personalisation: to: sed message: 'Laboriosam et quas velit consequatur. Delectus aut dignissimos delectus iusto. Eius consequatur iure quo debitis labore sapiente. Deserunt reprehenderit nesciunt atque qui.' total: 6.09 paid: 6.09 balance: 69.35 status: Unredeemed customerName: 'Jasmine Matthews' partRedeemable: false delivery: method: Email cost: 12.07 email: null properties: data: type: object example: code: qxu-000722-000825 description: 'Lunch or Pre-Theatre Supper
Two Courses for One Guest ' issuedDate: '2023-07-15 03:44:38' validFromDate: '2023-07-15 03:44:38' expiryDate: '2025-12-21 00:00:00' personalisation: to: sed message: 'Laboriosam et quas velit consequatur. Delectus aut dignissimos delectus iusto. Eius consequatur iure quo debitis labore sapiente. Deserunt reprehenderit nesciunt atque qui.' total: 6.09 paid: 6.09 balance: 69.35 status: Unredeemed customerName: 'Jasmine Matthews' partRedeemable: false delivery: method: Email cost: 12.07 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: 3 parameters: - in: path name: code_voucher_id description: 'The ID of the code voucher.' example: iusto required: true schema: type: string - in: path name: code description: 'The code of the voucher to be redeemed.' example: labore 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: []