Create a booking
curl --request POST \
--url https://api.overviu.app/api/v1/bookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"listing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"number_of_guests": 2,
"guest": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"notes": "<string>",
"special_requests": "<string>",
"coupon_code": "<string>"
}
'import requests
url = "https://api.overviu.app/api/v1/bookings"
payload = {
"listing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"number_of_guests": 2,
"guest": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"notes": "<string>",
"special_requests": "<string>",
"coupon_code": "<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({
listing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
check_in: '2023-12-25',
check_out: '2023-12-25',
number_of_guests: 2,
guest: {name: '<string>', email: 'jsmith@example.com', phone: '<string>'},
notes: '<string>',
special_requests: '<string>',
coupon_code: '<string>'
})
};
fetch('https://api.overviu.app/api/v1/bookings', 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.overviu.app/api/v1/bookings",
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([
'listing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'check_in' => '2023-12-25',
'check_out' => '2023-12-25',
'number_of_guests' => 2,
'guest' => [
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>'
],
'notes' => '<string>',
'special_requests' => '<string>',
'coupon_code' => '<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.overviu.app/api/v1/bookings"
payload := strings.NewReader("{\n \"listing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"number_of_guests\": 2,\n \"guest\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"notes\": \"<string>\",\n \"special_requests\": \"<string>\",\n \"coupon_code\": \"<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.overviu.app/api/v1/bookings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"listing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"number_of_guests\": 2,\n \"guest\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"notes\": \"<string>\",\n \"special_requests\": \"<string>\",\n \"coupon_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.overviu.app/api/v1/bookings")
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 \"listing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"number_of_guests\": 2,\n \"guest\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"notes\": \"<string>\",\n \"special_requests\": \"<string>\",\n \"coupon_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"confirmation_code": "<string>",
"listing_id": "<string>",
"unit": {
"id": "<string>",
"name": "<string>"
},
"whole_building": true,
"guest_id": "<string>",
"status": "<string>",
"source": "<string>",
"check_in": "<string>",
"check_out": "<string>",
"nights": 123,
"number_of_guests": 123,
"currency": "<string>",
"accommodation_total": 123,
"discount_total": 123,
"fees_total": 123,
"taxes_total": 123,
"grand_total": 123,
"price_breakdown": [
"<unknown>"
],
"notes": "<string>",
"special_requests": "<string>",
"confirmed_at": "<string>",
"cancelled_at": "<string>",
"completed_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"listing": {
"id": "<string>",
"slug": "<string>",
"kind": "<string>",
"building_id": "<string>",
"whole_building_bookable": true,
"public_title": "<string>",
"nickname": "<string>",
"status": "<string>",
"property_type": "<string>",
"max_guests": 123,
"bedrooms_count": 123,
"beds_count": 123,
"bathrooms_count": 123,
"bathrooms_half": true,
"currency": "<string>",
"timezone": "<string>",
"check_in_time": "<string>",
"check_out_time": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"latitude": "<string>",
"longitude": "<string>"
},
"headline": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"photos": [
{
"id": "<string>",
"is_featured": true,
"sort_order": 123,
"width": 123,
"height": 123,
"thumbnail_url": "<string>",
"medium_url": "<string>",
"original_url": "<string>"
}
]
},
"guest": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"notes": "<string>",
"created_at": "<string>"
}
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Bookings
Create a booking
Creates a booking with source api and status pending, priced like the booking site, and returns it with
status 201. The guest is matched to an existing guest of the team with the same email, or created. Dates that
aren’t available return 422 with the reason in errors.availability; a coupon that doesn’t apply returns 422
in errors.coupon_code.
POST
/
v1
/
bookings
Create a booking
curl --request POST \
--url https://api.overviu.app/api/v1/bookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"listing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"number_of_guests": 2,
"guest": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"notes": "<string>",
"special_requests": "<string>",
"coupon_code": "<string>"
}
'import requests
url = "https://api.overviu.app/api/v1/bookings"
payload = {
"listing_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"check_in": "2023-12-25",
"check_out": "2023-12-25",
"number_of_guests": 2,
"guest": {
"name": "<string>",
"email": "jsmith@example.com",
"phone": "<string>"
},
"notes": "<string>",
"special_requests": "<string>",
"coupon_code": "<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({
listing_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
check_in: '2023-12-25',
check_out: '2023-12-25',
number_of_guests: 2,
guest: {name: '<string>', email: 'jsmith@example.com', phone: '<string>'},
notes: '<string>',
special_requests: '<string>',
coupon_code: '<string>'
})
};
fetch('https://api.overviu.app/api/v1/bookings', 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.overviu.app/api/v1/bookings",
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([
'listing_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'check_in' => '2023-12-25',
'check_out' => '2023-12-25',
'number_of_guests' => 2,
'guest' => [
'name' => '<string>',
'email' => 'jsmith@example.com',
'phone' => '<string>'
],
'notes' => '<string>',
'special_requests' => '<string>',
'coupon_code' => '<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.overviu.app/api/v1/bookings"
payload := strings.NewReader("{\n \"listing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"number_of_guests\": 2,\n \"guest\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"notes\": \"<string>\",\n \"special_requests\": \"<string>\",\n \"coupon_code\": \"<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.overviu.app/api/v1/bookings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"listing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"number_of_guests\": 2,\n \"guest\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"notes\": \"<string>\",\n \"special_requests\": \"<string>\",\n \"coupon_code\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.overviu.app/api/v1/bookings")
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 \"listing_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"check_in\": \"2023-12-25\",\n \"check_out\": \"2023-12-25\",\n \"number_of_guests\": 2,\n \"guest\": {\n \"name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\"\n },\n \"notes\": \"<string>\",\n \"special_requests\": \"<string>\",\n \"coupon_code\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"confirmation_code": "<string>",
"listing_id": "<string>",
"unit": {
"id": "<string>",
"name": "<string>"
},
"whole_building": true,
"guest_id": "<string>",
"status": "<string>",
"source": "<string>",
"check_in": "<string>",
"check_out": "<string>",
"nights": 123,
"number_of_guests": 123,
"currency": "<string>",
"accommodation_total": 123,
"discount_total": 123,
"fees_total": 123,
"taxes_total": 123,
"grand_total": 123,
"price_breakdown": [
"<unknown>"
],
"notes": "<string>",
"special_requests": "<string>",
"confirmed_at": "<string>",
"cancelled_at": "<string>",
"completed_at": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"listing": {
"id": "<string>",
"slug": "<string>",
"kind": "<string>",
"building_id": "<string>",
"whole_building_bookable": true,
"public_title": "<string>",
"nickname": "<string>",
"status": "<string>",
"property_type": "<string>",
"max_guests": 123,
"bedrooms_count": 123,
"beds_count": 123,
"bathrooms_count": 123,
"bathrooms_half": true,
"currency": "<string>",
"timezone": "<string>",
"check_in_time": "<string>",
"check_out_time": "<string>",
"address": {
"street": "<string>",
"city": "<string>",
"state": "<string>",
"postcode": "<string>",
"country": "<string>",
"latitude": "<string>",
"longitude": "<string>"
},
"headline": "<string>",
"description": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"photos": [
{
"id": "<string>",
"is_featured": true,
"sort_order": 123,
"width": 123,
"height": 123,
"thumbnail_url": "<string>",
"medium_url": "<string>",
"original_url": "<string>"
}
]
},
"guest": {
"id": "<string>",
"name": "<string>",
"email": "<string>",
"phone": "<string>",
"notes": "<string>",
"created_at": "<string>"
}
}
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}Authorizations
An API token from Settings → API tokens in Overviu, sent as Authorization: Bearer <token>.
Body
application/json
Required range:
x >= 1Show child attributes
Show child attributes
Maximum string length:
2000Maximum string length:
2000Maximum string length:
40Response
BookingResource
Show child attributes
Show child attributes