Current Tasks

From docs
Jump to: navigation, search

Mobile_API »Get Current Tasks

Base URL

https://apimobile.callproof.com

Endpoint

/api/current-tasks/{task_widget}

`task_widget` is optional: `/api/current-tasks`

Purpose

Retrieves the authenticated user’s current (incomplete) tasks for today in the user’s timezone. Task list details are returned 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 returning current task details for the task widget. Defaults to 0 when omitted

Query Parameters

Parameter Type Required Description
task_widget integer No Same as the path parameter; used if provided on the request

Request Body

None.

cURL Example for Android

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

cURL Example for iOS

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

Successful Response (200)

Returns whether the task popup should be shown, and today’s current tasks when applicable.

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 Current tasks payload
uri string Requested resource URI

data

Field Type Description
isShowTaskPopup boolean Whether the task popup is enabled for the user
current-task array List of current tasks (empty when popup is disabled and task_widget is not 1)

data.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/mixed Completion status of the task
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 display 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 personnel is linked; otherwise empty

Error Responses

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