Monthly
Monthly stats
This endpoint retrieves monthly stats for a specific location and month.
- The
q[fetch_modified_since]is used to capture the delta changes, pass the datetime in UTC. This parameter will help you identifying only those month goals which were changed since your last sync, so you won’t need to load all the data over again.
GET
/
locations
/
{location_id}
/
monthly
/
stats
Monthly stats
curl --request GET \
--url https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tenant": {
"data": {
"id": "string",
"type": "string",
"attributes": {
"title": "string",
"third_party_id": "string",
"owner": {
"data": {
"id": "string",
"type": "string",
"attributes": {
"name": "string"
}
}
}
}
}
},
"month_goals": {
"data": [
{
"id": "string",
"type": "string",
"attributes": {
"entityable_type": "string",
"entityable_id": 0,
"year": 0,
"month": 0,
"title": "string",
"role": "string",
"days_worked": "integer array",
"kpis": {
"data": [
{
"id": "string",
"type": "string",
"attributes": {
"goal_type": "string",
"goal_value": 0,
"actual_value": 0,
"variance_value": 0,
"variance_pct": "float"
}
}
]
}
}
}
]
},
"pagy": {
"items": 0,
"count": 0,
"page": 0,
"next": 0,
"prev": 0
}
}{
"errors": "not authorized"
}{
"errors": "access Denied"
}{
"errors": "resource not found"
}{
"errors": "..."
}{
"errors": "Too many locations syncing concurrently. At most 5 locations may have initial sync requests in flight at a time.",
"sync_type": "initial",
"max_concurrent_locations": 5,
"active_location_ids": [
101,
102,
103,
104,
105
],
"retry_after_seconds": 1
}Authorizations
JWT returned by POST /auth/token. Valid for six hours.
Path Parameters
The ID of the location for which patients are to be retrieved.
Query Parameters
A start of the month date parameter to specifiy the month and year to get data from, following the format YYYY-MM-DD.
Example:
"2023-05-01"
A parameter to specify the number of items to be returned.
Example:
6
true Include this parameter to get all the daily stats within month.
Example:
true
Show child attributes
Show child attributes
⌘I
Monthly stats
curl --request GET \
--url https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/monthly/stats")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"tenant": {
"data": {
"id": "string",
"type": "string",
"attributes": {
"title": "string",
"third_party_id": "string",
"owner": {
"data": {
"id": "string",
"type": "string",
"attributes": {
"name": "string"
}
}
}
}
}
},
"month_goals": {
"data": [
{
"id": "string",
"type": "string",
"attributes": {
"entityable_type": "string",
"entityable_id": 0,
"year": 0,
"month": 0,
"title": "string",
"role": "string",
"days_worked": "integer array",
"kpis": {
"data": [
{
"id": "string",
"type": "string",
"attributes": {
"goal_type": "string",
"goal_value": 0,
"actual_value": 0,
"variance_value": 0,
"variance_pct": "float"
}
}
]
}
}
}
]
},
"pagy": {
"items": 0,
"count": 0,
"page": 0,
"next": 0,
"prev": 0
}
}{
"errors": "not authorized"
}{
"errors": "access Denied"
}{
"errors": "resource not found"
}{
"errors": "..."
}{
"errors": "Too many locations syncing concurrently. At most 5 locations may have initial sync requests in flight at a time.",
"sync_type": "initial",
"max_concurrent_locations": 5,
"active_location_ids": [
101,
102,
103,
104,
105
],
"retry_after_seconds": 1
}
