Retrieve a center
This API helps you to retrieve the details of a center. You must specify the unique identifier of the center as center_id.
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}
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. |
Response
Success (200 OK)
{
"center": {
"id": "34f7b069-1bce-4f24-b9b2-f58ebbf768f0",
"name": "Zenoti Inc.",
"code": "Z001",
"phone": "0000000000",
"time_zone_id": 6,
"currency_id": 148,
"email": "apisupport@zenoti.com"
},
"error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| center | object | |
| center.id | string | |
| center.name | string | |
| center.code | string | |
| center.phone | string | |
| center.time_zone_id | integer | |
| center.currency_id | integer | |
| center.email | string | |
| error | object |
Example
curl --request GET \
--url 'https://api.zenoti.com/v1/Centers/{center_id}' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/v1/Centers/{center_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}',
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}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/v1/Centers/{center_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 |