Skip to main content

Get the objects for a hold token

There is no endpoint to retrieve the selected objects for a given hold token.
That's very intentional: not only is it unnecessary, it's also not technically possible to use that information in a reliable way.

Why you can't get the objects for a hold token

If you’ve landed on this documentation page, you're looking for a way to get the selected seats for a given hold token. Chances are that's because you want to "validate everything is in place" before proceeding to the booking call, the underlying assumption being that, once you validated that the selected seats are held with the hold token, you can be sure that the booking call will succeed. However, that's technically incorrect.

The reason is this: suppose you would be able to do a "validate" call, and a separate booking call afterwards, if the validation succeeded. That would be 2 separate API calls. In between those calls, there's time, and during that time, the seat status might have changed. For instance, if the hold token expires, the seat becomes free again.

What to do instead

Instead of trying to validate before booking, you should get the selected seats from the client, and pass the hold token when booking later on. Seats.io will then do the verification, and return 400 bad request if the seats were not held with the hold token you passed in.

It's critical that you take into account the unavoidable possibility that a booking call fails. The best way is to use one of the serverside SDKs we provide, they all throw exceptions if an API call failed.

Finally, it's useful to mention that you should only charge the user for the ticket AFTER the booking call succeeded. That way, you can be sure that the user is only charged if the booking call succeeded. Please refer to this article for more information.

Summary

  1. Don't try to "validate before booking"
  2. Instead, get the selected seats from the client, and pass the hold token when booking later on.
  3. first book the seats in seats.io, and only charge the customer if the booking call succeeded.
  4. Make sure you take into account the possibility that a booking call fails. Using one of the serverside SDKs is the single best way to do so.