Batch update tickets for an event

Content

Resource URL

https://apps.ticketmatic.com/api/1/{accountname}/events/{id}/tickets/batch

Description

Update the contents of one or more custom fields for multiple tickets in one call. Batch update is limited to 5000 tickets per call.

Warning: Do not change the barcode of a ticket that has been delivered: existing printed tickets will no longer work.

Examples

Updating custom fields on tickets

Pass any number of custom fields to update them

Request

1use Ticketmatic\Endpoints\Events;
2
3Events::batchupdatetickets($client, $id, array(
4    array(
5        "id" => 128942,
6        "c_special" => true,
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/events"
 4)
 5
 6err := events.Batchupdatetickets(client, id, []*ticketmatic.EventTicket{
 7    &ticketmatic.EventTicket{
 8        Id: 128942,
 9        CustomFields: map[string]interface{}{
10            "special": true,
11        },
12    },
13})

Response

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

Request

1PUT /api/1/{accountname}/events/{id}/tickets/batch HTTP/1.1
2Content-Type: application/json
3
4[
5    {
6        "id": 128942,
7        "c_special": true
8    }
9]

Response

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

Updating properties on tickets

Request

 1use Ticketmatic\Endpoints\Events;
 2
 3Events::batchupdatetickets($client, $id, array(
 4    array(
 5        "id" => 173948,
 6        "properties" => array(
 7            "key1" => "value1",
 8        ),
 9    ),
10));

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/events"
 4)
 5
 6err := events.Batchupdatetickets(client, id, []*ticketmatic.EventTicket{
 7    &ticketmatic.EventTicket{
 8        Id: 173948,
 9        Properties: map[string]string{
10            "key1": "value1",
11        },
12    },
13})

Response

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

Request

 1PUT /api/1/{accountname}/events/{id}/tickets/batch HTTP/1.1
 2Content-Type: application/json
 3
 4[
 5    {
 6        "id": 173948,
 7        "properties": {
 8            "key1": "value1"
 9        }
10    }
11]

Response

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

Changing the barcode of a ticket

Request

1use Ticketmatic\Endpoints\Events;
2
3Events::batchupdatetickets($client, $id, array(
4    array(
5        "id" => 323843,
6        "barcode" => "5483685635465",
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/events"
 4)
 5
 6err := events.Batchupdatetickets(client, id, []*ticketmatic.EventTicket{
 7    &ticketmatic.EventTicket{
 8        Id: 323843,
 9        Barcode: "5483685635465",
10    },
11})

Response

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

Request

1PUT /api/1/{accountname}/events/{id}/tickets/batch HTTP/1.1
2Content-Type: application/json
3
4[
5    {
6        "id": 323843,
7        "barcode": "5483685635465"
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
id
int 
(required)

Ticket ID

Example value:128942
barcode
string

Ticket barcode

Example value:"418981919819"
properties
map<string, string>

String to string key-value mapping of properties

Example value:{ "key1": "value1", "key2": "value2" }

Type reference: EventTicket[]