Create a new event
Content
Resource URL
https://apps.ticketmatic.com/api/1/{accountname}/events
Examples
Creating a draft event
A draft event can be created by supplying just it’s name and dates.
You’ll need to add contingents and pricing configuration later on to make this event usable.
Request
1use Ticketmatic\Endpoints\Events;
2
3$result = Events::create($client, array(
4 "name" => "Marco Bailey",
5 "endts" => "2016-09-26 22:00:00",
6 "startts" => "2016-09-26 20:00:00",
7));
Response
1object(\Ticketmatic\Model\Event) (6) {
2 ["id"]=>
3 int(0)
4 ["name"]=>
5 string(12) "Marco Bailey"
6 ["code"]=>
7 string(12) "314099548201"
8 ["currentstatus"]=>
9 int(0)
10 ["createdts"]=>
11 object(\DateTime) (3) {
12 ["date"]=>
13 string(26) "2016-08-04 10:45:03.645922.000000"
14 ["timezone_type"]=>
15 int(3)
16 ["timezone"]=>
17 string(3) "UTC"
18 }
19 ["lastupdatets"]=>
20 object(\DateTime) (3) {
21 ["date"]=>
22 string(26) "2016-08-04 10:45:03.645922.000000"
23 ["timezone_type"]=>
24 int(3)
25 ["timezone"]=>
26 string(3) "UTC"
27 }
28}
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/events"
4)
5
6result, err := events.Create(client, &ticketmatic.Event{
7 Name: "Marco Bailey",
8 Endts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-09-26 22:00:00")),
9 Startts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-09-26 20:00:00")),
10})
Response
1result := &ticketmatic.Event{
2 Id: 56718984,
3 Name: "Marco Bailey",
4 Code: "314099548201",
5 Currentstatus: 19001,
6 Createdts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-08-04 10:45:03.645922")),
7 Lastupdatets: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-08-04 10:45:03.645922")),
8}
Request
1POST /api/1/{accountname}/events HTTP/1.1
2Content-Type: application/json
3
4{
5 "name": "Marco Bailey",
6 "endts": "2016-09-26 22:00:00",
7 "startts": "2016-09-26 20:00:00"
8}
Response
1HTTP/1.1 200 OK
2Content-Type: application/json
3
4{
5 "id": 56718984,
6 "name": "Marco Bailey",
7 "code": "314099548201",
8 "currentstatus": 19001,
9 "createdts": "2016-08-04 10:45:03.645922",
10 "lastupdatets": "2016-08-04 10:45:03.645922"
11}
Creating an unseated event
Unseated events contain one or more contingents of tickets.
You only need to specify the amount of tickets, the actual tickets will be generated automatically.
Request
1use Ticketmatic\Endpoints\Events;
2
3$result = Events::create($client, array(
4 "name" => "Marco Bailey",
5 "contingents" => array(
6 array(
7 "name" => "Tickets",
8 "amount" => 100,
9 ),
10 ),
11 "endts" => "2016-09-26 22:00:00",
12 "startts" => "2016-09-26 20:00:00",
13));
Response
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/events"
4)
5
6result, err := events.Create(client, &ticketmatic.Event{
7 Name: "Marco Bailey",
8 Contingents: []*ticketmatic.EventContingent{
9 &ticketmatic.EventContingent{
10 Name: "Tickets",
11 Amount: 100,
12 },
13 },
14 Endts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-09-26 22:00:00")),
15 Startts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-09-26 20:00:00")),
16})
Response
Request
1POST /api/1/{accountname}/events HTTP/1.1
2Content-Type: application/json
3
4{
5 "name": "Marco Bailey",
6 "contingents": [
7 {
8 "name": "Tickets",
9 "amount": 100
10 }
11 ],
12 "endts": "2016-09-26 22:00:00",
13 "startts": "2016-09-26 20:00:00"
14}
Response
Creating a seated event
Send the seating plan ID to create a seated event.
Request
1use Ticketmatic\Endpoints\Events;
2
3$result = Events::create($client, array(
4 "name" => "Marco Bailey",
5 "endts" => "2016-09-26 22:00:00",
6 "seatingplanid" => 10023,
7 "startts" => "2016-09-26 20:00:00",
8));
Response
Request
1import (
2 "github.com/ticketmatic/tm-go/ticketmatic"
3 "github.com/ticketmatic/tm-go/ticketmatic/events"
4)
5
6result, err := events.Create(client, &ticketmatic.Event{
7 Name: "Marco Bailey",
8 Endts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-09-26 22:00:00")),
9 Seatingplanid: 10023,
10 Startts: ticketmatic.NewTime(ticketmatic.MustParseTime("2016-09-26 20:00:00")),
11})
Response
Request
1POST /api/1/{accountname}/events HTTP/1.1
2Content-Type: application/json
3
4{
5 "name": "Marco Bailey",
6 "endts": "2016-09-26 22:00:00",
7 "seatingplanid": 10023,
8 "startts": "2016-09-26 20:00:00"
9}
Response
Request body fields
Field | Description |
---|---|
name
mlstring
(required) |
Event name Example value:"Bonobo Live"
|
audiopreviewurl
string
|
The audio preview url for the event Example value:"https://s3-eu-west-1.amazonaws.com/filestore-ticketmatic-com/test/9876/events/1234/image.jpg"
|
contingents
|
Information about the contingents in the Event that are not in the seatingplan Example value:[ { "id": 98, "name": "Tickets", "amount": 100, "eventid": 777701, "eventspecificprices": null, "locks": [], "pricelistid": 6, "withimportedbarcodes": false } ]
|
currentstatus
int
|
Event status The available values for this field can be found on the Event page. Example value:19001
|
description
|
Description of the event, visible for ticket buyers Example value:"Panda Dub, leading man of the french dub scene returns with a new show: Circle Live!"
|
endts
timestamp
(required) |
Event end time Example value:"2014-09-26 15:24:36"
|
externalcode
string
|
External event code. This field is typically set when importing data from other systems. Example value:"56975647832"
|
info
|
Practical info for the event, visible for ticket buyers Example value:"Lockers available in the basement."
|
layout
|
Layout parameters for the event Example value:{ "color": "#112233", "maxImage": true }
|
locationid
int
|
Event location ID See event locations for more information. Example value:125
|
maxnbrofticketsperbasket
int
|
Maximum number of tickets for this event that can be added to a basket Example value:5
|
optinsetid
int
|
Opt-in set id Example value:125
|
previews
|
Preview urls for the event. Example value:[ { "type": 30002, "url": "https://www.youtube.com/watch?v=RIGgn1s3AvI" }, { "type": 30002, "url": "https://www.youtube.com/watch?v=6VrqR_GfvzE" }, { "type": 30003, "url": "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/356544932&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" } ]
|
productionid
int
|
Production ID Example value:1256975647
|
queuetoken
int
|
Queue ID Example value:421
|
revenuesplitid
int
|
DEPRECATED Example value:125
|
saleendts
timestamp
|
Time of end of sales. Used for all sales channels for which no specific sales period has been defined. Example value:"2014-09-26 15:24:36"
|
saleschannels
|
Per-sales channel information about when this event is for sale. Example value:[ { "eventid": 123, "haswaitinglist": false, "isactive": true, "saleendts": "2014-09-26 15:24:36", "saleschannelid": 1, "salestartts": null } ]
|
salestartts
timestamp
|
Time of start of sales. Used for all sales channels for which no specific sales period has been defined. Example value:"2014-09-26 15:24:36"
|
salestatusmessagesid
int
|
Salestatus messages id Example value:125
|
schedule
|
Schedule for the event, visible for ticket buyers Example value:"20:00 support act
21:00 show
22:30 end"
|
seatallowsingle
bool
|
Allow or disallow leaving single seats on their own.
|
Type reference: Event
Result fields
Field | Description |
---|---|
id
int
|
Event ID Example value:1269434
|
name
|
Event name Example value:"Bonobo Live"
|
audiopreviewurl
string
|
The audio preview url for the event Example value:"https://s3-eu-west-1.amazonaws.com/filestore-ticketmatic-com/test/9876/events/1234/image.jpg"
|
availability
|
Information on the availability of tickets per contingent. Read-only. Example value:[ { "complimentary": 0, "free": 815, "locked_hard": 10, "locked_soft": 15, "reserved": 0, "sold_paid": 0, "sold_unpaid": 0, "tickettypeid": 89, "total": 840, "lastupdatets": "2015-05-29 09:21:10.38252" } ]
|
code
string
|
Event code. Used as a unique identifier in web sales. Example value:"864056970700"
|
contingents
|
Information about the contingents in the Event that are not in the seatingplan Example value:[ { "id": 98, "name": "Tickets", "amount": 100, "eventid": 777701, "eventspecificprices": null, "locks": [], "pricelistid": 6, "withimportedbarcodes": false } ]
|
currentstatus
int
|
Event status The available values for this field can be found on the Event page. Example value:19001
|
description
|
Description of the event, visible for ticket buyers Example value:"Panda Dub, leading man of the french dub scene returns with a new show: Circle Live!"
|
endts
timestamp
|
Event end time Example value:"2014-09-26 15:24:36"
|
externalcode
string
|
External event code. This field is typically set when importing data from other systems. Example value:"56975647832"
|
image
string
|
The image url for the event display image Example value:"https://s3-eu-west-1.amazonaws.com/filestore-ticketmatic-com/test/9876/events/1234/image.jpg"
|
info
|
Practical info for the event, visible for ticket buyers Example value:"Lockers available in the basement."
|
layout
|
Layout parameters for the event Example value:{ "color": "#112233", "maxImage": true }
|
locationid
int
|
Event location ID See event locations for more information. Example value:125
|
locationname
string
|
Event location name Automatically derived using "Concert hall"
|
maxnbrofticketsperbasket
int
|
Maximum number of tickets for this event that can be added to a basket Example value:5
|
optinsetid
int
|
Opt-in set id Example value:125
|
previews
|
Preview urls for the event. Example value:[ { "type": 30002, "url": "https://www.youtube.com/watch?v=RIGgn1s3AvI" }, { "type": 30002, "url": "https://www.youtube.com/watch?v=6VrqR_GfvzE" }, { "type": 30003, "url": "https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/356544932&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true&visual=true" } ]
|
prices
|
Information on the available prices for the event Example value:{ "contingents": [ { "contingentid": 1, "pricetypes": [ { "pricetypeid": 2, "saleschannels": [ { "costs": [ { "cost": 5.000000, "costid": 0 } ], "price": 30.500000, "saleschannelid": 3, "servicecharge": 1.500000, "tickettypepriceid": 4 } ] } ] } ] }
|
productionid
int
|
Production ID Example value:1256975647
|
publishedts
timestamp
|
Event publish time Example value:"2014-09-26 15:24:36"
|
queuetoken
int
|
Queue ID Example value:421
|
revenuesplitid
int
|
DEPRECATED Example value:125
|
saleendts
timestamp
|
Time of end of sales. Used for all sales channels for which no specific sales period has been defined. Example value:"2014-09-26 15:24:36"
|
saleschannels
|
Per-sales channel information about when this event is for sale. Example value:[ { "eventid": 123, "haswaitinglist": false, "isactive": true, "saleendts": "2014-09-26 15:24:36", "saleschannelid": 1, "salestartts": null } ]
|
salestartts
timestamp
|
Time of start of sales. Used for all sales channels for which no specific sales period has been defined. Example value:"2014-09-26 15:24:36"
|
salestatusmessagesid
int
|
Salestatus messages id Example value:125
|
schedule
|
Schedule for the event, visible for ticket buyers Example value:"20:00 support act
21:00 show
22:30 end"
|
seatallowsingle
bool
|
Allow or disallow leaving single seats on their own. |
seated_chartkey
string
|
|
seated_contingents
|
Seated contingents Example value:[ { "id": 98, "name": "Tickets", "amount": 100, "eventid": 777701, "eventspecificprices": null, "locks": [], "pricelistid": 6, "withimportedbarcodes": false } ]
|
seatingplancontingents
|
Information about the contingents defined in the seatingplan. Read-only. Example value:[ { "id": 99, "name": "Name A", "amount": 50, "eventid": 777702, "seatrankid": 1 }, { "id": 100, "name": "Name B", "amount": 50, "eventid": 777702, "seatrankid": 2 } ]
|
seatingplaneventspecificprices
|
Event specific prices in addition to the prices defined in the field { "prices": [ { "availabilities": [ true ], "position": 3, "prices": [ 25.000000 ], "pricetypeid": 1, "saleschannels": [ 1, 2 ] }, { "availabilities": [ true ], "conditions": [ { "type": "promocode", "value": "UGENT2013" } ], "position": 7, "prices": [ 30.000000 ], "pricetypeid": 2, "saleschannels": [ 1, 2 ] } ], "seatrankids": null }
|
seatingplanid
int
|
Seating plan ID Only set for events with fixed seats. Example value:125
|
seatingplanpricelistid
int
|
Price list ID for fixed seats. Only set for events with fixed seats. See price lists for more information. Example value:125
|
seatselection
bool
|
Enable or disable seat selection for customers. |
segmentationtags
string[]
|
Segmentation tags Example value:[ "tag1", "tag2" ]
|
servicemailids
int[]
|
servicemailids Example value:[ 1, 2 ]
|
shortdescription
|
Short description of the event, visible for ticket buyers Example value:"Panda Dub, leading man of the french dub scene returns with a new show: Circle Live!"
|
socialdistance
int
|
Social distance type. Determines if social distance must be practiced. Example value:50001
|
startts
timestamp
|
Event start time Example value:"2014-09-26 15:24:36"
|
subtitle
|
Event subtitle Example value:"With live band"
|
subtitle2
|
Event subtitle (2) Example value:"Exclusive concert"
|
tags
string[]
|
Event tags Example value:[ "event tag1", "event tag2" ]
|
ticketfeeid
int
|
Ticket fee ID Determines which ticket fee rules are used for this event. See ticket fees for more information. Example value:125
|
ticketinfoid
int
|
Ticketinfo id Example value:125
|
ticketlayoutid
int
|
Ticket layout ID See ticket layouts for more information. Example value:125
|
totalmaxtickets
int
|
Determines the total maximum amount of tickets that can be sold for event. Example value:1000
|
translations
map<string, string>
|
Translation of event fields Example value:{ "nameen": "English name", "namefr": "Nom francais" }
|
upsellid
int
|
Upsell id Example value:125
|
waitinglisttype
int
|
The type of the waiting list the event uses Example value:29001
|
webremark
|
Small description that will be shown on the sales pages of this event Example value:"Age will be checked at the entrance"
|
createdts
timestamp
|
Created timestamp Example value:"2014-09-26 15:24:36"
|
lastupdatets
timestamp
|
Last updated timestamp Example value:"2014-09-26 15:24:36"
|
Type reference: Event