POST WebVouchers/CreateVoucher
This call is used to create a web voucher
Request Information
URI Parameters
None.
Body Parameters
CreateVoucherCommand| Name | Type | Description | Additional information |
|---|---|---|---|
| SiteID | integer |
Required |
|
| VoucherExpires | boolean |
True if the voucher expires, vouchers that don't expire have the same solddate and expirydate |
Required |
| ExpiryDate | datetime |
If the voucher expires and the expiry date is left empty then the default voucher expiry date is used (from system settings), otherwise a custom expiry date |
|
| SerialNumber | string |
If left blank then a guid will be auto generated, if inserting custom serial numbers will throw errors if serial number already exists |
|
| Value | decimal number |
Voucher Value e.g. 5.50 -> £5.50 |
Required |
| Notes | string |
Optional Notes |
Request Formats
application/json, text/json
Sample:
{
"SiteID": 1,
"VoucherExpires": true,
"ExpiryDate": "2026-10-10T04:04:17.9707961",
"SerialNumber": "sample string 1",
"Value": 1.0,
"Notes": "sample string 2"
}
application/xml, text/xml
Sample:
System.Xml.XmlDocument
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
WebVoucherDto| Name | Type | Description | Additional information |
|---|---|---|---|
| WebVoucherId | integer |
None. |
|
| SerialNumber | string |
None. |
|
| DateSold | datetime |
None. |
|
| ExpiryDate | datetime |
None. |
|
| Value | decimal number |
None. |
|
| Notes | string |
None. |
Response Formats
application/json, text/json
Sample:
{
"WebVoucherId": 1,
"SerialNumber": "sample string 2",
"DateSold": "2026-10-10T04:04:17.9707961",
"ExpiryDate": "2026-10-10T04:04:17.9707961",
"Value": 5.0,
"Notes": "sample string 6"
}
application/xml, text/xml
Sample:
System.Xml.XmlDocument