Bookings
Add Session
Adds a new session to an existing booking
Add Session to Booking
curl --request POST \
--url http://localhost:3000/api/bookings/add-session \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"dateTimestamp": 123,
"startTime": 123,
"endTime": 123,
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"sessionPrice": "<string>",
"sessionDepositFee": "<string>"
}
'import requests
url = "http://localhost:3000/api/bookings/add-session"
payload = {
"id": "<string>",
"dateTimestamp": 123,
"startTime": 123,
"endTime": 123,
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"sessionPrice": "<string>",
"sessionDepositFee": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
dateTimestamp: 123,
startTime: 123,
endTime: 123,
location: {
address: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
latitude: 123,
longitude: 123
},
sessionPrice: '<string>',
sessionDepositFee: '<string>'
})
};
fetch('http://localhost:3000/api/bookings/add-session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/bookings/add-session",
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([
'id' => '<string>',
'dateTimestamp' => 123,
'startTime' => 123,
'endTime' => 123,
'location' => [
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 123,
'longitude' => 123
],
'sessionPrice' => '<string>',
'sessionDepositFee' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/api/bookings/add-session"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"dateTimestamp\": 123,\n \"startTime\": 123,\n \"endTime\": 123,\n \"location\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"sessionPrice\": \"<string>\",\n \"sessionDepositFee\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:3000/api/bookings/add-session")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"dateTimestamp\": 123,\n \"startTime\": 123,\n \"endTime\": 123,\n \"location\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"sessionPrice\": \"<string>\",\n \"sessionDepositFee\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/bookings/add-session")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"dateTimestamp\": 123,\n \"startTime\": 123,\n \"endTime\": 123,\n \"location\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"sessionPrice\": \"<string>\",\n \"sessionDepositFee\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Body
application/json
ID of the booking to add session to
Timestamp for the session date
Session start time timestamp
Session end time timestamp
Location details for the session
Show child attributes
Show child attributes
Type of session
Available options:
CONSULTATION, TATTOO Price for the session
Deposit fee for the session
Response
Session added successfully
⌘I
Add Session to Booking
curl --request POST \
--url http://localhost:3000/api/bookings/add-session \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"dateTimestamp": 123,
"startTime": 123,
"endTime": 123,
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"sessionPrice": "<string>",
"sessionDepositFee": "<string>"
}
'import requests
url = "http://localhost:3000/api/bookings/add-session"
payload = {
"id": "<string>",
"dateTimestamp": 123,
"startTime": 123,
"endTime": 123,
"location": {
"address": "<string>",
"city": "<string>",
"state": "<string>",
"country": "<string>",
"latitude": 123,
"longitude": 123
},
"sessionPrice": "<string>",
"sessionDepositFee": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
dateTimestamp: 123,
startTime: 123,
endTime: 123,
location: {
address: '<string>',
city: '<string>',
state: '<string>',
country: '<string>',
latitude: 123,
longitude: 123
},
sessionPrice: '<string>',
sessionDepositFee: '<string>'
})
};
fetch('http://localhost:3000/api/bookings/add-session', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "3000",
CURLOPT_URL => "http://localhost:3000/api/bookings/add-session",
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([
'id' => '<string>',
'dateTimestamp' => 123,
'startTime' => 123,
'endTime' => 123,
'location' => [
'address' => '<string>',
'city' => '<string>',
'state' => '<string>',
'country' => '<string>',
'latitude' => 123,
'longitude' => 123
],
'sessionPrice' => '<string>',
'sessionDepositFee' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:3000/api/bookings/add-session"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"dateTimestamp\": 123,\n \"startTime\": 123,\n \"endTime\": 123,\n \"location\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"sessionPrice\": \"<string>\",\n \"sessionDepositFee\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:3000/api/bookings/add-session")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"dateTimestamp\": 123,\n \"startTime\": 123,\n \"endTime\": 123,\n \"location\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"sessionPrice\": \"<string>\",\n \"sessionDepositFee\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:3000/api/bookings/add-session")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"dateTimestamp\": 123,\n \"startTime\": 123,\n \"endTime\": 123,\n \"location\": {\n \"address\": \"<string>\",\n \"city\": \"<string>\",\n \"state\": \"<string>\",\n \"country\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123\n },\n \"sessionPrice\": \"<string>\",\n \"sessionDepositFee\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}