curl --request POST \
--url https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"row_label": "12",
"seat_label": "7",
"x_coordinate": 0,
"y_coordinate": 0,
"seat_type_id": 123
}
]
'import requests
url = "https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats"
payload = [
{
"row_label": "12",
"seat_label": "7",
"x_coordinate": 0,
"y_coordinate": 0,
"seat_type_id": 123
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
row_label: '12',
seat_label: '7',
x_coordinate: 0,
y_coordinate: 0,
seat_type_id: 123
}
])
};
fetch('https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'row_label' => '12',
'seat_label' => '7',
'x_coordinate' => 0,
'y_coordinate' => 0,
'seat_type_id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats"
payload := strings.NewReader("[\n {\n \"row_label\": \"12\",\n \"seat_label\": \"7\",\n \"x_coordinate\": 0,\n \"y_coordinate\": 0,\n \"seat_type_id\": 123\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"row_label\": \"12\",\n \"seat_label\": \"7\",\n \"x_coordinate\": 0,\n \"y_coordinate\": 0,\n \"seat_type_id\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"row_label\": \"12\",\n \"seat_label\": \"7\",\n \"x_coordinate\": 0,\n \"y_coordinate\": 0,\n \"seat_type_id\": 123\n }\n]"
response = http.request(request)
puts response.read_body[
{
"seat_id": 150,
"row_label": "A",
"seat_label": "1",
"x_coordinate": 10.5,
"y_coordinate": 20,
"seat_type_id": 1,
"hall_id": 1
},
{
"seat_id": 151,
"row_label": "A",
"seat_label": "2",
"x_coordinate": 25.5,
"y_coordinate": 20,
"seat_type_id": 1,
"hall_id": 1
}
]{
"message": "Validation failed",
"errors": {
"seats[1].row_label": "The row_label field is required.",
"seats[2].seat_type_id": "A valid seat_type_id is required."
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Mass creation of seats in hall
Creates multiple new seats in a specific hall in a single transaction.
The request body should be an array of seat objects to create. The server will process them in a single batch.
This is a protected endpoint. Access is restricted to users with admin or manager roles.
curl --request POST \
--url https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
[
{
"row_label": "12",
"seat_label": "7",
"x_coordinate": 0,
"y_coordinate": 0,
"seat_type_id": 123
}
]
'import requests
url = "https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats"
payload = [
{
"row_label": "12",
"seat_label": "7",
"x_coordinate": 0,
"y_coordinate": 0,
"seat_type_id": 123
}
]
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
row_label: '12',
seat_label: '7',
x_coordinate: 0,
y_coordinate: 0,
seat_type_id: 123
}
])
};
fetch('https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
[
'row_label' => '12',
'seat_label' => '7',
'x_coordinate' => 0,
'y_coordinate' => 0,
'seat_type_id' => 123
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats"
payload := strings.NewReader("[\n {\n \"row_label\": \"12\",\n \"seat_label\": \"7\",\n \"x_coordinate\": 0,\n \"y_coordinate\": 0,\n \"seat_type_id\": 123\n }\n]")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("[\n {\n \"row_label\": \"12\",\n \"seat_label\": \"7\",\n \"x_coordinate\": 0,\n \"y_coordinate\": 0,\n \"seat_type_id\": 123\n }\n]")
.asString();require 'uri'
require 'net/http'
url = URI("https://tandem.hlofiys.xyz/api/halls/{hall_id}/seats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "[\n {\n \"row_label\": \"12\",\n \"seat_label\": \"7\",\n \"x_coordinate\": 0,\n \"y_coordinate\": 0,\n \"seat_type_id\": 123\n }\n]"
response = http.request(request)
puts response.read_body[
{
"seat_id": 150,
"row_label": "A",
"seat_label": "1",
"x_coordinate": 10.5,
"y_coordinate": 20,
"seat_type_id": 1,
"hall_id": 1
},
{
"seat_id": 151,
"row_label": "A",
"seat_label": "2",
"x_coordinate": 25.5,
"y_coordinate": 20,
"seat_type_id": 1,
"hall_id": 1
}
]{
"message": "Validation failed",
"errors": {
"seats[1].row_label": "The row_label field is required.",
"seats[2].seat_type_id": "A valid seat_type_id is required."
}
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Row label (e.g. '1', 'A', 'Parterre')
"12"
Place label in a row (for example, '5', '10', 'VIP 1')
"7"
X coordinate to display on the diagram
Y coordinate to display on the diagram
Unique seat type ID
Response
Seat have been successfully created. An array of created seat objects with their new IDs is returned
Unique seat ID
Row label (e.g. '1', 'A', 'Parterre')
"12"
Place label in a row (for example, '5', '10', 'VIP 1')
"7"
X coordinate to display on the diagram
Y coordinate to display on the diagram
Unique seat type ID
Unique hall ID