Skip to main content

Extra data

Rate limits

This endpoint belongs to the priority lane.

Sometimes it's necessary to pass in some custom data when changing the object status. For example, you might need to store who booked a seat, to use in the tooltip of a rendered chart.

A note about privacy

You can choose whether your extraData should be private or public. You can control this through the company settings page.

If you choose for public extraData, then all data you store along with bookings will be made available to the Renderer through callbacks, such as onObjectSelected, objectColor, and others. You should make sure to never store information that can identify individual users (names, emails, etc) in clear text: a tech-savvy user will be able to read your extraData.

However, if you opt for private extraData, you can store whatever you want: extraData will not be made available to the renderer, and so will remain private.

Note that this setting does not impact the Event Manager: in Event Manager, extraData is always made available to callbacks, regardless of the company setting.

/change-object-status, /book, /release and /hold take an optional extraData object for each object ID in the request. extraData must be a JSON object with key value pairs, not a JSON primitive.

// /book, /release, /hold or /change-object-status
{
"objects": [
{ "objectId": "A-5", "extraData": { "userId": "123" }},
{ "objectId": "A-6", "extraData": { "userId": "456" }}
]
}
$objects = [
["objectId" => "A-5", "extraData" => ["userId" => "123"]],
["objectId" => "A-6", "extraData" => ["userId" => "456"]]
];
$seatsioClient->events->book("event1", $objects);

When changing object status, extraData gets cleared. To avoid that, pass in the keepExtraData flag:

// /book, /release, /hold or /change-object-status
{
"objects": [
{ "objectId": "A-5"},
{ "objectId": "A-6"}
],
"keepExtraData": true
}
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

Updating extra data

You can update extra data for objects without changing their status too. Check https://docs.seats.io/docs/api-update-extra-data-for-an-object and https://docs.seats.io/docs/api-update-extra-data-for-multiple-objects for more information.