Update an event
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
POST https://api-{region}.seatsio.net/events/{eventKey}
// updating event key
$seatsioClient->events->update(
"event34",
UpdateEventParams::create()->setKey("newEventKey")
);
// updating table booking config
$seatsioClient->events->update(
"event34",
UpdateEventParams::create()->setTableBookingConfig(TableBookingConfig::custom(["T1" => "BY_TABLE", "T2" => "BY_SEAT"]))
);
// updating event key
await Client.Events.UpdateAsync("event34", new UpdateEventParams().WithKey"newEventKey"));
// updating table booking config
await Client.Events.UpdateAsync(
"event34",
new UpdateEventParams().WithTableBookingConfig(new Dictionary<string, string> {{"T1", "BY_TABLE"}, {"T2", "BY_SEAT"}})
);
// updating event key
client.events.update("event34", new UpdateEventParams().withKey"newEventKey"));
// updating table booking config
client.events.update(
"event34",
new UpdateEventParams().withTableBookingConfig(TableBookingConfig.custom(Map.of("T1", BY_TABLE, "T2", BY_SEAT)))
);
# updating event key
client.events.update("event34", event_key="newEventKey")
# updating table booking config
client.events.update("event34", table_booking_config=TableBookingConfig.custom({"T1": "BY_TABLE", "T2": "BY_SEAT"}))
# updating event key
client.events.update key: "event34", event_key: "newEventKey"
# updating table booking config
client.events.update key: "event34", table_booking_config: Seatsio::TableBookingConfig::custom({'T1' => 'BY_TABLE', 'T2' => 'BY_SEAT'})
// updating event key
await client.events.update('eventKey', new UpdateEventParams().withKey('newEventKey'))
// updating table booking config
await client.events.update(
'eventKey',
new UpdateEventParams().withTableBookingConfig(
TableBookingConfig.custom({ T1: 'BY_TABLE', T2: 'BY_SEAT' })
)
);
// updating event key
err = client.Events.Update("eventKey", &events.UpdateEventParams{EventParams: &events.EventParams{EventKey: "newEventKey"}})
// updating table booking config
tableBookingConfig := events.TableBookingConfig{Mode: events.TableBookingSupport.Custom(), Tables: map[string]events.TableBookingMode{
"T1": events.BY_TABLE,
"T2": events.BY_SEAT,
}}
err = client.Events.Update("eventKey", &events.UpdateEventParams{EventParams: &events.EventParams{
TableBookingConfig: &tableBookingConfig,
}})
{
"eventKey": "newEventKey",
"name": "new event name",
"date": "2023-03-28",
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": {
"T1": "BY_TABLE",
"T2": "BY_SEAT",
"T3": "BY_TABLE"
}
},
"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
}
],
"isInThePast": false
}
All fields are optional. If, for example, you don't specify an eventKey, the key of the event is not modified.
Have a look at the docs for creating an event to know how tableBookingConfig works.
objectCategories
allows you to override the categorization (as defined on the chart) of specific objects. To remove overriding categorization, pass in an empty array ornull
. Not passing in theobjectCategories
field in the request will leave the objectCategories untouched.categories
allows you to specify extra categories on the event level, not present on the chart. You can use these categories in theobjectCategories
map mentioned above. To remove all event-level categories, pass in an empty array ornull
.isInThePast
- see events in the past.
Example request
curl https://api-{region}.seatsio.net/events/event34 \
-u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"eventKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28"}'
Example response
{
"id": 168,
"key": "newEventKey",
"name": "new event name",
"date": "2023-03-28",
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": {
"T1": "BY_TABLE",
"T2": "BY_SEAT",
"T3": "BY_TABLE"
}
},
"chartKey": "chartKey",
"supportsBestAvailable": true,
"forSaleConfig": {
"forSale": false,
"objects": ["section1"],
"categories": []
},
"channels": [
{
"name": "Channel 1",
"key": "8950dddc-e51f-c7cb-986a-2c5e728b8c21",
"color": "#aaaaaa",
"objects": ["A-1", "A-2"]
}
],
"categories": [
{ "key": 1, "label": "Category 1", "color": "#aaaaaa", "accessible": true},
{ "key": 2, "label": "Category 2", "color": "#bbbbbb", "accessible": false}
],
"isSeason": false,
"isTopLevelSeason": false,
"isPartialSeason": false,
"isEventInSeason": false,
"createdOn": "2017-03-05T10:58:44.715Z",
"updatedOn": "2017-04-05T10:58:44.615Z"
}