Add one or more channels
Adds one or more channels to an event or season, optionally with objects assigned to it.
All seats (or tables, booths or GA places) passed in to this API will be considered as "used seats" for pricing purposes.
Add a single channel
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
POST https://api-{region}.seatsio.net/events/{eventKey}/channels
$this->seatsioClient->events->channels->add(
$event->key, // the event key
"channelKey1", // the channel key
"channel 1", // the channel name
"#FFFF98", // the channel color
1, // the channel index
["A-1", "A-2"] // the channel objects
);
await Client.Events.Channels.AddAsync(
event1.Key, // the event key
"channelKey1", // the channel key
"channel 1", // the channel name
"#FFFF98", // the channel color
1, // the channel index
new[] {"A-1", "A-2"} // the channel objects
);
client.events.channels.add(
event.key, // the event key
"channelKey1", // the channel key
"channel Name 1", // the channel name
"#00FF00", // the channel color
1, // the channel index
Set.of("A-1", "A-2") // the channel objects
);
client.events.channels.add(
event.key, # the event key
'channelKey1', # the channel key
'channel 1', # the channel name
'#FFFF98', # the channel color
1, # the channel index
['A-1', 'A-2'] # the channel objects
)
client.events.channels.add event_key: event.key,
channel_key: "channelKey1",
channel_name: 'channel 1',
channel_color: "#FFFF98",
index: 1,
objects: ['A-1', 'A-2']
await client.events.channels.add(
event.key, // the event key
'channelKey1', // the channel key
'channel 1', // the channel name
'#FFFF98', // the channel color
1, // the channel index
['A-1', 'A-2'] // the channel objects
)
err := client.Channels.Create(event.Key, &events.CreateChannelParams{
Key: "channelKey1",
Name: "channel 1",
Color: "#FFFF98",
Index: 1,
Objects: []string{"A-1", "A-2"},
})
await client.events.channels.add(
event.key, // the event key
'channelKey1', // the channel key
'channel 1', // the channel name
'#FFFF98', // the channel color
1, // the channel index
['A-1', 'A-2'] // the channel objects
)
Example request body
{
"key": "channel1",
"name": "Channel 1",
"color": "#ED303D",
"index": 1,
"objects": ["A-1", "A-2"]
}
The request body should be a JSON object with these properties:
key
needs to be unique and is required (UUIDs are a great choice)name
needs to be unique and is requiredcolor
needs to be a valid css color; color is used in the Event Manager, to be able to distinguish different channels. End users (ticket buyers) will not get to see the channel by color.index
(optional): a number that indicates the ordering of channels; index is used in the Event Manager, to keep ordering of channels consistent.objects
(optional): the full object labels of the objects that need to be assigned to this channel.
The specified objects will be un-assigned from any previous channels.
That means that if seat A-1 is already assigned to channelA, and you create a new channelB with A-1 assigned to it, it will no longer be assigned to channelA and only be assigned to channelB.
Response
204 - No Content
400 - Bad Request if the request was not valid (e.g. if the channel key you're adding already exists)
Add multiple channels
To add more than one channel in one API call, you can use the same endpoint but post an array of channel objects instead.
- Text
- PHP
- C#
- Java
- Python
- Ruby
- Javascript
- Go
POST https://api-{region}.seatsio.net/events/{eventKey}/channels
$this->seatsioClient->events->channels->addMultiple(
$event->key, // the event key
[
(new ChannelCreationParams())->setChannelKey("channelKey1")->setName("channel 1")->setColor("#FFFF98")->setIndex(1)->setObjects(["A-1", "A-2"]),
(new ChannelCreationParams())->setChannelKey("channelKey2")->setName("channel 2")->setColor("#FFFF99")->setIndex(2)->setObjects(["A-3"])
]
);
await Client.Events.Channels.AddAsync(
event.Key, // the event key
new[]
{
new ChannelCreationParams("channelKey1", "channel 1", "#FFFF98", 1, new[] {"A-1", "A-2"}),
new ChannelCreationParams("channelKey2", "channel 2", "#FFFF99", 2, new[] {"A-3"}),
}
);
client.events.channels.add(
event.key,
List.of(
aChannel().withKey("channelKey1").withName("channel 1").withColor("#FFFF98").withIndex(1).withObjects(Set.of("A-1", "A-2")).build(),
aChannel().withKey("channelKey2").withName("channel 2").withColor("#FFFF99").withIndex(2).withObjects(Set.of("A-3")).build()
)
);
client.events.channels.add_multiple(event.key, [
ChannelProperties(key="channelKey1", name="channel 1", color="#FFFF98", index=1, objects=['A-1', 'A-2']),
ChannelProperties(key="channelKey2", name="channel 2", color="#FFFF99", index=2, objects=['A-3'])
])
client.events.channels.add_multiple event_key: event.key,
channel_creation_properties: [
{ key: "channelKey1", name: "channel 1", color: "#FFFF98", index: 1, objects: ['A-1', 'A-2'] },
{ key: "channelKey2", name: "channel 2", color: "#FFFF99", index: 2, objects: ['A-3'] }
]
await client.events.channels.addMultiple(
event.key, // the event key
[
{ key: 'channelKey1', name: 'channel 1', color: '#FFFF98', index: 1, objects: ['A-1', 'A-2'] },
{ key: 'channelKey2', name: 'channel 2', color: '#FFFF99', index: 2, objects: ['A-3'] }
]
)
err := client.Channels.Create(event.Key,
&events.CreateChannelParams{
Key: "channelKey1",
Name: "channel 1",
Color: "#FFFF98",
Index: 1,
Objects: []string{"A-1", "A-2"},
},
&events.CreateChannelParams{
Key: "channelKey2",
Name: "channel 2",
Color: "#FFFF99",
Index: 2,
Objects: []string{"A-3"},
},
)
Example request body
[
{
"key": "channel1",
"name": "Channel 1",
"color": "#ED303D",
"index": 1,
"objects": ["A-1", "A-2"]
},
{
"key": "channel2",
"name": "Channel 2",
"color": "#AABBCC",
"index": 2,
"objects": ["A-3", "A-2"]
},
]
The request body should be a JSON array, containing JSON objects with these properties:
key
needs to be unique and is required (UUIDs are a great choice)name
needs to be unique and is requiredcolor
needs to be a valid css color; color is used in the Event Manager, to be able to distinguish different channels. End users (ticket buyers) will not get to see the channel by color.index
(optional): a number that indicates the ordering of channels; index is used in the Event Manager, to keep ordering of channels consistent.objects
(optional): the full object labels of the objects that need to be assigned to this channel.
The specified objects will be un-assigned from any previous channels.
That means that if seat A-1 is already assigned to channelA, and you create a new channelB with A-1 assigned to it, it will no longer be assigned to channelA and only be assigned to channelB.
Response
204 - No Content
400 - Bad Request if the request was not valid (e.g. the channel keys are not unique)