Reserve appointment slot
curl --request POST \
--url https://brunkhorst.connectors.aicoflow.com/api/booking/reserve \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"time": "<string>",
"service_ids": [
"<string>"
],
"session_id": "<string>"
}
'import requests
url = "https://brunkhorst.connectors.aicoflow.com/api/booking/reserve"
payload = {
"time": "<string>",
"service_ids": ["<string>"],
"session_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({time: '<string>', service_ids: ['<string>'], session_id: '<string>'})
};
fetch('https://brunkhorst.connectors.aicoflow.com/api/booking/reserve', 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://brunkhorst.connectors.aicoflow.com/api/booking/reserve",
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([
'time' => '<string>',
'service_ids' => [
'<string>'
],
'session_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://brunkhorst.connectors.aicoflow.com/api/booking/reserve"
payload := strings.NewReader("{\n \"time\": \"<string>\",\n \"service_ids\": [\n \"<string>\"\n ],\n \"session_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://brunkhorst.connectors.aicoflow.com/api/booking/reserve")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"time\": \"<string>\",\n \"service_ids\": [\n \"<string>\"\n ],\n \"session_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brunkhorst.connectors.aicoflow.com/api/booking/reserve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"time\": \"<string>\",\n \"service_ids\": [\n \"<string>\"\n ],\n \"session_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Booking
Reserve appointment slot
Reserve a time slot for an appointment. This is step 1 of the two-step booking process.
Important: Reservations are temporary and typically expire after ~10 minutes. You must call /booking/confirm to complete the booking.
The session_id parameter can be used to link multiple operations together. If not provided, the appointment ID is stored under the key “latest”.
POST
/
api
/
booking
/
reserve
Reserve appointment slot
curl --request POST \
--url https://brunkhorst.connectors.aicoflow.com/api/booking/reserve \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"time": "<string>",
"service_ids": [
"<string>"
],
"session_id": "<string>"
}
'import requests
url = "https://brunkhorst.connectors.aicoflow.com/api/booking/reserve"
payload = {
"time": "<string>",
"service_ids": ["<string>"],
"session_id": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({time: '<string>', service_ids: ['<string>'], session_id: '<string>'})
};
fetch('https://brunkhorst.connectors.aicoflow.com/api/booking/reserve', 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://brunkhorst.connectors.aicoflow.com/api/booking/reserve",
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([
'time' => '<string>',
'service_ids' => [
'<string>'
],
'session_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://brunkhorst.connectors.aicoflow.com/api/booking/reserve"
payload := strings.NewReader("{\n \"time\": \"<string>\",\n \"service_ids\": [\n \"<string>\"\n ],\n \"session_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://brunkhorst.connectors.aicoflow.com/api/booking/reserve")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"time\": \"<string>\",\n \"service_ids\": [\n \"<string>\"\n ],\n \"session_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brunkhorst.connectors.aicoflow.com/api/booking/reserve")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"time\": \"<string>\",\n \"service_ids\": [\n \"<string>\"\n ],\n \"session_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Response
Reservation details including appointment_id and expiration time
⌘I