Get a booking's extension options
curl --request GET \
--url https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options', 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://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"can_extend": true,
"current_end": "2023-11-07T05:31:56Z",
"current_end_label": "<string>",
"guest_count": 123,
"options": [
{
"added_minutes": 123,
"new_end": "2023-11-07T05:31:56Z",
"new_end_label": "<string>",
"price_label": "<string>",
"price_pence": 123
}
],
"reason": "<string>",
"reason_label": "<string>"
},
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}Bookings
Get a booking's extension options
Returns the extra time that can be added to the end of the booking, each option with its price for the whole party.
At most three options are offered, in steps of the venue’s time slot length.
When can_extend is false, options is empty, reason holds a reason code and reason_label says why in words that can be shown to the guest.
To take an option, send its added_minutes and new_end to POST /bookings/{id}/extend.
Who can call it: Any staff role with access to the venue. Also the machine key.
GET
/
bookings
/
{id}
/
extend-options
Get a booking's extension options
curl --request GET \
--url https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options', 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://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.poolhouse.dev/api/bookings/{id}/extend-options")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"can_extend": true,
"current_end": "2023-11-07T05:31:56Z",
"current_end_label": "<string>",
"guest_count": 123,
"options": [
{
"added_minutes": 123,
"new_end": "2023-11-07T05:31:56Z",
"new_end_label": "<string>",
"price_label": "<string>",
"price_pence": 123
}
],
"reason": "<string>",
"reason_label": "<string>"
},
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}{
"data": "<unknown>",
"message": "<string>",
"status": "success"
}Authorizations
Response
The options on offer.