Preview the price of moving a booking
curl --request POST \
--url https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"booking_end": "2023-11-07T05:31:56Z",
"booking_start": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview"
payload = {
"booking_end": "2023-11-07T05:31:56Z",
"booking_start": "2023-11-07T05:31:56Z"
}
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({booking_end: '2023-11-07T05:31:56Z', booking_start: '2023-11-07T05:31:56Z'})
};
fetch('https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview', 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}/reprice-preview",
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([
'booking_end' => '2023-11-07T05:31:56Z',
'booking_start' => '2023-11-07T05:31:56Z'
]),
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://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview"
payload := strings.NewReader("{\n \"booking_end\": \"2023-11-07T05:31:56Z\",\n \"booking_start\": \"2023-11-07T05:31:56Z\"\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://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"booking_end\": \"2023-11-07T05:31:56Z\",\n \"booking_start\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview")
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 \"booking_end\": \"2023-11-07T05:31:56Z\",\n \"booking_start\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"current_price_per_guest": 123,
"new_price_per_guest": 123,
"will_reprice": true
},
"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
Preview the price of moving a booking
Reports what moving a booking to new times would do to its price. Nothing is changed, so this is safe to call repeatedly. Prices are per guest. Multiply by the guest count for the total.
Who can call it: Manager, Sales, Host, Venue Admin, Brand Admin or Organization Admin with access to the venue.
POST
/
bookings
/
{id}
/
reprice-preview
Preview the price of moving a booking
curl --request POST \
--url https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"booking_end": "2023-11-07T05:31:56Z",
"booking_start": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview"
payload = {
"booking_end": "2023-11-07T05:31:56Z",
"booking_start": "2023-11-07T05:31:56Z"
}
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({booking_end: '2023-11-07T05:31:56Z', booking_start: '2023-11-07T05:31:56Z'})
};
fetch('https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview', 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}/reprice-preview",
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([
'booking_end' => '2023-11-07T05:31:56Z',
'booking_start' => '2023-11-07T05:31:56Z'
]),
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://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview"
payload := strings.NewReader("{\n \"booking_end\": \"2023-11-07T05:31:56Z\",\n \"booking_start\": \"2023-11-07T05:31:56Z\"\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://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"booking_end\": \"2023-11-07T05:31:56Z\",\n \"booking_start\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.poolhouse.dev/api/bookings/{id}/reprice-preview")
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 \"booking_end\": \"2023-11-07T05:31:56Z\",\n \"booking_start\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"current_price_per_guest": 123,
"new_price_per_guest": 123,
"will_reprice": true
},
"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
Body
application/json
The times the booking would move to
Response
Whether the price would change, and the figures.