Difference between revisions of "Current Task Appointment"

From docs
Jump to: navigation, search
(Successful Response (200))
(Get Current Task and Appointment)
 
Line 1: Line 1:
== Get Current Task and Appointment ==
+
== [[Mobile_API]] »Get Current Task and Appointment ==
  
 
=== Base URL ===
 
=== Base URL ===

Latest revision as of 08:21, 20 July 2026

Mobile_API »Get Current Task and Appointment

Base URL

https://apimobile.callproof.com

Endpoint

/api/current-task-appointment/{task_widget}

`task_widget` is optional: `/api/current-task-appointment`

Purpose

Retrieves the authenticated user’s current-day tasks and active appointment status in one response. Tasks are included when the user’s task popup is enabled, or when this endpoint is called in task-widget mode (`task_widget = 1`).

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
task_widget integer No Set to 1 to force inclusion of current tasks for the task widget. Can also be sent as a request parameter named task_widget

Query Parameters

Parameter Type Required Description
task_widget integer No Same as the optional path value; request value is preferred when both are present

Request Body

None.

cURL Example for Android

 curl --location 'https://apimobile.callproof.com/api/current-task-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

cURL Example for iOS

 curl --location 'https://apimobile.callproof.com/api/current-task-appointment' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

Successful Response (200)

Returns current task details and current appointment details.

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 Combined task/appointment payload
uri string Requested resource URI

data.current_task

When tasks are available, this object includes:

Field Type Description
isShowTaskPopup boolean Whether the user’s task popup is enabled
current-task array List of current-day tasks (populated when popup is enabled or task_widget = 1)

data.current_task.current-task[]

Field Type Description
task_id integer Unique identifier of the task/follow-up
task_date string Task date in the user’s timezone (format: m-d-Y)
task_time string Task time in the user’s timezone (format: g:i A)
task_duration number Task duration in minutes
task_notes string Task notes
task_completed boolean/integer Whether the task is completed
contact_id integer Related contact identifier
contact_name string Related contact/company name
task_type_id integer Task type identifier
task_type_name string Task type name
task_assignment_id integer Assigned user identifier
task_assignment_name string Assigned user’s full name
latitude number/string Contact latitude
longitude number/string Contact longitude
task_people string Related person name, when linked; otherwise empty

data.current_appointment

When an appointment is active:

Field Type Description
appointment_id integer Active appointment identifier
contact_id integer Contact linked to the appointment
created string Appointment created timestamp
duration integer/number Appointment duration
notes string Appointment notes
updated_in_seconds integer/string Updated time as a Unix timestamp
event_form_id integer Related event form ID, when present
is_google_place boolean Whether the appointment is linked to a Google Place
is_appointment_active integer Active status indicator (for example, 1)

When no appointment is active, this object includes:

Field Type Description
is_appointment_active integer Default inactive status (for example, 0)

Error Responses

Status Code Meaning
400 Bad Request – current task/appointment details could not be retrieved
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while loading current task or appointment details.
  • 401 – Authentication failed or the access token is missing/expired.