vivenu vouchers API
The vouchers API from vivenu — 5 operation(s) for vouchers.
The vouchers API from vivenu — 5 operation(s) for vouchers.
openapi: 3.0.3
info:
title: vivenu access-lists vouchers API
description: vivenu API Documentation
version: 1.0.0
contact:
name: vivenu GmbH
url: https://vivenu.com
servers:
- url: https://vivenu.com
description: Production API
- url: https://vivenu.dev
description: Staging API
tags:
- name: vouchers
paths:
/api/vouchers:
get:
security:
- jwt: []
- apikey: []
parameters:
- name: top
required: false
schema:
type: number
format: float
description: A limit on the number of objects to be returned. Can range between 1 and 1000.
default: 25
metas: {}
in: query
style: form
explode: true
- name: skip
required: false
schema:
type: number
format: float
description: The number of objects to skip for the requested result
metas: {}
in: query
style: form
explode: true
- name: code
required: false
schema:
type: string
nullable: true
description: Filter vouchers by code
metas: {}
in: query
style: form
explode: true
- name: transactionId
required: false
schema:
type: string
nullable: true
description: Filter vouchers by transactionId
metas: {}
in: query
style: form
explode: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GET_Vouchers_GetAllVouchers_200_response'
'400':
description: Bad Request
'401':
description: Unauthorized
tags:
- vouchers
description: Get all Vouchers
operationId: vouchers/list
post:
security:
- jwt: []
- apikey: []
parameters: []
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/VoucherResource'
'400':
description: Bad Request
'401':
description: Unauthorized
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/POST_Vouchers_CreateAVoucher'
tags:
- vouchers
description: Create a Voucher
operationId: vouchers/create
/api/vouchers/rich:
get:
security:
- jwt: []
- apikey: []
parameters:
- name: top
required: false
schema:
type: number
format: float
description: A limit on the number of objects to be returned. Can range between 1 and 1000.
default: 25
metas: {}
in: query
style: form
explode: true
- name: skip
required: false
schema:
type: number
format: float
description: The number of objects to skip for the requested result
metas: {}
in: query
style: form
explode: true
- name: code
required: false
schema:
type: string
nullable: true
description: Filter vouchers by code
metas: {}
in: query
style: form
explode: true
- name: transactionId
required: false
schema:
type: string
nullable: true
description: Filter vouchers by transactionId
metas: {}
in: query
style: form
explode: true
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GET_Vouchers_GetAllVouchers_200_response'
'400':
description: Bad Request
'401':
description: Unauthorized
tags:
- vouchers
description: Get all Vouchers
deprecated: true
operationId: get_all_vouchers
/api/vouchers/{id}:
get:
security:
- jwt: []
- apikey: []
parameters:
- name: id
required: true
schema:
type: string
description: The ID of the voucher to get
metas: {}
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/VoucherResource'
'400':
description: Bad Request
'401':
description: Unauthorized
'404':
description: Not Found
tags:
- vouchers
description: Get Voucher by id
operationId: get_voucher_by_id
put:
security:
- jwt: []
- apikey: []
parameters:
- name: id
required: true
schema:
type: string
description: The ID of the voucher to update
metas: {}
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/VoucherResource'
'400':
description: Bad Request
'401':
description: Unauthorized
'404':
description: Not Found
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PUT_Vouchers_UpdateAVoucher'
tags:
- vouchers
description: Update a Voucher
operationId: vouchers/update
/api/vouchers/{id}/transactions:
get:
security:
- jwt: []
- apikey: []
parameters:
- name: id
required: true
schema:
type: string
description: The ID of the voucher to get
metas: {}
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
type: object
properties:
transactionId:
type: string
amount:
type: number
createdAt:
type: string
format: date-time
required:
- transactionId
- amount
- createdAt
additionalProperties: false
'400':
description: Bad Request
'401':
description: Unauthorized
'404':
description: Not Found
tags:
- vouchers
description: Get Voucher Transactions by id
operationId: vouchers/getTransactions
/api/vouchers/{id}/{code}/info:
get:
parameters:
- name: id
schema:
type: string
required: true
in: path
- name: code
schema:
type: string
required: true
in: path
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/GET_Vouchers_GetVoucherByIdAndCode_200_response'
'404':
description: Not Found
tags:
- vouchers
description: Get Voucher by id and code
operationId: get_voucher_by_id_and_code
components:
schemas:
PUT_Vouchers_UpdateAVoucher:
type: object
properties:
amount:
type: number
format: float
description: The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
validUntil:
type: string
format: date-time
nullable: true
description: The date until the voucher can be redeemed. If no date is specified, the voucher has no expiration
required:
- amount
POST_Vouchers_CreateAVoucher:
type: object
properties:
code:
type: string
minLength: 4
pattern: ^[^;]*$
nullable: true
description: The code used to redeem the voucher
amount:
type: number
format: float
description: The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
validUntil:
type: string
format: date-time
nullable: true
description: The date until the voucher can be redeemed.
required:
- amount
GET_Vouchers_GetAllVouchers_200_response:
type: object
properties:
docs:
type: array
items:
$ref: '#/components/schemas/VoucherWithBalanceResource'
total:
type: integer
VoucherWithBalanceResource:
type: object
properties:
code:
type: string
minLength: 4
pattern: ^[^;]*$
description: Code used to redeem the voucher
amount:
type: number
format: float
description: The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
validUntil:
type: string
format: date-time
description: The date until this voucher can be redeemed.
sellerId:
type: string
description: The ID of the seller of the voucher
transactionId:
type: string
description: The ID of the transaction if the voucher was a result of a transaction
productId:
type: string
description: The ID of the product if the voucher was a result of a product
refundId:
type: string
description: The ID of the refund if the voucher was a result of a refund
customerId:
type: string
description: The ID of the customer if the voucher was created for a specific customer
origin:
type: string
enum:
- default
- shop
- import
- upgrade
- refund
description: The origin of the voucher
createdAt:
type: string
format: date-time
description: An ISO Timestamp indicating when the voucher was created.
updatedAt:
type: string
format: date-time
description: An ISO Timestamp indicating when the voucher was last updated.
balance:
type: number
format: float
description: The remaining balance of the voucher in seller's currency
required:
- code
- amount
- createdAt
- updatedAt
- balance
GET_Vouchers_GetVoucherByIdAndCode_200_response:
type: object
properties:
voucher:
$ref: '#/components/schemas/VoucherResource'
displaySettings:
type: object
properties:
disclaimer:
type: string
description: The disclaimer of the voucher
pdfImage:
type: string
description: The image of the voucher
seller:
type: object
properties:
city:
type: string
street:
type: string
postal:
type: string
taxRate:
type: number
format: float
taxNo:
type: string
currency:
type: string
image:
type: string
description: The logo of the seller
name:
type: string
description: The name of the seller
locationName:
type: string
brandingSettings:
type: object
properties:
customBrandingEnabled:
type: boolean
shopLogoUrl:
type: string
eventLogo:
type: string
mailLogo:
type: string
customLogo:
type: string
walletLogo:
type: string
googleWalletLogo:
type: string
walletBackgroundColor:
type: string
walletForegroundColor:
type: string
walletLabelColor:
type: string
ticketRibbonImage:
type: string
documentSettings:
type: object
properties:
image:
type: string
invoice:
type: object
properties:
footerColumns:
type: array
items:
type: object
properties:
text:
type: string
active:
type: boolean
required:
- name
timezone:
type: string
useDocumentTemplate:
type: boolean
VoucherResource:
type: object
properties:
code:
type: string
minLength: 4
pattern: ^[^;]*$
description: Code used to redeem the voucher
amount:
type: number
format: float
description: The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
validUntil:
type: string
format: date-time
description: The date until this voucher can be redeemed.
sellerId:
type: string
description: The ID of the seller of the voucher
transactionId:
type: string
description: The ID of the transaction if the voucher was a result of a transaction
productId:
type: string
description: The ID of the product if the voucher was a result of a product
refundId:
type: string
description: The ID of the refund if the voucher was a result of a refund
customerId:
type: string
description: The ID of the customer if the voucher was created for a specific customer
origin:
type: string
enum:
- default
- shop
- import
- upgrade
- refund
description: The origin of the voucher
createdAt:
type: string
format: date-time
description: An ISO Timestamp indicating when the voucher was created.
updatedAt:
type: string
format: date-time
description: An ISO Timestamp indicating when the voucher was last updated.
required:
- code
- amount
- createdAt
- updatedAt
securitySchemes:
jwt:
type: http
scheme: bearer
bearerFormat: JWT
apikey:
type: apiKey
scheme: bearer
in: header
name: Authorization
customer-jwt:
type: http
scheme: bearer
bearerFormat: JWT
orgApiKey:
type: apiKey
scheme: bearer
in: header
name: Authorization