Retrieve a room of a center
This API helps you to retrieve the details of a specific room at the required center.
You must specify in the API request the unique identifier of the location (center) as center_id and the unique identifier of the room as room_id. The API then retrieves the details of the room.
Before you begin
- You need a valid API key or access token. See Set up API authentication.
Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.
Endpoint
GET /v1/centers/{center_id}/rooms/{room_id}
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| center_id | string | Yes | Mandatory Unique 32-character identifier of the center. |
| room_id | string | Yes | Mandatory Unique 32-character identifier of the room. |
Response
Success (200 OK)
{
"id": "699ec863-c155-4c4b-bf58-5310a7d1df1c",
"code": "",
"name": "15% Premium Room",
"room_category_id": "",
"description": "",
"capacity": 2,
"can_exceed_capacity": false,
"only_one_appointment": false
}
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | |
| code | string | |
| name | string | |
| room_category_id | string | |
| description | string | |
| capacity | integer | |
| can_exceed_capacity | boolean | |
| only_one_appointment | boolean |
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/centers/{center_id}/rooms/{room_id}' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/centers/{center_id}/rooms/{room_id}', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/v1/centers/{center_id}/rooms/{room_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/centers/{center_id}/rooms/{room_id}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/centers/{center_id}/rooms/{room_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 |