curl --request PUT \
--url https://api.izap.ai/api/v1/businesses/hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"friday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"monday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"saturday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"sunday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"thursday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"tuesday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"wednesday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
}
'import requests
url = "https://api.izap.ai/api/v1/businesses/hours"
payload = {
"friday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"monday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"saturday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"sunday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"thursday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"tuesday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"wednesday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] }
}
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'business-id': '<business-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
friday: {ranges: [{end: '<string>', start: '<string>'}]},
monday: {ranges: [{end: '<string>', start: '<string>'}]},
saturday: {ranges: [{end: '<string>', start: '<string>'}]},
sunday: {ranges: [{end: '<string>', start: '<string>'}]},
thursday: {ranges: [{end: '<string>', start: '<string>'}]},
tuesday: {ranges: [{end: '<string>', start: '<string>'}]},
wednesday: {ranges: [{end: '<string>', start: '<string>'}]}
})
};
fetch('https://api.izap.ai/api/v1/businesses/hours', 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/businesses/hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'friday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'monday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'saturday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'sunday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'thursday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'tuesday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'wednesday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"business-id: <business-id>"
],
]);
$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/businesses/hours"
payload := strings.NewReader("{\n \"friday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"monday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"saturday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"sunday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"thursday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"tuesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"wednesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("business-id", "<business-id>")
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.put("https://api.izap.ai/api/v1/businesses/hours")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"friday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"monday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"saturday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"sunday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"thursday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"tuesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"wednesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/businesses/hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"friday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"monday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"saturday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"sunday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"thursday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"tuesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"wednesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"friday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"monday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"saturday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"sunday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"thursday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"tuesday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"wednesday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Replace opening hours
Replaces the whole week’s opening hours in one call — a weekday omitted from the request is treated as closed. Changes take effect on live conversations immediately. The business is taken from the business-id header rather than the URL; the path-scoped form of this operation is deprecated.
curl --request PUT \
--url https://api.izap.ai/api/v1/businesses/hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'business-id: <business-id>' \
--data '
{
"friday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"monday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"saturday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"sunday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"thursday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"tuesday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"wednesday": {
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
}
'import requests
url = "https://api.izap.ai/api/v1/businesses/hours"
payload = {
"friday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"monday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"saturday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"sunday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"thursday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"tuesday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] },
"wednesday": { "ranges": [
{
"end": "<string>",
"start": "<string>"
}
] }
}
headers = {
"business-id": "<business-id>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'business-id': '<business-id>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
friday: {ranges: [{end: '<string>', start: '<string>'}]},
monday: {ranges: [{end: '<string>', start: '<string>'}]},
saturday: {ranges: [{end: '<string>', start: '<string>'}]},
sunday: {ranges: [{end: '<string>', start: '<string>'}]},
thursday: {ranges: [{end: '<string>', start: '<string>'}]},
tuesday: {ranges: [{end: '<string>', start: '<string>'}]},
wednesday: {ranges: [{end: '<string>', start: '<string>'}]}
})
};
fetch('https://api.izap.ai/api/v1/businesses/hours', 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/businesses/hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'friday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'monday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'saturday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'sunday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'thursday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'tuesday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
],
'wednesday' => [
'ranges' => [
[
'end' => '<string>',
'start' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"business-id: <business-id>"
],
]);
$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/businesses/hours"
payload := strings.NewReader("{\n \"friday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"monday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"saturday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"sunday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"thursday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"tuesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"wednesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("business-id", "<business-id>")
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.put("https://api.izap.ai/api/v1/businesses/hours")
.header("business-id", "<business-id>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"friday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"monday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"saturday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"sunday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"thursday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"tuesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"wednesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.izap.ai/api/v1/businesses/hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["business-id"] = '<business-id>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"friday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"monday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"saturday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"sunday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"thursday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"tuesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n },\n \"wednesday\": {\n \"ranges\": [\n {\n \"end\": \"<string>\",\n \"start\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"friday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"monday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"saturday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"sunday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"thursday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"tuesday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
},
"wednesday": {
"mode": "open_all_day",
"ranges": [
{
"end": "<string>",
"start": "<string>"
}
]
}
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": "<string>",
"code": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}{
"detail": "<string>",
"code": "<string>"
}Authorizations
Personal access token (izap_pat_…) sent as Authorization: Bearer ; dashboard session JWTs are also accepted.
Headers
UUID of the business the request is scoped to. Required on this route; the deprecated /businesses/{business_id}/... form takes it from the path instead.
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Successful Response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes