<?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=Fetch_User_Appointment</id>
	<title>Fetch User Appointment - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://docs.callproof.com/index.php?action=history&amp;feed=atom&amp;title=Fetch_User_Appointment"/>
	<link rel="alternate" type="text/html" href="http://docs.callproof.com/index.php?title=Fetch_User_Appointment&amp;action=history"/>
	<updated>2026-07-24T07:25:51Z</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=Fetch_User_Appointment&amp;diff=3080&amp;oldid=prev</id>
		<title>Ashley DeBon: /* Fetch User Appointments */</title>
		<link rel="alternate" type="text/html" href="http://docs.callproof.com/index.php?title=Fetch_User_Appointment&amp;diff=3080&amp;oldid=prev"/>
		<updated>2026-07-21T15:34:58Z</updated>

		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Fetch User Appointments&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:34, 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;== Fetch User Appointments ==&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;Fetch User Appointments ==&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=Fetch_User_Appointment&amp;diff=3079&amp;oldid=prev</id>
		<title>Ashley DeBon: Created page with &quot;== Fetch User Appointments ==  === Base URL === https://apimobile.callproof.com  === Endpoint === /api/ai/chat-bot/fetch-user-appointment  === Purpose === Retrieves appointmen...&quot;</title>
		<link rel="alternate" type="text/html" href="http://docs.callproof.com/index.php?title=Fetch_User_Appointment&amp;diff=3079&amp;oldid=prev"/>
		<updated>2026-07-21T15:34:24Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Fetch User Appointments ==  === Base URL === https://apimobile.callproof.com  === Endpoint === /api/ai/chat-bot/fetch-user-appointment  === Purpose === Retrieves appointmen...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Fetch User Appointments ==&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/fetch-user-appointment&lt;br /&gt;
&lt;br /&gt;
=== Purpose ===&lt;br /&gt;
Retrieves appointments for a specific user within a company for a given date range. Optionally filters to completed or incomplete appointments (based on whether the appointment was ended with Plus).&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;
| userId || integer || Yes || User whose appointments should be retrieved&lt;br /&gt;
|-&lt;br /&gt;
| companyId || integer || Yes || Company identifier for the appointments&lt;br /&gt;
|-&lt;br /&gt;
| startDate || string (date) || Yes* || Start of the date range (&amp;lt;code&amp;gt;Y-m-d&amp;lt;/code&amp;gt;). Required by business logic even though format validation allows null&lt;br /&gt;
|-&lt;br /&gt;
| endDate || string (date) || Yes* || End of the date range (&amp;lt;code&amp;gt;Y-m-d&amp;lt;/code&amp;gt;). Required by business logic even though format validation allows null&lt;br /&gt;
|-&lt;br /&gt;
| completed || integer || No || Appointment completion filter: &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; = completed (ended with Plus), &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = not completed. Defaults to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Successful Response (200) ===&lt;br /&gt;
Returns matching appointments for the user 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 appointment records&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;
| appointment_id || integer || Unique identifier of the appointment&lt;br /&gt;
|-&lt;br /&gt;
| contact_id || integer || Contact associated with the appointment&lt;br /&gt;
|-&lt;br /&gt;
| name || string || Company name of the contact&lt;br /&gt;
|-&lt;br /&gt;
| latitude || number/string || Contact latitude&lt;br /&gt;
|-&lt;br /&gt;
| longitude || number/string || Contact longitude&lt;br /&gt;
|-&lt;br /&gt;
| created || string/datetime || Appointment created timestamp&lt;br /&gt;
|-&lt;br /&gt;
| start || string/datetime || Appointment start timestamp&lt;br /&gt;
|-&lt;br /&gt;
| notes || string || Appointment notes&lt;br /&gt;
|-&lt;br /&gt;
| duration || integer/number || Appointment duration&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 – appointments 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;userId&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;companyId&amp;lt;/code&amp;gt;, invalid date format, or invalid &amp;lt;code&amp;gt;completed&amp;lt;/code&amp;gt; value.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;400&amp;#039;&amp;#039;&amp;#039; – Missing required date parameters (&amp;quot;Invalid input parameters.&amp;quot;), or no appointments found (&amp;quot;No appointments found.&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>