Booking software

Temporarily block seats

To temporarily block seats, you must pass certain parameters to the `xml.php` endpoint via a POST call. Here are the required parameters:

- action=blockSeat: Specifies the action (mandatory parameter).

- pos[]: Sequence number of the seat that you get from the request array. This is a mandatory parameter and is passed as an array so that several seats can be blocked with one call.

- class_id: ID of the booking class (mandatory parameter).

- start_line_port_id: ID of the start station (mandatory parameter).

- stop_linie_hafen_id: ID of the destination station, taken from the field "stationen_linie_hafen_id" from the timetable request (mandatory parameter).

- Trip: Number of the journey (mandatory parameter).

- line_id: ID of the line (mandatory parameter).

- token: XML token provided by the provider (mandatory parameter).

- datum_fahrt: Date of the journey as a Unix timestamp, taken from the "datum_aktuell_ts" field from the timetable request (mandatory parameter). Attention: Use the date from the request array; for multi-day lines, the start date of the first station is used.

- tmp_key: Temporary ID with which the reservation can be identified (mandatory parameter).

The call returns FALSE if the entry was not successful, e.g. if the seats have since been blocked elsewhere. If the reservation was successful, TRUE is returned.