Retrieve the list of schedule blocks
GET
/api/bloqueos/
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Get, RequestUri = new Uri("https://api.koibox.cloud/api/bloqueos/"), Headers = { { "X-Koibox-Key", "<X-Koibox-Key>" }, },};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.koibox.cloud/api/bloqueos/")) .header("X-Koibox-Key", "<X-Koibox-Key>") .method("GET", HttpRequest.BodyPublishers.noBody()) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder() .url("https://api.koibox.cloud/api/bloqueos/") .get() .addHeader("X-Koibox-Key", "<X-Koibox-Key>") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'GET', url: 'https://api.koibox.cloud/api/bloqueos/', headers: {'X-Koibox-Key': '<X-Koibox-Key>'}};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.koibox.cloud/api/bloqueos/';const options = {method: 'GET', headers: {'X-Koibox-Key': '<X-Koibox-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.koibox.cloud/api/bloqueos/ \ --header 'X-Koibox-Key: <X-Koibox-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”id__in
Array<integer>
fecha__gte
string format: date-time
fecha__lte
string format: date-time
hora_inicio__gte
string format: date-time
hora_inicio__lte
string format: date-time
hora_fin__gte
string format: date-time
hora_fin__lte
string format: date-time
user
integer
user__in
Array<integer>
is_online
boolean
cita__isnull
boolean
cita
integer
limit
integer
offset
integer
Responses
Section titled “Responses”List of requested blocks
Media typeapplication/json
object
count
integer
results
Array
object
id
Read-only
integer
created
Read-only
string format: date-time
updated
Read-only
string format: date-time
created_by
ID of the creator user, read-only
integer
user
required
ID of the user affected by the block
integer
centro
required
integer
fecha
required
Date of the block, expected in the center’s time zone
string format: date
hora_inicio
required
string format: time
hora_fin
required
string format: time
titulo
required
string
recurrencia
required
How often the block repeats, day_1___ == every day
string
is_online
Determines if the block affects online reservations. Required if appointment is not null
boolean
cita
Online appointment that created the block. Required if is_online is true
integer
employee_name
Full name of the employee, read-only
string
recurrence_description
Read-only
string
The access key has not been provided in the X-Koibox-Key header
Headers
Section titled “Headers”WWW-Authenticate
string
Indicates the required header for authentication
No valid access key has been provided
