Dashboard
Dashboard leaderboards
This endpoint retrieves iframe for leaderboards from TeamCare application.
POST
/
locations
/
{location_id}
/
dashboard
/
leaderboards
Dashboard leaderboards
curl --request POST \
--url https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards', 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}/dashboard/leaderboards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/dashboard/leaderboards"
req, _ := http.NewRequest("POST", 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.post("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"iframe": "string"
}{
"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 leaderboards dashboard is to be retrieved.
Query Parameters
Specifies which leaderboard iframe to retrieve. Must be one of the following values: doctors, hygiene, front_desk, reactivation.
Example:
"reactivation"
Response
Successful response
⌘I
Dashboard leaderboards
curl --request POST \
--url https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards', 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}/dashboard/leaderboards",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/dashboard/leaderboards"
req, _ := http.NewRequest("POST", 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.post("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamcaredental.com/api/v1/vendors/locations/{location_id}/dashboard/leaderboards")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"iframe": "string"
}{
"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
}
