Toggle the corporate flag on a booking
curl --request PATCH \
--url https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_corporate": true,
"dismiss_hint": true,
"signals": []
}
'import requests
url = "https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate"
payload = {
"is_corporate": True,
"dismiss_hint": True,
"signals": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_corporate: true, dismiss_hint: true, signals: []})
};
fetch('https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate', 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}/corporate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_corporate' => true,
'dismiss_hint' => true,
'signals' => [
]
]),
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}/corporate"
payload := strings.NewReader("{\n \"is_corporate\": true,\n \"dismiss_hint\": true,\n \"signals\": []\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_corporate\": true,\n \"dismiss_hint\": true,\n \"signals\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_corporate\": true,\n \"dismiss_hint\": true,\n \"signals\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"acp_package": {
"guest_count": 123,
"happy_hour": true,
"name": "<string>",
"total_value_pence": 123
},
"administratively_disabled_notifications": [
"<string>"
],
"assigned_to": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"associated_users": [
{
"acquisition_campaign": "<string>",
"acquisition_source": "<string>",
"auth0_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"marketing_opt_in": true,
"phone": "<string>",
"profile_picture_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_type": "primary",
"workos_user_id": "<string>"
}
],
"available_game_type_ids": [
"<string>"
],
"booker_profile": {
"guest_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"booking_end": "2023-11-07T05:31:56Z",
"booking_insights": [
{
"booking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"acquisition_campaign": "<string>",
"acquisition_source": "<string>",
"auth0_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"marketing_opt_in": true,
"phone": "<string>",
"profile_picture_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_type": "primary",
"workos_user_id": "<string>"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insight": "<string>",
"rule": {
"color_code": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 123,
"tag": "<string>"
},
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"booking_start": "2023-11-07T05:31:56Z",
"budget_max": 123,
"budget_min": 123,
"business_date": "<string>",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"changeover_minutes": 123,
"commission_rate": 123,
"communication_method": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"corporate_signals": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"deposit_package": true,
"deposit_percentage": 123,
"enabled_notifications": [
"<string>"
],
"enquiry_area": "pool",
"extension_price_per_guest": 123,
"extensions": [
{
"added_minutes": 123,
"created_at": "2023-11-07T05:31:56Z",
"guest_count": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price_per_guest": 123,
"total_amount": 123
}
],
"feedback_email_sent_at": "2023-11-07T05:31:56Z",
"forecast_value": 123,
"guest_count": 123,
"guest_profiles": [
{
"guest_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"has_happy_hour_preorder": true,
"has_preorder": true,
"highlights_email_sent_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"in_venue_balance": 123,
"is_corporate": true,
"is_event": true,
"kiosk_orders_enabled": true,
"last_interaction_at": "2023-11-07T05:31:56Z",
"minimum_spend": 123,
"moved_from": "2023-11-07T05:31:56Z",
"name": "<string>",
"next_follow_up_at": "2023-11-07T05:31:56Z",
"original_duration_minutes": 123,
"package_amount": 123,
"payment_amount": 123,
"payment_status": "no_payment",
"pool_inclusive_package": true,
"pre_changeover_minutes": 123,
"preorder_package": {
"menu_id": "<string>",
"name": "<string>"
},
"price_per_guest": 123,
"pricing_source": "",
"reminder_email_sent_at": "2023-11-07T05:31:56Z",
"reservation_recycled": true,
"service_status": "late",
"sessions": [
{
"code": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z"
}
],
"small_booking_package_id": "<string>",
"source": "<string>",
"sport_fixture": {
"away_team_name": "<string>",
"competition_name": "<string>",
"event_name": "<string>",
"home_team_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kickoff_at": "2023-11-07T05:31:56Z"
},
"sport_surcharge_pence": 123,
"square_check_ids": [
"<string>"
],
"square_order_ids": [
"<string>"
],
"square_reservation_id": "<string>",
"status": "new",
"table_count": 123,
"table_locked": true,
"tables": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_capacity": 123,
"pos_alias": "<string>",
"public_id": "<string>",
"table_alias": "<string>",
"table_type": "<string>"
}
],
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user": {
"acquisition_campaign": "<string>",
"acquisition_source": "<string>",
"auth0_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"marketing_opt_in": true,
"phone": "<string>",
"profile_picture_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_type": "primary",
"workos_user_id": "<string>"
},
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"venue_booking_platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"venue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123
},
"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
Toggle the corporate flag on a booking
Sets bookings.is_corporate. The only write path for the flag after creation; records a booking activity.
Who can call it: Manager, Sales, Host, Venue Admin, Brand Admin or Organization Admin with access to the venue.
PATCH
/
bookings
/
{id}
/
corporate
Toggle the corporate flag on a booking
curl --request PATCH \
--url https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"is_corporate": true,
"dismiss_hint": true,
"signals": []
}
'import requests
url = "https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate"
payload = {
"is_corporate": True,
"dismiss_hint": True,
"signals": []
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({is_corporate: true, dismiss_hint: true, signals: []})
};
fetch('https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate', 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}/corporate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'is_corporate' => true,
'dismiss_hint' => true,
'signals' => [
]
]),
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}/corporate"
payload := strings.NewReader("{\n \"is_corporate\": true,\n \"dismiss_hint\": true,\n \"signals\": []\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"is_corporate\": true,\n \"dismiss_hint\": true,\n \"signals\": []\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.preprod.poolhouse.dev/api/bookings/{id}/corporate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"is_corporate\": true,\n \"dismiss_hint\": true,\n \"signals\": []\n}"
response = http.request(request)
puts response.read_body{
"data": {
"acp_package": {
"guest_count": 123,
"happy_hour": true,
"name": "<string>",
"total_value_pence": 123
},
"administratively_disabled_notifications": [
"<string>"
],
"assigned_to": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"associated_users": [
{
"acquisition_campaign": "<string>",
"acquisition_source": "<string>",
"auth0_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"marketing_opt_in": true,
"phone": "<string>",
"profile_picture_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_type": "primary",
"workos_user_id": "<string>"
}
],
"available_game_type_ids": [
"<string>"
],
"booker_profile": {
"guest_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
},
"booking_end": "2023-11-07T05:31:56Z",
"booking_insights": [
{
"booking_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"acquisition_campaign": "<string>",
"acquisition_source": "<string>",
"auth0_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"marketing_opt_in": true,
"phone": "<string>",
"profile_picture_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_type": "primary",
"workos_user_id": "<string>"
},
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"insight": "<string>",
"rule": {
"color_code": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"priority": 123,
"tag": "<string>"
},
"status": "pending",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"booking_start": "2023-11-07T05:31:56Z",
"budget_max": 123,
"budget_min": 123,
"business_date": "<string>",
"cancellation_reason": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"changeover_minutes": 123,
"commission_rate": 123,
"communication_method": "<string>",
"confirmed_at": "2023-11-07T05:31:56Z",
"corporate_signals": [
"<string>"
],
"created_at": "2023-11-07T05:31:56Z",
"deposit_package": true,
"deposit_percentage": 123,
"enabled_notifications": [
"<string>"
],
"enquiry_area": "pool",
"extension_price_per_guest": 123,
"extensions": [
{
"added_minutes": 123,
"created_at": "2023-11-07T05:31:56Z",
"guest_count": 123,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"price_per_guest": 123,
"total_amount": 123
}
],
"feedback_email_sent_at": "2023-11-07T05:31:56Z",
"forecast_value": 123,
"guest_count": 123,
"guest_profiles": [
{
"guest_profile_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tags": [
"<string>"
],
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"has_happy_hour_preorder": true,
"has_preorder": true,
"highlights_email_sent_at": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"in_venue_balance": 123,
"is_corporate": true,
"is_event": true,
"kiosk_orders_enabled": true,
"last_interaction_at": "2023-11-07T05:31:56Z",
"minimum_spend": 123,
"moved_from": "2023-11-07T05:31:56Z",
"name": "<string>",
"next_follow_up_at": "2023-11-07T05:31:56Z",
"original_duration_minutes": 123,
"package_amount": 123,
"payment_amount": 123,
"payment_status": "no_payment",
"pool_inclusive_package": true,
"pre_changeover_minutes": 123,
"preorder_package": {
"menu_id": "<string>",
"name": "<string>"
},
"price_per_guest": 123,
"pricing_source": "",
"reminder_email_sent_at": "2023-11-07T05:31:56Z",
"reservation_recycled": true,
"service_status": "late",
"sessions": [
{
"code": "<string>",
"ended_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z"
}
],
"small_booking_package_id": "<string>",
"source": "<string>",
"sport_fixture": {
"away_team_name": "<string>",
"competition_name": "<string>",
"event_name": "<string>",
"home_team_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"kickoff_at": "2023-11-07T05:31:56Z"
},
"sport_surcharge_pence": 123,
"square_check_ids": [
"<string>"
],
"square_order_ids": [
"<string>"
],
"square_reservation_id": "<string>",
"status": "new",
"table_count": 123,
"table_locked": true,
"tables": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_capacity": 123,
"pos_alias": "<string>",
"public_id": "<string>",
"table_alias": "<string>",
"table_type": "<string>"
}
],
"timezone": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user": {
"acquisition_campaign": "<string>",
"acquisition_source": "<string>",
"auth0_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"display_name": "<string>",
"email": "<string>",
"first_name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_name": "<string>",
"marketing_opt_in": true,
"phone": "<string>",
"profile_picture_url": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"user_type": "primary",
"workos_user_id": "<string>"
},
"utm_campaign": "<string>",
"utm_content": "<string>",
"utm_medium": "<string>",
"utm_source": "<string>",
"utm_term": "<string>",
"venue_booking_platform_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"venue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123
},
"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
Corporate request containing the flag
Response
Successfully updated the corporate flag