Difference between revisions of "Get SalesCoach contact stats"

From docs
Jump to: navigation, search
(Created page with "== Get Contact Statistics (AI Chat Bot) == === Base URL === https://apimobile.callproof.com === Endpoint === /api/ai/chat-bot/contact/{id}/statistics === Purpose === Retrie...")
 
(Get Contact Statistics (AI Chat Bot))
 
Line 1: Line 1:
== Get Contact Statistics (AI Chat Bot) ==
+
==[[Mobile_API]] » Get Contact Statistics (AI Chat Bot) ==
  
 
=== Base URL ===
 
=== Base URL ===

Latest revision as of 15:52, 21 July 2026

Mobile_API » Get Contact Statistics (AI Chat Bot)

Base URL

https://apimobile.callproof.com

Endpoint

/api/ai/chat-bot/contact/{id}/statistics

Purpose

Retrieves recent activity statistics for a contact for AI Chat Bot / Sales Coach use. Returns limited lists of appointments, opportunities, notes, and event form submissions within an optional date range.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

Parameter Type Required Description
id integer Yes Unique identifier of the contact

Query Parameters

Parameter Type Required Description
start_date string No Start date filter (YYYY-MM-DD). If omitted with end_date, defaults to today
end_date string No End date filter (YYYY-MM-DD). If omitted with start_date, defaults to today
limit integer No Maximum number of records to return per section (default: 3)

Request Body

None.

Successful Response (200)

Returns contact activity grouped by type.

Field Type Description
clientStatusCode integer Status indicator for the client (for example, 200)
user_id integer Identifier of the authenticated user
company_id integer Identifier of the authenticated user’s company
data object Contact statistics payload
uri string Requested resource URI

data

Field Type Description
appointments array Recent appointments for the contact
opportunities array Recent opportunities for the contact
notes array Recent contact notes
event_form array Recent event form submissions for the contact

data.appointments[]

Field Type Description
id integer Appointment identifier
title string Appointment title
start string Start date/time in the user’s timezone (ISO-8601 / Atom)
duration integer Appointment duration
latitude string Start latitude
end_latitude string End latitude
longitude string Start longitude
end_longitude string End longitude
notes string Appointment notes
completed boolean true when duration is greater than 0

data.opportunities[]

Field Type Description
id integer Opportunity identifier
contact string Contact/company name
title string Opportunity name
contactpersons string Linked people names (comma-separated)
type string Opportunity type
stage string Opportunity stage
close_date string Close date in the user’s timezone (ISO-8601 / Atom)
probability number Win probability
amount number Opportunity value/amount
notes string Opportunity notes
created string Created date/time in the user’s timezone (ISO-8601 / Atom)

data.notes[]

Field Type Description
id integer Note identifier
note string Note text
created string Created date/time in the user’s timezone (ISO-8601 / Atom)
source_type string Note source type name, or N/A when unavailable

data.event_form[]

Field Type Description
id integer Event form identifier
contact string Contact/company name
title string Event form name
completed boolean Whether the submission is completed
completed_date string Completed date/time in the user’s timezone (ISO-8601 / Atom), empty when not set
created string Created date/time in the user’s timezone (ISO-8601 / Atom)
creater string Full name of the user who submitted the form

Error Responses

Status Code Meaning
400 Bad Request – contact statistics could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while loading contact statistics (for example, "We're sorry, but there was an issue accessing the AI Sales Coach module. Our team has been notified and is working to resolve it.").
  • 401 – Authentication failed or the access token is missing/expired.