curl --request POST \
--url https://api.plec-it.com/bookings/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"listingId": "10000001",
"price": 200,
"guestCount": 10,
"selectedPackages": [
{
"packageId": "pkg-premium",
"packageName": "Premium tier",
"price": 150
}
]
}
],
"date": "2025-12-04",
"time": "09:00",
"duration": 4,
"startTime": "2025-12-04T09:00:00Z",
"endTime": "2025-12-04T13:00:00Z",
"packageId": "<string>",
"upgradeBookingId": {},
"specialRequests": "<string>"
}
'import requests
url = "https://api.plec-it.com/bookings/create"
payload = {
"items": [
{
"listingId": "10000001",
"price": 200,
"guestCount": 10,
"selectedPackages": [
{
"packageId": "pkg-premium",
"packageName": "Premium tier",
"price": 150
}
]
}
],
"date": "2025-12-04",
"time": "09:00",
"duration": 4,
"startTime": "2025-12-04T09:00:00Z",
"endTime": "2025-12-04T13:00:00Z",
"packageId": "<string>",
"upgradeBookingId": {},
"specialRequests": "<string>"
}
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({
items: [
{
listingId: '10000001',
price: 200,
guestCount: 10,
selectedPackages: [{packageId: 'pkg-premium', packageName: 'Premium tier', price: 150}]
}
],
date: '2025-12-04',
time: '09:00',
duration: 4,
startTime: '2025-12-04T09:00:00Z',
endTime: '2025-12-04T13:00:00Z',
packageId: '<string>',
upgradeBookingId: {},
specialRequests: '<string>'
})
};
fetch('https://api.plec-it.com/bookings/create', 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.plec-it.com/bookings/create",
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([
'items' => [
[
'listingId' => '10000001',
'price' => 200,
'guestCount' => 10,
'selectedPackages' => [
[
'packageId' => 'pkg-premium',
'packageName' => 'Premium tier',
'price' => 150
]
]
]
],
'date' => '2025-12-04',
'time' => '09:00',
'duration' => 4,
'startTime' => '2025-12-04T09:00:00Z',
'endTime' => '2025-12-04T13:00:00Z',
'packageId' => '<string>',
'upgradeBookingId' => [
],
'specialRequests' => '<string>'
]),
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.plec-it.com/bookings/create"
payload := strings.NewReader("{\n \"items\": [\n {\n \"listingId\": \"10000001\",\n \"price\": 200,\n \"guestCount\": 10,\n \"selectedPackages\": [\n {\n \"packageId\": \"pkg-premium\",\n \"packageName\": \"Premium tier\",\n \"price\": 150\n }\n ]\n }\n ],\n \"date\": \"2025-12-04\",\n \"time\": \"09:00\",\n \"duration\": 4,\n \"startTime\": \"2025-12-04T09:00:00Z\",\n \"endTime\": \"2025-12-04T13:00:00Z\",\n \"packageId\": \"<string>\",\n \"upgradeBookingId\": {},\n \"specialRequests\": \"<string>\"\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.plec-it.com/bookings/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"listingId\": \"10000001\",\n \"price\": 200,\n \"guestCount\": 10,\n \"selectedPackages\": [\n {\n \"packageId\": \"pkg-premium\",\n \"packageName\": \"Premium tier\",\n \"price\": 150\n }\n ]\n }\n ],\n \"date\": \"2025-12-04\",\n \"time\": \"09:00\",\n \"duration\": 4,\n \"startTime\": \"2025-12-04T09:00:00Z\",\n \"endTime\": \"2025-12-04T13:00:00Z\",\n \"packageId\": \"<string>\",\n \"upgradeBookingId\": {},\n \"specialRequests\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plec-it.com/bookings/create")
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 \"items\": [\n {\n \"listingId\": \"10000001\",\n \"price\": 200,\n \"guestCount\": 10,\n \"selectedPackages\": [\n {\n \"packageId\": \"pkg-premium\",\n \"packageName\": \"Premium tier\",\n \"price\": 150\n }\n ]\n }\n ],\n \"date\": \"2025-12-04\",\n \"time\": \"09:00\",\n \"duration\": 4,\n \"startTime\": \"2025-12-04T09:00:00Z\",\n \"endTime\": \"2025-12-04T13:00:00Z\",\n \"packageId\": \"<string>\",\n \"upgradeBookingId\": {},\n \"specialRequests\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"mode": "instant_booking",
"bookingId": "550e8400-e29b-41d4-a716-446655440000",
"message": "Your request has been sent to the host.",
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_...",
"paymentIntentClientSecret": "pi_xxx_secret_xxx",
"publishableKey": "pk_test_..."
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}Create booking
Create a new booking request. Returns either approval_required (host must approve), instant checkout URL, or payment sheet credentials.
curl --request POST \
--url https://api.plec-it.com/bookings/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"items": [
{
"listingId": "10000001",
"price": 200,
"guestCount": 10,
"selectedPackages": [
{
"packageId": "pkg-premium",
"packageName": "Premium tier",
"price": 150
}
]
}
],
"date": "2025-12-04",
"time": "09:00",
"duration": 4,
"startTime": "2025-12-04T09:00:00Z",
"endTime": "2025-12-04T13:00:00Z",
"packageId": "<string>",
"upgradeBookingId": {},
"specialRequests": "<string>"
}
'import requests
url = "https://api.plec-it.com/bookings/create"
payload = {
"items": [
{
"listingId": "10000001",
"price": 200,
"guestCount": 10,
"selectedPackages": [
{
"packageId": "pkg-premium",
"packageName": "Premium tier",
"price": 150
}
]
}
],
"date": "2025-12-04",
"time": "09:00",
"duration": 4,
"startTime": "2025-12-04T09:00:00Z",
"endTime": "2025-12-04T13:00:00Z",
"packageId": "<string>",
"upgradeBookingId": {},
"specialRequests": "<string>"
}
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({
items: [
{
listingId: '10000001',
price: 200,
guestCount: 10,
selectedPackages: [{packageId: 'pkg-premium', packageName: 'Premium tier', price: 150}]
}
],
date: '2025-12-04',
time: '09:00',
duration: 4,
startTime: '2025-12-04T09:00:00Z',
endTime: '2025-12-04T13:00:00Z',
packageId: '<string>',
upgradeBookingId: {},
specialRequests: '<string>'
})
};
fetch('https://api.plec-it.com/bookings/create', 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.plec-it.com/bookings/create",
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([
'items' => [
[
'listingId' => '10000001',
'price' => 200,
'guestCount' => 10,
'selectedPackages' => [
[
'packageId' => 'pkg-premium',
'packageName' => 'Premium tier',
'price' => 150
]
]
]
],
'date' => '2025-12-04',
'time' => '09:00',
'duration' => 4,
'startTime' => '2025-12-04T09:00:00Z',
'endTime' => '2025-12-04T13:00:00Z',
'packageId' => '<string>',
'upgradeBookingId' => [
],
'specialRequests' => '<string>'
]),
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.plec-it.com/bookings/create"
payload := strings.NewReader("{\n \"items\": [\n {\n \"listingId\": \"10000001\",\n \"price\": 200,\n \"guestCount\": 10,\n \"selectedPackages\": [\n {\n \"packageId\": \"pkg-premium\",\n \"packageName\": \"Premium tier\",\n \"price\": 150\n }\n ]\n }\n ],\n \"date\": \"2025-12-04\",\n \"time\": \"09:00\",\n \"duration\": 4,\n \"startTime\": \"2025-12-04T09:00:00Z\",\n \"endTime\": \"2025-12-04T13:00:00Z\",\n \"packageId\": \"<string>\",\n \"upgradeBookingId\": {},\n \"specialRequests\": \"<string>\"\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.plec-it.com/bookings/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"items\": [\n {\n \"listingId\": \"10000001\",\n \"price\": 200,\n \"guestCount\": 10,\n \"selectedPackages\": [\n {\n \"packageId\": \"pkg-premium\",\n \"packageName\": \"Premium tier\",\n \"price\": 150\n }\n ]\n }\n ],\n \"date\": \"2025-12-04\",\n \"time\": \"09:00\",\n \"duration\": 4,\n \"startTime\": \"2025-12-04T09:00:00Z\",\n \"endTime\": \"2025-12-04T13:00:00Z\",\n \"packageId\": \"<string>\",\n \"upgradeBookingId\": {},\n \"specialRequests\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.plec-it.com/bookings/create")
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 \"items\": [\n {\n \"listingId\": \"10000001\",\n \"price\": 200,\n \"guestCount\": 10,\n \"selectedPackages\": [\n {\n \"packageId\": \"pkg-premium\",\n \"packageName\": \"Premium tier\",\n \"price\": 150\n }\n ]\n }\n ],\n \"date\": \"2025-12-04\",\n \"time\": \"09:00\",\n \"duration\": 4,\n \"startTime\": \"2025-12-04T09:00:00Z\",\n \"endTime\": \"2025-12-04T13:00:00Z\",\n \"packageId\": \"<string>\",\n \"upgradeBookingId\": {},\n \"specialRequests\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"mode": "instant_booking",
"bookingId": "550e8400-e29b-41d4-a716-446655440000",
"message": "Your request has been sent to the host.",
"checkoutUrl": "https://checkout.stripe.com/c/pay/cs_...",
"paymentIntentClientSecret": "pi_xxx_secret_xxx",
"publishableKey": "pk_test_..."
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}{
"message": "Validation failed",
"code": "BAD_REQUEST",
"details": [
"date must be a valid ISO 8601 date"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
When true, validates and simulates the request but performs no writes. Recommended when calling from docs.
true Body
Booking line items (venue and/or services)
Show child attributes
Show child attributes
Booking date (ISO date)
"2025-12-04"
Start time
"09:00"
Duration in hours
4
Start timestamp (ISO)
"2025-12-04T09:00:00Z"
End timestamp (ISO)
"2025-12-04T13:00:00Z"
DEPRECATED: Use items[].selectedPackages instead
If provided, upgrade existing booking instead of creating new one
Optional message to host (e.g. purpose of event)
Payment flow: hosted_checkout (redirect) or payment_sheet (native)
hosted_checkout, payment_sheet Response
Success
Result mode
approval_required, instant_booking "instant_booking"
Booking ID (when mode is approval_required or instant_booking with payment sheet)
"550e8400-e29b-41d4-a716-446655440000"
Message for user when approval is required
"Your request has been sent to the host."
Stripe Checkout URL (when mode is instant_booking and payment flow is hosted_checkout)
"https://checkout.stripe.com/c/pay/cs_..."
Stripe PaymentIntent client secret (when mode is instant_booking and payment flow is payment_sheet)
"pi_xxx_secret_xxx"
Stripe publishable key (when mode is instant_booking and payment flow is payment_sheet)
"pk_test_..."