Create an event
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
POST https://api-{region}.seatsio.net/events
$seatsioClient->events->create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", CreateEventParams::create()->setKey("event34"));
$seatsioClient->events->create(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
CreateEventParams::create()->setTableBookingConfig(TableBookingConfig::custom(["T1" => "BY_TABLE", "T2" => "BY_SEAT"]))
);
await Client.Events.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28", "event34");
await Client.Events.CreateAsync(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
new CreateEventParams().WithTableBookingConfig(new Dictionary<string, string> {{"T1", "BY_TABLE"}, {"T2", "BY_SEAT"}})
);
client.events.create(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
new CreateEventParams().withKey("event34")
);
client.events.create(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
new CreateEventParams().withTableBookingConfig(TableBookingConfig.custom(Map.of("T1", BY_TABLE, "T2", BY_SEAT)))
);
client.events.create("749b9650-24fb-11e7-93ae-92361f002671", event_key="event34")
client.events.create("749b9650-24fb-11e7-93ae-92361f002671", table_booking_config=TableBookingConfig.custom({"T1": "BY_TABLE", "T2": "BY_SEAT"}))
client.events.create key: "749b9650-24fb-11e7-93ae-92361f002671", event_key: "event34"
client.events.create key: "749b9650-24fb-11e7-93ae-92361f002671", table_booking_config: Seatsio::TableBookingConfig::custom({'T1' => 'BY_TABLE', 'T2' => 'BY_SEAT'})
await client.events.create(
'chartKey',
new CreateEventParams().withKey('eventKey')
)
await client.events.create(
'chartKey',
new CreateEventParams().withTableBookingConfig(
TableBookingConfig.custom({ T1: 'BY_TABLE', T2: 'BY_SEAT' })
)
)
event, err := client.Events.Create(&events.CreateEventParams{ChartKey: "chartKey", EventParams: &events.EventParams{EventKey: "eventKey"}})
event, err := client.Events.Create(&events.CreateEventParams{
ChartKey: "chartKey",
EventParams: &events.EventParams{TableBookingConfig: &events.TableBookingConfig{Tables: map[string]events.TableBookingMode{
"T1": events.BY_TABLE,
"T2": events.BY_SEAT,
}}},
})
Request
{
"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28",
"eventKey": "event34",
"name": "Event 34",
"date": "2022-03-28",
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": {
"T1": "BY_TABLE",
"T2": "BY_SEAT"
}
},
"objectCategories": {
"A-1": "category1",
"A-2": "category2"
},
"categories": [
{
"key": "eventCategory1",
"label": "Event Category 1",
"color": "#AAABBB"
},
{
"key": "eventCategory2",
"label": "Event Category 2",
"color": "#CCCDDD",
"accessible": true
}
],
"channels": [
{
"key": "channel1",
"name": "Channel 1",
"color": "#ED303D",
"index": 1,
"objects": ["A-1", "A-2"]
},
{
"key": "channel2",
"name": "Channel 2",
"color": "#3F3F3F",
"index": 2,
"objects": ["A-3"]
}
],
"forSaleConfig": {
"forSale": false,
"objects": ["section1", "section2"],
"areaPlaces": {"GA1": 3},
"categories": ["eventCategory1", "eventCategory2"]
}
}
chartKey: chart key to which the event will be linked. Required.
eventKey: the key of the event. This is the unique identifier of the event in your own database. Optional, if you don't pass in your own event key, seats.io will generate one.
name: optional. the name of the event is a field you can use to give events a more user-friendly name.
date: optional. The date of the event, must be formatted as yyyy-MM-dd, and be between 2014-01-01 and max 10 years in the future.
tableBookingConfig: optional. When not passed in, the event inherits the table booking settings defined on the chart.
mode
can either be:INHERIT
: table booking settings are inherited from the chart (which is the default behaviour)CUSTOM
: when using this mode, you can pass in atables
object to override the table booking settings of the chart for some tables. Thetables
object has table labels as its keys, andBY_TABLE
orBY_SEAT
as values.ALL_BY_SEAT
: for this event, all tables are bookable by seatALL_BY_TABLE
: for this event, all tables are bookable as a whole
tableBookingModes: deprecated. allows to indicate which tables are bookable by seat, and which by table. It's an object with table names as keys, and table booking modes as values (BY_TABLE or BY_SEAT). If a table is not specified, it defaults to BY_SEAT. Cannot be used in combination with
bookWholeTables
If bothbookWholeTables
andtableBookingModes
are omitted, the table booking modes from the chart are inherited.objectCategories: optional. The mapping of object labels to category keys, if you want to override the categorization as defined on the chart. This objectCategories map can reference the categories specified in the categories property (see below).
categories: optional. A list of event-level categories that are specific to this event and are not present on the chart. Category properties are
key
(string),label
(string),color
(css color string) andaccessible
(optional, boolean).channels: optional. A list of channels.
forSaleConfig: optional. The initial for sale configuration.
Example request
curl https://api-{region}.seatsio.net/events \
-u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28"}'
Example response
{
"id": 169,
"eventKey": "event34",
"name": "My Event",
"date": "2023-03-28",
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": { "T1": "BY_TABLE", "T2": "BY_SEAT" }
},
"categories": [
{ "key": 1, "label": "Category 1", "color": "#aaaaaa", "accessible": true},
{ "key": 2, "label": "Category 2", "color": "#bbbbbb", "accessible": false}
],
"supportsBestAvailable": true,
"forSaleConfig": {
"forSale": false,
"objects": ["section1", "section2"],
"areaPlaces": {"GA1": 3},
"categories": ["eventCategory1", "eventCategory2"]
},
"createdOn": "2017-05-05T10:58:44.715Z"
}