Batch operations

Content

Resource URL

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

Description

Apply batch operations to a set of events.

The parameters required are specific to the type of operation.

What will be affected?

The operation will be applied to the events with given IDs. The amount of IDs is limited to 1000 per call.

ids: [1, 2, 3]

This will apply the operation to events with ID 1, 2 and 3.

Batch operations

The following operations are supported:

  • duplicate: Duplicate events

  • publish: Publish a selection of events;

  • redraft: Redraft a selection of events;

  • close: Close a selection of events;

  • reopen: Re-open a selection of events;

  • delete: Deletes the selection of events.

  • update: Update a specific field for the selection of events. See BatchEventParameters for more info.

Example

Request

 1use Ticketmatic\Endpoints\Events;
 2
 3Events::batch($client, array(
 4    "ids" => array(
 5        1,
 6        34,
 7        29,
 8    ),
 9    "operation" => "duplicate",
10    "parameters" => array(
11    ),
12));

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.Batch(client, &ticketmatic.BatchEventOperation{
 7    Ids: []int64{
 8        1,
 9        34,
10        29,
11    },
12    Operation: "duplicate",
13    Parameters: &ticketmatic.BatchEventParameters{
14    },
15})

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}/events/batch HTTP/1.1
 2Content-Type: application/json
 3
 4{
 5    "ids": [ 1, 34, 29 ],
 6    "operation": "duplicate",
 7    "parameters": {
 8
 9    }
10}

Response

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

Request body fields

FieldDescription
ids
int[]

Restrict operation to supplied IDs, if these ids are not specified all events are updated.

Example value:[ 1, 34, 29 ]
operation
string 
(required)

Operation to perform, possible values are: duplicate , publish, delete, close, update, redraft, reopen

Example value:"duplicate"
parameters

Operation-specific parameters

        </td>
    </tr>
</tbody>

Type reference: BatchEventOperation