tm.voucher

A voucher gives right to something, e.g. a free ticket or a reduction.

Fields

FieldDescription
id
int
Unique ID
typeid
int
Type ID
name<langcode>
mlstring
Name of the voucher
description<langcode>
mlstring
Description of the voucher
validity
VoucherValidity
Definition of the validity of this voucher. Depends on the typeid.
paymentmethodid
int
Paymentmethod to use when creating payments for vouchers of type payment. This field is required when a payment voucher is created. The paymentmethod that is referred to should be of a voucher type.
nbrofcodes
int
The number of codes that were created for this voucher.
codeformatid
int

Format used when generating codes for the voucher. Possible values:

  • 27001: 12 digits
  • 27002: 16 digits
  • 27003: 8 alphanumerical characters
  • 27004: 12 alphanumerical characters
  • 27005: 16 alphanumerical characters
  • 27099: Specified from list, not autogenerated
codeprefix
string
If set, the codes that are generated are padded with this prefix. This can be used to ensure that vouchercodes are unique. The prefix can be max 10 characters long.
ordervalidationscript
string
A validation script that is used for vouchers of type order. For each order with a voucher of this type attached, the script will be run to validate the contents
createdts
timestamp
Created timestamp
lastupdatets
timestamp
Last updated timestamp
isarchived
bool
Whether or not this item is archived