Skip to main content

Change object statuses in batch

Rate limits

This endpoint belongs to the priority lane.

This API call allows changing the status for multiple objects in multiple events, in one transaction: either all status changes get applied (in order), or none.

This endpoint can be useful for a number of use cases:

  • a shopping basket, in which you allow your customers to select tickets for many events. When the customer confirms the purchase.
  • a tool that allows swapping seats (i.e.: releasing some seats, and booking other seats).
  • holding seats again after they got booked. Since you cannot hold already booked seats directly, you need to release them first. With this API endpoint, you can release and hold a single seat in one transaction.
POST https://api-{region}.seatsio.net/events/actions/change-object-status

POST https://api-{region}.seatsio.net/events/actions/change-object-status?expand=objects
Note

All seats (or tables, booths or GA places) passed in to this API will be considered as "used seats" for pricing purposes.

Note

This is different from changing the object status in an event group, in the sense that not all events need to be linked to the same chart. The events can be completely independent.

This API call only supports events that belong to the same workspace. It's not possible to book objects in events across workspaces in a single API call. To do so, you'll need to make multiple calls.

Request

// Booking seats
{
statusChanges: [
{ event: 'event1', objects: ['A-3', 'A-5'], status: 'booked' },
{ event: 'event2', objects: ['B-27'], status: 'booked' }
]
}

// Holding seats
{
statusChanges: [
{
event: 'event1',
objects: ['A-3', 'A-5'],
status: 'reservedByToken',
holdToken: 'wvXbB9MlHt'
},
...
]
}

The request is a JSON object with one property: statusChanges. This is an array of JSON objects, with the following properties:

  • event: the event key
  • objects: an array of object IDs, or an array of object ids and ticket types
  • status: the status you want to assign to an object
  • holdToken (optional): the hold token must be supplied when you hold a seat (status reservedByToken), or want to make sure that the same person that made the hold confirms his booking.
  • keepExtraData (optional): boolean. If set to true, the existing extra data doesn't get cleared
  • orderId (optional): an order id, defined by yourself, to be able to retrieve the objects IDs per order later on.
  • channelKeys (optional): an array of strings, i.e. the channel keys of the channel(s) to which the objects belong. If omitted, and the objects are assigned to a channel, the request will fail with 400 Bad request. Pass in NO_CHANNEL as channel key to allow objects without a channel.
  • ignoreChannels (optional): if true, the status change call succeeds, even if the objects belong to a channel. Useful inside a back office application, in which the user is allowed to book any seat - no matter the channel. Should not be used in combination with channelKeys.
  • allowedPreviousStatuses (optional): an array of strings, i.e. the list of statuses that the objects must be in. The request will fail with a 400 Bad Request if any of the objects have a status not present in the allowedPreviousStatuses list. Cannot be used in combination with rejectedPreviousStatuses.
  • rejectedPreviousStatuses (optional): an array of strings, i.e. the list of statuses that the objects cannot be in. The request will fail with a 400 Bad Request if any of the objects have a status that is present in the rejectedPreviousStatuses list. Cannot be used in combination with allowedPreviousStatuses.
Note

Seats.io differentiates between the technical label and displayed label for a bookable object. Changing the former in an active event can cause problems with existing bookings. Instead change displayed label, which is always safe. To learn more, see understanding labels

Response

Without expand=objects 204 - No Content

With expand=objects 200 - ok

  • results: JSON array that contains detailed information about the objects. results[0] corresponds to the first status change request you passed in, results[1] to the second one etc.
{
results: [
{
"objects": {
"A-3": {
"label": "A-3",
...
},
"A-5": {
"label": "A-5",
...
}
}
},
{
"objects": {
"B-27": {
"label": "B-27",
...
}
}
}
]
}