Retrieve compliance statistics
This API retrieves all compliance statistics of an organization.
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 /{api_url}/v1/organizations/treatment_forms/compliance_rule_statistics
Base URL: https://api.zenoti.com
Request
Headers
| Header | Required | Description |
|---|---|---|
| Authorization | Yes | bearer {{access_token}} |
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| start_date | boolean | No | false | start date of appts to be considered |
| end_date | boolean | No | false | end date of appts to be considered |
| center_ids | string | No | — | list of centers |
| jobs | string | No | — | list of jobs |
| employee_ids | string | No | — | list of employees |
Response
Success (200 OK)
{
"compliance_rule_statistics": [
{
"...": "..."
}
],
"error": {}
}
Response fields
| Field | Type | Description |
|---|---|---|
| compliance_rule_statistics | object[] | |
| compliance_rule_statistics[].compliance_rule_id | integer | |
| compliance_rule_statistics[].organization_id | string | |
| compliance_rule_statistics[].center_id | string | |
| compliance_rule_statistics[].center_name | string | |
| compliance_rule_statistics[].state | string | |
| compliance_rule_statistics[].jobs | object[] | |
| compliance_rule_statistics[].target_percentage | integer | |
| compliance_rule_statistics[].total_forms | integer | |
| compliance_rule_statistics[].submitted_forms | integer | |
| compliance_rule_statistics[].submission_percentage | integer | |
| compliance_rule_statistics[].reviewed_forms | integer | |
| compliance_rule_statistics[].review_percentage | integer | |
| compliance_rule_statistics[].is_compliant | boolean | |
| compliance_rule_statistics[].employee_statistics | object[] | |
| error | object |
Example
curl --request GET \
--url 'https://api.zenoti.com/{api_url}/v1/organizations/treatment_forms/compliance_rule_statistics' \
--header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/{api_url}/v1/organizations/treatment_forms/compliance_rule_statistics', {
method: 'GET',
headers: {
'Authorization': 'bearer {{access_token}}'
},
});
const data = await response.json();
import requests
response = requests.get(
'https://api.zenoti.com/{api_url}/v1/organizations/treatment_forms/compliance_rule_statistics',
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/{api_url}/v1/organizations/treatment_forms/compliance_rule_statistics");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'
uri = URI('https://api.zenoti.com/{api_url}/v1/organizations/treatment_forms/compliance_rule_statistics')
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 |
| 500 | 500 |