Create a season
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
POST https://api-{region}.seatsio.net/seasons
$seatsioClient->seasons->create("4250fffc-e41f-c7cb-986a-2c5e728b8c28"); // chart key
$seatsioClient->seasons->create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", new SeasonCreationParams('aSeasonKey'));
$seatsioClient->seasons->create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", (new SeasonCreationParams())->setEventKeys(['event1', 'event2']));
$seatsioClient->seasons->create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", (new SeasonCreationParams())->setNumberOfEvents(2));
$seatsioClient->seasons->create(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
(new SeasonCreationParams())->setTableBookingConfig(TableBookingConfig::custom(["T1" => "BY_TABLE", "T2" => "BY_SEAT"])))
);
await Client.Seasons.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28"); // chart key
await Client.Seasons.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28", key: "aSeasonKey");
await Client.Seasons.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28", numberOfEvents: 2);
await Client.Seasons.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28", eventKeys: new[] {"event1", "event2"});
await Client.Seasons.CreateAsync(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
tableBookingConfig: TableBookingConfig.Custom(new Dictionary<string, string> {{"T1", "BY_TABLE"}, {"T2", "BY_SEAT"}})
);
client.seasons.create("4250fffc-e41f-c7cb-986a-2c5e728b8c28"); // chart key
client.seasons.create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", new SeasonParams().key("aSeasonKey"));
client.seasons.create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", new SeasonParams().numberOfEvents(2));
client.seasons.create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", new SeasonParams().eventKeys(List.of("event1", "event2")));
client.seasons.create(
"4250fffc-e41f-c7cb-986a-2c5e728b8c28",
new SeasonParams().tableBookingConfig(TableBookingConfig.custom(Map.of("T1", BY_TABLE, "T2", BY_SEAT)))
);
client.seasons.create("749b9650-24fb-11e7-93ae-92361f002671") # chart key
client.seasons.create("749b9650-24fb-11e7-93ae-92361f002671", key="aSeasonKey")
client.seasons.create("749b9650-24fb-11e7-93ae-92361f002671", number_of_events=2)
client.seasons.create("749b9650-24fb-11e7-93ae-92361f002671", event_keys=["event1", "event2"])
client.seasons.create("749b9650-24fb-11e7-93ae-92361f002671", table_booking_config=TableBookingConfig.custom({"T1": "BY_TABLE", "T2": "BY_SEAT"}))
client.seasons.create key: "749b9650-24fb-11e7-93ae-92361f002671" # chart key
client.seasons.create key: "749b9650-24fb-11e7-93ae-92361f002671", key: 'aSeasonKey'
client.seasons.create key: "749b9650-24fb-11e7-93ae-92361f002671", number_of_events: 2
client.seasons.create key: "749b9650-24fb-11e7-93ae-92361f002671", event_keys: ['event1', 'event2']
client.seasons.create key: "749b9650-24fb-11e7-93ae-92361f002671", table_booking_config: Seatsio::TableBookingConfig::custom({'T1' => 'BY_TABLE', 'T2' => 'BY_SEAT'})
await client.seasons.create('749b9650-24fb-11e7-93ae-92361f002671'); // chart key
await client.seasons.create('749b9650-24fb-11e7-93ae-92361f002671', new SeasonParams().key('aSeasonKey'));
await client.seasons.create('749b9650-24fb-11e7-93ae-92361f002671', new SeasonParams().numberOfEvents(2));
await client.seasons.create('749b9650-24fb-11e7-93ae-92361f002671', new SeasonParams().eventKeys(['event1', 'event2']));
await client.seasons.create('749b9650-24fb-11e7-93ae-92361f002671', new SeasonParams().tableBookingConfig(TableBookingConfig.custom({ T1: 'BY_TABLE', T2: 'BY_SEAT' })));
season, err := client.Seasons.CreateSeason("749b9650-24fb-11e7-93ae-92361f002671") // chart key
season, err := client.Seasons.CreateSeasonWithOptions("749b9650-24fb-11e7-93ae-92361f002671", &seasons.CreateSeasonParams{
Key: "aSeasonKey",
})
season, err := client.Seasons.CreateSeasonWithOptions("749b9650-24fb-11e7-93ae-92361f002671", &seasons.CreateSeasonParams{
NumberOfEvents: 2,
})
season, err := client.Seasons.CreateSeasonWithOptions("749b9650-24fb-11e7-93ae-92361f002671", &seasons.CreateSeasonParams{
EventKeys: []string{"event1", "event2"},
})
season, err := client.Seasons.CreateSeasonWithOptions("749b9650-24fb-11e7-93ae-92361f002671", &seasons.CreateSeasonParams{
TableBookingConfig: &events.TableBookingConfig{
Mode: events.CUSTOM,
Tables: map[string]events.TableBookingMode{
"T1": events.BY_TABLE,
"T2": events.BY_SEAT,
},
},
})
Request
// with event keys to create (those events should not yet exist)
{
"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28",
"key": "aSeason",
"eventKeys": ["event1", "event2"],
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": { "T1": "BY_TABLE", "T2": "BY_SEAT" }
},
"forSaleConfig": {
"forSale": false,
"objects": ["section1", "section2"],
"areaPlaces": {"GA1": 3},
"categories": ["eventCategory1", "eventCategory2"]
}
}
// with number of events
{
"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28",
"key": "aSeason",
"numberOfEvents": 2,
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": { "T1": "BY_TABLE", "T2": "BY_SEAT" }
}
}
chartKey: chart key to which the season will be linked. Required.
key: the key of the season. This is the unique identifier of the season in your own database. Optional, if you don't pass in your own season key, seats.io will generate one.
eventKeys: array of event keys for events that belong to the season. Those will be created automatically - the events should net yet exist. Cannot be used in combination with
numberOfEvents
.numberOfEvents: number of events in the season. Those will be created automatically, with random keys. Cannot be used in combination with
eventKeys
.tableBookingConfig: optional. When not passed in, the season 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 season, all tables are bookable by seatALL_BY_TABLE
: for this season, all tables are bookable as a whole
channels: optional list of channels
forSaleConfig: an optional for-sale configuration
Example request
curl https://api-{region}.seatsio.net/seasons \
-u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28"}'
Response
{
"id": 169,
"eventKey": "aSeason",
"tableBookingConfig": {
"mode": "CUSTOM",
"tables": { "T1": "BY_TABLE", "T2": "BY_SEAT" }
},
"supportsBestAvailable": true,
"createdOn": "2017-05-05T10:58:44.715Z",
"events": [
{
"id": 170,
"key": "event1",
...
},
...
],
"partialSeasonKeys": [],
"isSeason": true,
"isTopLevelSeason": true,
"isPartialSeason": false,
"isEventInSeason": false,
"forSaleConfig": {
"forSale": false,
"objects": ["section1", "section2"],
"areaPlaces": {"GA1": 3},
"categories": ["eventCategory1", "eventCategory2"]
}
}