Settings
Update business hours
Replaces the weekly business hours (and the dated exceptions, when sent). Managers and owners only. Same
envelope as the core-api route it replaces ({ data: { businessHours } }), answered with 200 instead of 201.
PUT
/
v1
/
tenants
/
{tenantID}
/
settings
/
business-hours
Update business hours
curl --request PUT \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"businessHours": {
"humanOpeningHours": [
{
"windows": [
{
"from": "<string>",
"to": "<string>"
}
],
"id": "<string>"
}
],
"exceptionalDates": [
{
"date": "<string>",
"id": "<string>",
"windows": [
{
"from": "<string>",
"to": "<string>"
}
]
}
]
}
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours"
payload = { "businessHours": {
"humanOpeningHours": [
{
"windows": [
{
"from": "<string>",
"to": "<string>"
}
],
"id": "<string>"
}
],
"exceptionalDates": [
{
"date": "<string>",
"id": "<string>",
"windows": [
{
"from": "<string>",
"to": "<string>"
}
]
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
businessHours: {
humanOpeningHours: [{windows: [{from: '<string>', to: '<string>'}], id: '<string>'}],
exceptionalDates: [
{
date: '<string>',
id: '<string>',
windows: [{from: '<string>', to: '<string>'}]
}
]
}
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-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://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-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([
'businessHours' => [
'humanOpeningHours' => [
[
'windows' => [
[
'from' => '<string>',
'to' => '<string>'
]
],
'id' => '<string>'
]
],
'exceptionalDates' => [
[
'date' => '<string>',
'id' => '<string>',
'windows' => [
[
'from' => '<string>',
'to' => '<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://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours"
payload := strings.NewReader("{\n \"businessHours\": {\n \"humanOpeningHours\": [\n {\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"id\": \"<string>\"\n }\n ],\n \"exceptionalDates\": [\n {\n \"date\": \"<string>\",\n \"id\": \"<string>\",\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"businessHours\": {\n \"humanOpeningHours\": [\n {\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"id\": \"<string>\"\n }\n ],\n \"exceptionalDates\": [\n {\n \"date\": \"<string>\",\n \"id\": \"<string>\",\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessHours\": {\n \"humanOpeningHours\": [\n {\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"id\": \"<string>\"\n }\n ],\n \"exceptionalDates\": [\n {\n \"date\": \"<string>\",\n \"id\": \"<string>\",\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"businessHours": {
"exceptionalDates": [
{
"date": "2026-12-25T15:00:00.000Z",
"id": "e5f6",
"mode": "closed",
"openingWindows": [],
"windows": [
{
"from": "00:00",
"to": "23:59"
}
]
}
],
"humanOpeningHours": [
{
"id": "b1f2",
"weekday": "monday",
"windows": [
{
"from": "08:00",
"to": "18:00"
}
]
},
{
"id": "c3d4",
"weekday": "saturday",
"windows": [
{
"from": "08:00",
"to": "12:00"
}
]
}
]
}
}
}{
"errors": [
{
"error": "RequestValidationError",
"error_code": 1002,
"fields": [
{
"allowed": "<string>",
"field": "<string>",
"received": "<string>"
}
],
"message": "Invalid request data.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "UnauthorizedError",
"error_code": 1003,
"message": "You are not authorized to perform this request.",
"statusCode": 401
}
]
}{
"errors": [
{
"error": "ForbiddenError",
"error_code": 1004,
"message": "You do not have access to this resource.",
"statusCode": 403
}
]
}{
"errors": [
{
"error": "TenantNotFoundError",
"error_code": 1062,
"message": "Tenant not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}Authorizations
Path Parameters
⌘I
Update business hours
curl --request PUT \
--url https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"businessHours": {
"humanOpeningHours": [
{
"windows": [
{
"from": "<string>",
"to": "<string>"
}
],
"id": "<string>"
}
],
"exceptionalDates": [
{
"date": "<string>",
"id": "<string>",
"windows": [
{
"from": "<string>",
"to": "<string>"
}
]
}
]
}
}
'import requests
url = "https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours"
payload = { "businessHours": {
"humanOpeningHours": [
{
"windows": [
{
"from": "<string>",
"to": "<string>"
}
],
"id": "<string>"
}
],
"exceptionalDates": [
{
"date": "<string>",
"id": "<string>",
"windows": [
{
"from": "<string>",
"to": "<string>"
}
]
}
]
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
businessHours: {
humanOpeningHours: [{windows: [{from: '<string>', to: '<string>'}], id: '<string>'}],
exceptionalDates: [
{
date: '<string>',
id: '<string>',
windows: [{from: '<string>', to: '<string>'}]
}
]
}
})
};
fetch('https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-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://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-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([
'businessHours' => [
'humanOpeningHours' => [
[
'windows' => [
[
'from' => '<string>',
'to' => '<string>'
]
],
'id' => '<string>'
]
],
'exceptionalDates' => [
[
'date' => '<string>',
'id' => '<string>',
'windows' => [
[
'from' => '<string>',
'to' => '<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://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours"
payload := strings.NewReader("{\n \"businessHours\": {\n \"humanOpeningHours\": [\n {\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"id\": \"<string>\"\n }\n ],\n \"exceptionalDates\": [\n {\n \"date\": \"<string>\",\n \"id\": \"<string>\",\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ]\n }\n ]\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"businessHours\": {\n \"humanOpeningHours\": [\n {\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"id\": \"<string>\"\n }\n ],\n \"exceptionalDates\": [\n {\n \"date\": \"<string>\",\n \"id\": \"<string>\",\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ]\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://services-api.talqui.chat/v1/tenants/{tenantID}/settings/business-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"businessHours\": {\n \"humanOpeningHours\": [\n {\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"id\": \"<string>\"\n }\n ],\n \"exceptionalDates\": [\n {\n \"date\": \"<string>\",\n \"id\": \"<string>\",\n \"windows\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ]\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"businessHours": {
"exceptionalDates": [
{
"date": "2026-12-25T15:00:00.000Z",
"id": "e5f6",
"mode": "closed",
"openingWindows": [],
"windows": [
{
"from": "00:00",
"to": "23:59"
}
]
}
],
"humanOpeningHours": [
{
"id": "b1f2",
"weekday": "monday",
"windows": [
{
"from": "08:00",
"to": "18:00"
}
]
},
{
"id": "c3d4",
"weekday": "saturday",
"windows": [
{
"from": "08:00",
"to": "12:00"
}
]
}
]
}
}
}{
"errors": [
{
"error": "RequestValidationError",
"error_code": 1002,
"fields": [
{
"allowed": "<string>",
"field": "<string>",
"received": "<string>"
}
],
"message": "Invalid request data.",
"statusCode": 400
}
]
}{
"errors": [
{
"error": "UnauthorizedError",
"error_code": 1003,
"message": "You are not authorized to perform this request.",
"statusCode": 401
}
]
}{
"errors": [
{
"error": "ForbiddenError",
"error_code": 1004,
"message": "You do not have access to this resource.",
"statusCode": 403
}
]
}{
"errors": [
{
"error": "TenantNotFoundError",
"error_code": 1062,
"message": "Tenant not found.",
"statusCode": 404
}
]
}{
"errors": [
{
"error": "UnknownError",
"error_code": 5999,
"message": "For some unknown reason your request has not succeeded.",
"statusCode": 500
}
]
}