카카오
카카오 상담시간 수정
보낸 주간 상담시간표를 카카오 상담톡에 저장합니다. 형식만 검사하고 시각 순서와 요일 중복은 판정하지 않습니다.
지원 채널은 카카오입니다. 다른 채널에서 호출하면 400 CHAT_CHANNEL_OPERATION_UNSUPPORTED로 거절합니다.
PATCH
/
chat-channels
/
{chat_channel_id}
/
consultation-hours
카카오 상담시간 수정
curl --request PATCH \
--url https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weekly_hours": [
{
"start_time": "<string>",
"end_time": "<string>"
}
]
}
'import requests
url = "https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours"
payload = { "weekly_hours": [
{
"start_time": "<string>",
"end_time": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({weekly_hours: [{start_time: '<string>', end_time: '<string>'}]})
};
fetch('https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-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://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'weekly_hours' => [
[
'start_time' => '<string>',
'end_time' => '<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://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours"
payload := strings.NewReader("{\n \"weekly_hours\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weekly_hours\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"weekly_hours\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"chat_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "kakao"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}Authorizations
Body
application/json
저장할 주간 상담시간표입니다.
Was this page helpful?
⌘I
카카오 상담시간 수정
curl --request PATCH \
--url https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"weekly_hours": [
{
"start_time": "<string>",
"end_time": "<string>"
}
]
}
'import requests
url = "https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours"
payload = { "weekly_hours": [
{
"start_time": "<string>",
"end_time": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({weekly_hours: [{start_time: '<string>', end_time: '<string>'}]})
};
fetch('https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-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://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'weekly_hours' => [
[
'start_time' => '<string>',
'end_time' => '<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://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours"
payload := strings.NewReader("{\n \"weekly_hours\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"weekly_hours\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.tryvox.co/v3/chat-channels/{chat_channel_id}/consultation-hours")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"weekly_hours\": [\n {\n \"start_time\": \"<string>\",\n \"end_time\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"chat_channel_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"channel": "kakao"
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed.",
"details": {
"field": "name",
"reason": "must not be blank"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication is required.",
"details": {}
}
}{
"error": {
"code": "FORBIDDEN",
"message": "Permission denied.",
"details": {}
}
}{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found.",
"details": {
"resource": "agent"
}
}
}{
"error": {
"code": "CONFLICT",
"message": "The requested operation conflicts with current state.",
"details": {
"current_status": "draft"
}
}
}{
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Too many requests.",
"details": {
"limit": 10,
"window_seconds": 1,
"scope": "user"
}
}
}{
"error": {
"code": "INTERNAL_ERROR",
"message": "Internal server error.",
"details": {}
}
}{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "Service temporarily unavailable.",
"details": {}
}
}