Deactivate voucher codes

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/settings/vouchers/{id}/deactivatecodes

Description

Deactivates individual voucher codes.

Example

Request

1use Ticketmatic\Endpoints\Settings\Vouchers;
2
3Vouchers::deactivatecodes($client, $id, array(
4    array(
5        "code" => "5518684698498",
6        "expiryts" => "2014-09-26 15:24:36",
7    ),
8));

Response

This operation does not return a response. The status can be checked by looking at the HTTP status code.

Request

 1import (
 2    "github.com/ticketmatic/tm-go/ticketmatic"
 3    "github.com/ticketmatic/tm-go/ticketmatic/settings/vouchers"
 4)
 5
 6err := vouchers.Deactivatecodes(client, id, []*ticketmatic.VoucherCode{
 7    &ticketmatic.VoucherCode{
 8        Code: "5518684698498",
 9        Expiryts: ticketmatic.NewTime(ticketmatic.MustParseTime("2014-09-26 15:24:36")),
10    },
11})

Response

This operation does not return a response. The status can be checked by looking at the HTTP status code.

Request

1POST /api/1/{accountname}/settings/vouchers/{id}/deactivatecodes HTTP/1.1
2Content-Type: application/json
3
4[
5    {
6        "code": "5518684698498",
7        "expiryts": "2014-09-26 15:24:36"
8    }
9]

Response

This operation does not return a response. The status can be checked by looking at the HTTP status code.

Request body fields

This call expects an array of objects in the request body.

FieldDescription
code
string 
(required)

Code to use voucher

Example value:"5518684698498"
expiryts
timestamp

Expiry timestamp for this code

Example value:"2014-09-26 15:24:36"

Type reference: VoucherCode[]