A voucher can be used on a ticket to receive additional discount.
code | string [ 4 .. 8 ] characters [A-Z0-9] Voucher code. | ||||||||||
created_at | string <date-time> Date and time of creation. | ||||||||||
customer_id | string or null <uuid> If set, the voucher can only be used on a ticket for this customer. | ||||||||||
object The discount received when voucher is used on ticket. | |||||||||||
| |||||||||||
enabled | boolean The voucher can only be used if enabled. | ||||||||||
label | string [ 0 .. 255 ] characters Voucher label. | ||||||||||
product_id | string or null <uuid> If set, the voucher can only be used on a ticket that has this product. | ||||||||||
updated_at | string or null <date-time> Date and time of last update. | ||||||||||
used_at | string or null <date-time> Date and time on which the voucher was used on a ticket or null if not used. | ||||||||||
valid_until | string <date> Voucher can be used on a ticket up to and including this date. |
{- "code": "WQ4MM3",
- "created_at": "2019-08-24T14:15:22Z",
- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "money",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "updated_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24"
}
Retrieve a list of vouchers.
Successful response.
An error occurred - see status code and problem response for more information.
{- "query": {
- "limit": 25,
- "offset": 0
}, - "result": [
- {
- "code": "WQ4MM3",
- "created_at": "2019-08-24T14:15:22Z",
- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "percentage",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "updated_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24"
}
], - "total": 3255
}
Add a new voucher.
The voucher you wish to add.
customer_id required | string or null <uuid> If set, the voucher can only be used on a ticket for this customer. | ||||||||||
required | object The discount received when voucher is used on ticket. | ||||||||||
| |||||||||||
label required | string [ 0 .. 255 ] characters Voucher label. | ||||||||||
product_id required | string or null <uuid> If set, the voucher can only be used on a ticket that has this product. | ||||||||||
valid_until required | string <date> Voucher can be used on a ticket up to and including this date. |
Created.
code | string [ 4 .. 8 ] characters [A-Z0-9] Voucher code. | ||||||||||
created_at | string <date-time> Date and time of creation. | ||||||||||
customer_id | string or null <uuid> If set, the voucher can only be used on a ticket for this customer. | ||||||||||
object The discount received when voucher is used on ticket. | |||||||||||
| |||||||||||
enabled | boolean The voucher can only be used if enabled. | ||||||||||
label | string [ 0 .. 255 ] characters Voucher label. | ||||||||||
product_id | string or null <uuid> If set, the voucher can only be used on a ticket that has this product. | ||||||||||
updated_at | string or null <date-time> Date and time of last update. | ||||||||||
used_at | string or null <date-time> Date and time on which the voucher was used on a ticket or null if not used. | ||||||||||
valid_until | string <date> Voucher can be used on a ticket up to and including this date. |
An error occurred - see status code and problem response for more information.
{- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "percentage",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "valid_until": "2019-08-24"
}
{- "code": "WQ4MM3",
- "created_at": "2019-08-24T14:15:22Z",
- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "money",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "updated_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24"
}
Retrieves a voucher by its identifier.
Successful response.
code | string [ 4 .. 8 ] characters [A-Z0-9] Voucher code. | ||||||||||
created_at | string <date-time> Date and time of creation. | ||||||||||
customer_id | string or null <uuid> If set, the voucher can only be used on a ticket for this customer. | ||||||||||
object The discount received when voucher is used on ticket. | |||||||||||
| |||||||||||
enabled | boolean The voucher can only be used if enabled. | ||||||||||
label | string [ 0 .. 255 ] characters Voucher label. | ||||||||||
product_id | string or null <uuid> If set, the voucher can only be used on a ticket that has this product. | ||||||||||
updated_at | string or null <date-time> Date and time of last update. | ||||||||||
used_at | string or null <date-time> Date and time on which the voucher was used on a ticket or null if not used. | ||||||||||
valid_until | string <date> Voucher can be used on a ticket up to and including this date. |
An error occurred - see status code and problem response for more information.
{- "code": "WQ4MM3",
- "created_at": "2019-08-24T14:15:22Z",
- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "money",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "updated_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24"
}
Update a voucher by its identifier.
The updated voucher.
customer_id required | string or null <uuid> If set, the voucher can only be used on a ticket for this customer. | ||||||||||
required | object The discount received when voucher is used on ticket. | ||||||||||
| |||||||||||
enabled required | boolean The voucher can only be used if enabled. | ||||||||||
label required | string [ 0 .. 255 ] characters Voucher label. | ||||||||||
product_id required | string or null <uuid> If set, the voucher can only be used on a ticket that has this product. | ||||||||||
valid_until required | string <date> Voucher can be used on a ticket up to and including this date. |
Successful response.
code | string [ 4 .. 8 ] characters [A-Z0-9] Voucher code. | ||||||||||
created_at | string <date-time> Date and time of creation. | ||||||||||
customer_id | string or null <uuid> If set, the voucher can only be used on a ticket for this customer. | ||||||||||
object The discount received when voucher is used on ticket. | |||||||||||
| |||||||||||
enabled | boolean The voucher can only be used if enabled. | ||||||||||
label | string [ 0 .. 255 ] characters Voucher label. | ||||||||||
product_id | string or null <uuid> If set, the voucher can only be used on a ticket that has this product. | ||||||||||
updated_at | string or null <date-time> Date and time of last update. | ||||||||||
used_at | string or null <date-time> Date and time on which the voucher was used on a ticket or null if not used. | ||||||||||
valid_until | string <date> Voucher can be used on a ticket up to and including this date. |
Forbidden.
An error occurred - see status code and problem response for more information.
{- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "percentage",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "valid_until": "2019-08-24"
}
{- "code": "WQ4MM3",
- "created_at": "2019-08-24T14:15:22Z",
- "customer_id": "160c0c4b-9966-4dc1-a916-8407eb10d74e",
- "discount": {
- "type": "money",
- "value": 12.5
}, - "enabled": true,
- "label": "Winter discount voucher",
- "product_id": "0d012afa-f885-4e65-aeca-37e27701e2d1",
- "updated_at": "2019-08-24T14:15:22Z",
- "used_at": "2019-08-24T14:15:22Z",
- "valid_until": "2019-08-24"
}
Remove a voucher by its identifier.
Successfully removed.
Forbidden.
An error occurred - see status code and problem response for more information.
{- "status": 403,
- "type": "about:blank",
- "title": "Forbidden",
- "detail": "You are not authorized to access this resource."
}