Get SalesCoach account based Appointment details

From docs
Revision as of 15:58, 21 July 2026 by Ashley DeBon (talk | contribs) (Created page with "== Get Appointments By Contact (AI Chat Bot) == === Base URL === https://apimobile.callproof.com === Endpoint === /api/ai/chat-bot/contact/{id}/appointments === Purpose ===...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Get Appointments By Contact (AI Chat Bot)

Base URL

https://apimobile.callproof.com

Endpoint

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

Purpose

Retrieves a paginated list of appointments for a specific contact, for use by the AI Chat Bot. Results can be filtered by date range and by completed vs. incomplete status.

HTTP Method

GET

Headers

Header Required Description
Authorization Yes Bearer access token
email No User email used to resolve company context. If omitted, the authenticated user’s email is used

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 string (date) No Start date filter (YYYY-MM-DD). When provided, filters appointments by start date range
end string (date) No End date filter (YYYY-MM-DD). Used with start; if omitted when start is provided, defaults to today (end of day)
completed boolean No When true, returns completed appointments. When false/omitted, returns incomplete appointments
limit integer No Page size for pagination (default: 10)
page integer No Page number for pagination (default: 1)

Request Body

None.

Successful Response (200)

Returns a paginated list of appointments for the contact (newest first).

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 array List of appointment records
firstItemOnPage integer Index of the first item on the current page
lastItemOnPage integer Index of the last item on the current page
hasNextPage boolean Whether a next page is available
hasPreviousPage boolean Whether a previous page is available
isFirstPage boolean Whether the current page is the first page
isLastPage boolean Whether the current page is the last page
next_page_url string/null URL of the next page, when available
prev_page_url string/null URL of the previous page, when available
first_page_url string URL of the first page
last_page_url string URL of the last page
pageCount integer Total number of pages
pageNumber integer Current page number
pageSize integer Number of items per page
totalItemCount integer Total number of matching appointments
uri string Requested resource URI

data[]

Field Type Description
id integer Unique identifier of the appointment
duration integer/number Appointment duration
notes string Appointment notes
event_form_id integer Linked event form identifier, when available
start string/datetime Appointment start date/time
start_latitude number/string Start location latitude
start_longitude number/string Start location longitude
end_latitude number/string End location latitude
end_longitude number/string End location longitude
title string Appointment title
address string Appointment address
scheduled boolean/datetime Scheduled indicator/value for the appointment

Error Responses

Status Code Meaning
400 Bad Request – appointments could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – Invalid user email ("Invalid user email"), no matching appointments ("No appointment found"), or another retrieval error (for example, "Error fetching contact-based appointments").
  • 401 – Authentication failed or the access token is missing/expired.