Vouchers
With vouchers you can allow ticket buyers to receive a reduction on their transaction by applying a randomly generated or custom defined code to their total order amount.
Endpoints
The voucher object
Attributes
code
Required
string
Code used to redeem the voucher
amount
Required
number float
The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
createdAt
Required
string date-time
An ISO Timestamp indicating when the voucher was created.
updatedAt
Required
string date-time
An ISO Timestamp indicating when the voucher was last updated.
Optional Attributes
Collapse allExample
{"code": "string","amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z","sellerId": "string","transactionId": "string","productId": "string","refundId": "string","customerId": "string","origin": "default","createdAt": "2030-01-23T23:00:00.123Z","updatedAt": "2030-01-23T23:00:00.123Z"}
Create a Voucher
Payload
amount
Required
number float
The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
Optional Attributes
Collapse allResponses
201
Created
400
Bad Request
401
Unauthorized
post
/api/vouchers
{"code": "string","amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z"}
Response
application/json
{"code": "string","amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z","sellerId": "string","transactionId": "string","productId": "string","refundId": "string","customerId": "string","origin": "default","createdAt": "2030-01-23T23:00:00.123Z","updatedAt": "2030-01-23T23:00:00.123Z"}
get
/api/vouchers/{id}/{code}/info
Response
application/json
{"voucher": {"code": "string","amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z","sellerId": "string","transactionId": "string","productId": "string","refundId": "string","customerId": "string","origin": "default","createdAt": "2030-01-23T23:00:00.123Z","updatedAt": "2030-01-23T23:00:00.123Z"},"displaySettings": {"disclaimer": "string","pdfImage": "string"},"seller": {"city": "string","street": "string","postal": "string","taxRate": 10.5,"taxNo": "string","currency": "string","image": "string","name": "string","locationName": "string","brandingSettings": {"customBrandingEnabled": true,"shopLogoUrl": "string","eventLogo": "string","mailLogo": "string","customLogo": "string","walletLogo": "string","googleWalletLogo": "string","walletBackgroundColor": "string","walletForegroundColor": "string","walletLabelColor": "string","ticketRibbonImage": "string"},"documentSettings": {"image": "string","invoice": {"footerColumns": [{"text": "string","active": true}]}}},"timezone": "string","useDocumentTemplate": true}
Update a Voucher
Payload
amount
Required
number float
The amount of the voucher in seller's currency. eg. 50.0 -> 50 EUR
Optional Attributes
Collapse allResponses
200
OK
400
Bad Request
401
Unauthorized
404
Not Found
put
/api/vouchers/{id}
{"amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z"}
Response
application/json
{"code": "string","amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z","sellerId": "string","transactionId": "string","productId": "string","refundId": "string","customerId": "string","origin": "default","createdAt": "2030-01-23T23:00:00.123Z","updatedAt": "2030-01-23T23:00:00.123Z"}
Get all Vouchers
Query
top
Optional
number float
A limit on the number of objects to be returned. Can range between 1 and 1000.
skip
Optional
number float
The number of objects to skip for the requested result
code
Optional
string
Filter vouchers by code
transactionId
Optional
string
Filter vouchers by transactionId
Responses
200
OK
400
Bad Request
401
Unauthorized
get
/api/vouchers
Response
application/json
{"docs": [{"code": "string","amount": 10.5,"validUntil": "2030-01-23T23:00:00.123Z","sellerId": "string","transactionId": "string","productId": "string","refundId": "string","customerId": "string","origin": "default","createdAt": "2030-01-23T23:00:00.123Z","updatedAt": "2030-01-23T23:00:00.123Z","balance": 10.5}],"total": 1}