Retrieve the block out time of a room

GET https://api.zenoti.com/v1/blockouttimes/{block_out_time_id}

Use this API to retrieve the blockout time of the specified room.

Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

GET /v1/blockouttimes/{block_out_time_id}

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
block_out_time_id string Yes Mandatory Unique 32-character identifier of the room's blockout ID for which this API returns the corresponding blockout time information.

Query parameters

Parameter Type Required Default Description
center_id string Yes — Mandatory Unique 32-character identifier of the center for which you want to retrieve the room's blockout time.

Response

Success (200 OK)

{
  "block_out_time_id": "3aa1d607-e604-4b8f-9db6-4674c61f0651",
  "employee": {},
  "room": {
    "id": "699ec863-c155-4c4b-bf58-5310a7d1df1c",
    "name": "15% Premium Room"
  },
  "block_out_time_type": {
    "id": 103,
    "name": "modelling",
    "duration": 15
  },
  "start_time": "2018-09-07T07:30:00",
  "end_time": "2018-09-07T08:00:00",
  "start_time_in_center": "2018-09-07T13:00:00",
  "end_time_in_center": "2018-09-07T13:30:00",
  "notes": "leaving for lunch",
  "recurring_block_out_time": {
    "id": "262b77bc-69ea-42ea-a258-33a033b6a936",
    "time_period": "Daily",
    "interval": 1,
    "rec_start_date": "2018-09-07T00:00:00",
    "rec_end_date": {},
    "week_days": 0,
    "occurences": 3
  }
}

Response fields

Field Type Description
block_out_time_id string
employee object
room object
room.id string
room.name string
block_out_time_type object
block_out_time_type.id integer
block_out_time_type.name string
block_out_time_type.duration integer
start_time string
end_time string
start_time_in_center string
end_time_in_center string
notes string
recurring_block_out_time object
recurring_block_out_time.id string
recurring_block_out_time.time_period string
recurring_block_out_time.interval integer
recurring_block_out_time.rec_start_date string
recurring_block_out_time.rec_end_date object
recurring_block_out_time.week_days integer
recurring_block_out_time.occurences integer

Example

curl --request GET \
  --url 'https://api.zenoti.com/v1/blockouttimes/{block_out_time_id}?center_id={{center_id}}' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/blockouttimes/{block_out_time_id}', {
  method: 'GET',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.get(
    'https://api.zenoti.com/v1/blockouttimes/{block_out_time_id}',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.GetAsync(
    "https://api.zenoti.com/v1/blockouttimes/{block_out_time_id}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/v1/blockouttimes/{block_out_time_id}')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded