Create multiple events
Use this API call to create multiple events at once for a chart. The maximum number of events that can be created with a single API call is 100.
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
POST https://api-{region}.seatsio.net/events/actions/create-multiple
$params = [
CreateEventParams::create()
->setKey("event34")
->setTableBookingConfig(TableBookingConfig::allByTable()),
CreateEventParams::create()
->setKey("event35")
->setTableBookingConfig(TableBookingConfig::allBySeat())
];
$events = $seatsioClient->events->createMultiple("4250fffc-e41f-c7cb-986a-2c5e728b8c28", $params);
var createEventParams = new[] {
new CreateEventParams().WithKey("event34").WithTableBookingConfig(TableBookingConfig.AllByTable()),
new CreateEventParams().WithKey("event35").WithTableBookingConfig(TableBookingConfig.AllBySeat())
};
await Client.Events.CreateAsync("4250fffc-e41f-c7cb-986a-2c5e728b8c28", createEventParams);
List<CreateEventParams> events = new ArrayList<>();
events.add(new CreateEventParams().withKey("event34").withTableBookingConfig(TableBookingConfig.allByTable()));
events.add(new CreateEventParams().withKey("event35").withTableBookingConfig(TableBookingConfig.allBySeat()));
client.events.create("4250fffc-e41f-c7cb-986a-2c5e728b8c28", events);
eventProps = [
EventProperties(event_key="event34", table_booking_config=TableBookingConfig.all_by_table()),
EventProperties(event_key="event35", table_booking_config=TableBookingConfig.all_by_seat())
]
events = client.events.create_multiple("4250fffc-e41f-c7cb-986a-2c5e728b8c28", eventProps);
params = [
{ event_key: 'event34', table_booking_config: Seatsio::TableBookingConfig::all_by_table() },
{ event_key: 'event35', table_booking_config: Seatsio::TableBookingConfig::all_by_seat() }
]
client.events.create_multiple chart_key: '4250fffc-e41f-c7cb-986a-2c5e728b8c28', event_creation_params: params
const events = await client.events.createMultiple('4250fffc-e41f-c7cb-986a-2c5e728b8c28', [
Events.createEventParams(null, TableBookingConfig.allByTable()),
Events.createEventParams('aSpecificEventKey', TableBookingConfig.allBySeat())
])
events, err := client.Events.CreateMultiple(
"chartKey",
events.CreateMultipleEventParams{
EventParams: &events.EventParams{
TableBookingConfig: events.TableBookingSupport.AllByTables(),
},
},
events.CreateMultipleEventParams{
EventParams: &events.EventParams{
EventKey: "aSpecificEventKey",
TableBookingConfig: events.TableBookingSupport.AllBySeat(),
},
},
)
Request
{
"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28",
"events": [
{
"eventKey": "event34",
"tableBookingConfig": { "mode": "ALL_BY_TABLE" }
},
{
"eventKey": "event35",
"tableBookingConfig": { "mode": "ALL_BY_SEAT" },
"forSaleConfig": {
"forSale": false,
"objects": ["section1", "section2"],
"areaPlaces": {"GA1": 3},
"categories": ["eventCategory1", "eventCategory2"]
}
}
]
}
The docs for the call to create a single event explain these request parameters.
Example request
curl https://api-{region}.seatsio.net/events/actions/create-multiple \
-u aSecretKey: -X POST -H 'Content-Type: application/json' -d '{"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28", "events": [{}, {}]}'
Response
{
"events": [
{
"id": 169,
"key": "event34",
"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28",
"tableBookingConfig": { "mode": "ALL_BY_TABLE" },
"createdOn": "2017-05-05T10:58:44.715Z"
},
{
"id": 170,
"key": "event35",
"chartKey": "4250fffc-e41f-c7cb-986a-2c5e728b8c28",
"tableBookingConfig": { "mode": "ALL_BY_SEAT" },
"forSaleConfig": {
"forSale": false,
"objects": ["section1", "section2"],
"areaPlaces": {"GA1": 3},
"categories": ["eventCategory1", "eventCategory2"]
},
"createdOn": "2017-05-05T10:58:44.815Z"
}
]
}