Create a booking
curl --request POST \
--url https://api.izap.ai/api/v1/scheduling/{business_id}/bookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"establishment_id": "<string>",
"customer_id": "<string>",
"service_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"duration": 123,
"value": 123,
"resource_type": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/scheduling/{business_id}/bookings"
payload = {
"establishment_id": "<string>",
"customer_id": "<string>",
"service_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"duration": 123,
"value": 123,
"resource_type": "<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({
establishment_id: '<string>',
customer_id: '<string>',
service_id: '<string>',
start_time: '2023-11-07T05:31:56Z',
duration: 123,
value: 123,
resource_type: '<string>'
})
};
fetch('https://api.izap.ai/api/v1/scheduling/{business_id}/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.izap.ai/api/v1/scheduling/{business_id}/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([
'establishment_id' => '<string>',
'customer_id' => '<string>',
'service_id' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'duration' => 123,
'value' => 123,
'resource_type' => '<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.izap.ai/api/v1/scheduling/{business_id}/bookings"
payload := strings.NewReader("{\n \"establishment_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"service_id\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"duration\": 123,\n \"value\": 123,\n \"resource_type\": \"<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.izap.ai/api/v1/scheduling/{business_id}/bookings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"establishment_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"service_id\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"duration\": 123,\n \"value\": 123,\n \"resource_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/scheduling/{business_id}/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 \"establishment_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"service_id\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"duration\": 123,\n \"value\": 123,\n \"resource_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "501",
"establishment_id": "12",
"provider_id": "7",
"customer_id": "9001",
"service_id": "42",
"start_time": "2026-07-10 14:00:00",
"end_time": "2026-07-10 14:30:00",
"duration": 30,
"value": 60,
"status": "confirmed"
}{
"detail": "Not authenticated"
}Scheduling
Create a booking
Books an appointment with the first available provider that offers the requested service in the requested time window.
POST
/
api
/
v1
/
scheduling
/
{business_id}
/
bookings
Create a booking
curl --request POST \
--url https://api.izap.ai/api/v1/scheduling/{business_id}/bookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"establishment_id": "<string>",
"customer_id": "<string>",
"service_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"duration": 123,
"value": 123,
"resource_type": "<string>"
}
'import requests
url = "https://api.izap.ai/api/v1/scheduling/{business_id}/bookings"
payload = {
"establishment_id": "<string>",
"customer_id": "<string>",
"service_id": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"duration": 123,
"value": 123,
"resource_type": "<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({
establishment_id: '<string>',
customer_id: '<string>',
service_id: '<string>',
start_time: '2023-11-07T05:31:56Z',
duration: 123,
value: 123,
resource_type: '<string>'
})
};
fetch('https://api.izap.ai/api/v1/scheduling/{business_id}/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.izap.ai/api/v1/scheduling/{business_id}/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([
'establishment_id' => '<string>',
'customer_id' => '<string>',
'service_id' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'duration' => 123,
'value' => 123,
'resource_type' => '<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.izap.ai/api/v1/scheduling/{business_id}/bookings"
payload := strings.NewReader("{\n \"establishment_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"service_id\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"duration\": 123,\n \"value\": 123,\n \"resource_type\": \"<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.izap.ai/api/v1/scheduling/{business_id}/bookings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"establishment_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"service_id\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"duration\": 123,\n \"value\": 123,\n \"resource_type\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/scheduling/{business_id}/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 \"establishment_id\": \"<string>\",\n \"customer_id\": \"<string>\",\n \"service_id\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"duration\": 123,\n \"value\": 123,\n \"resource_type\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "501",
"establishment_id": "12",
"provider_id": "7",
"customer_id": "9001",
"service_id": "42",
"start_time": "2026-07-10 14:00:00",
"end_time": "2026-07-10 14:30:00",
"duration": 30,
"value": 60,
"status": "confirmed"
}{
"detail": "Not authenticated"
}Autorizações
JWT access token obtained from POST /api/v1/auth/jwt/login, the OAuth token endpoint, or a business-scoped API token. Some Business/Chat/Template/Scheduling endpoints alternatively accept HTTP Basic credentials scoped to the business slug.
Parâmetros de caminho
Corpo
application/json
⌘I