curl --request PATCH \
--url https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"exceptionDate": "2023-12-25",
"isClosed": true,
"startTime": "<string>",
"endTime": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}"
payload = {
"exceptionDate": "2023-12-25",
"isClosed": True,
"startTime": "<string>",
"endTime": "<string>",
"reason": "<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({
exceptionDate: '2023-12-25',
isClosed: true,
startTime: '<string>',
endTime: '<string>',
reason: '<string>'
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}', 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-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}",
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([
'exceptionDate' => '2023-12-25',
'isClosed' => true,
'startTime' => '<string>',
'endTime' => '<string>',
'reason' => '<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-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}"
payload := strings.NewReader("{\n \"exceptionDate\": \"2023-12-25\",\n \"isClosed\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"reason\": \"<string>\"\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://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"exceptionDate\": \"2023-12-25\",\n \"isClosed\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}")
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 \"exceptionDate\": \"2023-12-25\",\n \"isClosed\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exceptionDate": "2023-12-25",
"isClosed": true,
"createdAt": "2023-11-07T05:31:56Z",
"startTime": "<string>",
"endTime": "<string>",
"reason": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Actualizar excepción puntual del horario
curl --request PATCH \
--url https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"exceptionDate": "2023-12-25",
"isClosed": true,
"startTime": "<string>",
"endTime": "<string>",
"reason": "<string>"
}
'import requests
url = "https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}"
payload = {
"exceptionDate": "2023-12-25",
"isClosed": True,
"startTime": "<string>",
"endTime": "<string>",
"reason": "<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({
exceptionDate: '2023-12-25',
isClosed: true,
startTime: '<string>',
endTime: '<string>',
reason: '<string>'
})
};
fetch('https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}', 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-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}",
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([
'exceptionDate' => '2023-12-25',
'isClosed' => true,
'startTime' => '<string>',
'endTime' => '<string>',
'reason' => '<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-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}"
payload := strings.NewReader("{\n \"exceptionDate\": \"2023-12-25\",\n \"isClosed\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"reason\": \"<string>\"\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://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"exceptionDate\": \"2023-12-25\",\n \"isClosed\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-prod.studio.getsupervisor.ai/v1/agents/{agentId}/schedules/exceptions/{exceptionId}")
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 \"exceptionDate\": \"2023-12-25\",\n \"isClosed\": true,\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\",\n \"reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"exceptionDate": "2023-12-25",
"isClosed": true,
"createdAt": "2023-11-07T05:31:56Z",
"startTime": "<string>",
"endTime": "<string>",
"reason": "<string>"
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}{
"statusCode": 123,
"message": "<string>",
"error": "<string>",
"path": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"code": "<string>",
"details": {
"subcode": "<string>",
"workspaceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Identificador del workspace multi-tenant. Obligatorio al autenticar con Authorization: Bearer, donde su ausencia devuelve 400 Workspace context is required. Con x-api-key es opcional: la llave ya identifica a su workspace y lo que mandes aquí se ignora.
Path Parameters
Identificador del agente
Identificador de la excepción de horario del agente
Body
Response
Excepción actualizada
Excepción puntual que modifica la disponibilidad del agente para un día específico.
Fecha en formato ISO-8601 (YYYY-MM-DD) afectada por la excepción.
Define si el agente estará completamente fuera de servicio ese día.
Hora local de inicio (HH:mm). Obligatoria cuando isClosed es false.
^([01]?[0-9]|2[0-3]):[0-5][0-9]$Hora local de fin (HH:mm). Obligatoria junto con startTime cuando isClosed es false.
^([01]?[0-9]|2[0-3]):[0-5][0-9]$Notas visibles para el equipo de operaciones respecto a la excepción.
280