<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://docs.callproof.com/index.php?action=history&amp;feed=atom&amp;title=Appointmet_Stats</id>
	<title>Appointmet Stats - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://docs.callproof.com/index.php?action=history&amp;feed=atom&amp;title=Appointmet_Stats"/>
	<link rel="alternate" type="text/html" href="http://docs.callproof.com/index.php?title=Appointmet_Stats&amp;action=history"/>
	<updated>2026-07-24T07:20:04Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>http://docs.callproof.com/index.php?title=Appointmet_Stats&amp;diff=3093&amp;oldid=prev</id>
		<title>Ashley DeBon: /* Overall Appointment Stats */</title>
		<link rel="alternate" type="text/html" href="http://docs.callproof.com/index.php?title=Appointmet_Stats&amp;diff=3093&amp;oldid=prev"/>
		<updated>2026-07-21T15:48:20Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Overall Appointment Stats&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 15:48, 21 July 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot; &gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Overall Appointment Stats ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;[[Mobile_API]] &amp;amp;#187;&lt;/ins&gt;Overall Appointment Stats ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Base URL ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&#039;diff-marker&#039;&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== Base URL ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Ashley DeBon</name></author>
		
	</entry>
	<entry>
		<id>http://docs.callproof.com/index.php?title=Appointmet_Stats&amp;diff=3092&amp;oldid=prev</id>
		<title>Ashley DeBon: Created page with &quot;== Overall Appointment Stats ==  === Base URL === https://apimobile.callproof.com  === Endpoint === /api/ai/chat-bot/appointmet-stats  === Purpose === Returns appointment stat...&quot;</title>
		<link rel="alternate" type="text/html" href="http://docs.callproof.com/index.php?title=Appointmet_Stats&amp;diff=3092&amp;oldid=prev"/>
		<updated>2026-07-21T15:48:10Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Overall Appointment Stats ==  === Base URL === https://apimobile.callproof.com  === Endpoint === /api/ai/chat-bot/appointmet-stats  === Purpose === Returns appointment stat...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Overall Appointment Stats ==&lt;br /&gt;
&lt;br /&gt;
=== Base URL ===&lt;br /&gt;
https://apimobile.callproof.com&lt;br /&gt;
&lt;br /&gt;
=== Endpoint ===&lt;br /&gt;
/api/ai/chat-bot/appointmet-stats&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
Returns appointment statistics for all reps in a company within a date range. For each rep, the API provides the number of appointments and the average appointment duration. Results are ordered by appointment count (highest first). Useful for questions such as which rep had the most appointments or what the average appointment duration was.&lt;br /&gt;
&lt;br /&gt;
=== HTTP Method ===&lt;br /&gt;
POST&lt;br /&gt;
&lt;br /&gt;
=== Headers ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Header !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| Authorization || Yes || Bearer access token&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Security ===&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Yes&amp;#039;&amp;#039;&amp;#039; – Requires Bearer Token authentication.&lt;br /&gt;
&lt;br /&gt;
=== Parameters ===&lt;br /&gt;
&lt;br /&gt;
==== Path Parameters ====&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
==== Query Parameters ====&lt;br /&gt;
None.&lt;br /&gt;
&lt;br /&gt;
==== Request Body ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Parameter !! Type !! Required !! Description&lt;br /&gt;
|-&lt;br /&gt;
| companyId || integer || Yes || Company identifier whose reps’ appointments will be aggregated&lt;br /&gt;
|-&lt;br /&gt;
| startDate || string || Yes || Start date of the range (&amp;lt;code&amp;gt;Y-m-d&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;2026-07-01&amp;lt;/code&amp;gt;)&lt;br /&gt;
|-&lt;br /&gt;
| endDate || string || Yes || End date of the range (&amp;lt;code&amp;gt;Y-m-d&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;2026-07-21&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Successful Response (200) ===&lt;br /&gt;
Returns per-rep appointment counts and average durations for the given company and date range.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| clientStatusCode || integer || Status indicator for the client (for example, 200)&lt;br /&gt;
|-&lt;br /&gt;
| user_id || integer || Identifier of the authenticated user&lt;br /&gt;
|-&lt;br /&gt;
| company_id || integer || Identifier of the authenticated user’s company&lt;br /&gt;
|-&lt;br /&gt;
| data || array || List of rep appointment stats (see below)&lt;br /&gt;
|-&lt;br /&gt;
| uri || string || Requested resource URI&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== data[] ====&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Field !! Type !! Description&lt;br /&gt;
|-&lt;br /&gt;
| rep_id || integer || Unique identifier of the rep&lt;br /&gt;
|-&lt;br /&gt;
| full_name || string || Full name of the rep&lt;br /&gt;
|-&lt;br /&gt;
| appointment_count || integer || Number of appointments for the rep in the date range&lt;br /&gt;
|-&lt;br /&gt;
| average_duration || string || Average appointment duration (for example, &amp;lt;code&amp;gt;120.5 seconds&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;0 seconds&amp;lt;/code&amp;gt;)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Error Responses ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Status Code !! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| 200 || Validation failed – response body uses &amp;lt;code&amp;gt;clientStatusCode&amp;lt;/code&amp;gt; 422 with the first validation error message&lt;br /&gt;
|-&lt;br /&gt;
| 400 || Bad Request – appointment stats could not be retrieved&lt;br /&gt;
|-&lt;br /&gt;
| 401 || Unauthorized – missing, invalid, or expired Bearer token&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Validation (HTTP 200, clientStatusCode 422)&amp;#039;&amp;#039;&amp;#039; – Missing/invalid &amp;lt;code&amp;gt;companyId&amp;lt;/code&amp;gt;, or &amp;lt;code&amp;gt;startDate&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;endDate&amp;lt;/code&amp;gt; not in &amp;lt;code&amp;gt;Y-m-d&amp;lt;/code&amp;gt; format.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;400&amp;#039;&amp;#039;&amp;#039; – No representatives found for the company, or another error fetching stats (for example, &amp;quot;Failed to fetch appointment stats.&amp;quot;).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;401&amp;#039;&amp;#039;&amp;#039; – Authentication failed or the access token is missing/expired.&lt;/div&gt;</summary>
		<author><name>Ashley DeBon</name></author>
		
	</entry>
</feed>