curl -X PUT "https://api.playground.try.be/shop/blocked-times/abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{
"start_time": "2026-01-15T09:30:00+00:00",
"end_time": "2026-01-15T09:30:00+00:00",
"type": "cleaning",
"label": "Lunch",
"notes": "Cover the front desk with reception.",
"color": "#ff8800",
"practitioner_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"room_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"area_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"old_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_area_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_area_id": "64a9f3b2c3d8e1f4a5b6c7d8"
}'
const response = await fetch('https://api.playground.try.be/shop/blocked-times/abc123', {
method: 'PUT',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
Accept: 'application/json',
},
body: JSON.stringify({
"start_time": "2026-01-15T09:30:00+00:00",
"end_time": "2026-01-15T09:30:00+00:00",
"type": "cleaning",
"label": "Lunch",
"notes": "Cover the front desk with reception.",
"color": "#ff8800",
"practitioner_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"room_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"area_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"old_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_area_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_area_id": "64a9f3b2c3d8e1f4a5b6c7d8"
}),
})
if (!response.ok) {
throw new Error(`Trybe API ${response.status}: ${await response.text()}`)
}
const data = await response.json()
import httpx
response = httpx.put(
"https://api.playground.try.be/shop/blocked-times/abc123",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Accept": "application/json",
"Content-Type": "application/json",
},
json={
"start_time": "2026-01-15T09:30:00+00:00",
"end_time": "2026-01-15T09:30:00+00:00",
"type": "cleaning",
"label": "Lunch",
"notes": "Cover the front desk with reception.",
"color": "#ff8800",
"practitioner_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"room_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"area_ids": [
"64a9f3b2c3d8e1f4a5b6c7d8"
],
"old_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_area_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_area_id": "64a9f3b2c3d8e1f4a5b6c7d8"
},
)
response.raise_for_status()
data = response.json()
<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('PUT', 'https://api.playground.try.be/shop/blocked-times/abc123', [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY',
'Accept' => 'application/json',
'Content-Type' => 'application/json',
],
'json' => [
'start_time' => '2026-01-15T09:30:00+00:00',
'end_time' => '2026-01-15T09:30:00+00:00',
'type' => 'cleaning',
'label' => 'Lunch',
'notes' => 'Cover the front desk with reception.',
'color' => '#ff8800',
'practitioner_ids' => [
'64a9f3b2c3d8e1f4a5b6c7d8'
],
'room_ids' => [
'64a9f3b2c3d8e1f4a5b6c7d8'
],
'area_ids' => [
'64a9f3b2c3d8e1f4a5b6c7d8'
],
'old_practitioner_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'new_practitioner_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'old_room_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'new_room_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'old_area_id' => '64a9f3b2c3d8e1f4a5b6c7d8',
'new_area_id' => '64a9f3b2c3d8e1f4a5b6c7d8'
],
]);
$data = json_decode($response->getBody(), true);
package main
import (
"bytes"
"encoding/json"
"net/http"
)
func main() {
payload, _ := json.Marshal(map[string]interface{}{
"start_time": "2026-01-15T09:30:00+00:00",
"end_time": "2026-01-15T09:30:00+00:00",
"type": "cleaning",
"label": "Lunch",
"notes": "Cover the front desk with reception.",
"color": "#ff8800",
"practitioner_ids": []interface{}{
"64a9f3b2c3d8e1f4a5b6c7d8",
},
"room_ids": []interface{}{
"64a9f3b2c3d8e1f4a5b6c7d8",
},
"area_ids": []interface{}{
"64a9f3b2c3d8e1f4a5b6c7d8",
},
"old_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_practitioner_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_room_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"old_area_id": "64a9f3b2c3d8e1f4a5b6c7d8",
"new_area_id": "64a9f3b2c3d8e1f4a5b6c7d8",
})
req, _ := http.NewRequest("PUT", "https://api.playground.try.be/shop/blocked-times/abc123", bytes.NewBuffer(payload))
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Accept", "application/json")
req.Header.Set("Content-Type", "application/json")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var data map[string]interface{}
json.NewDecoder(resp.Body).Decode(&data)
}