Difference between revisions of "Dismiss Tasks"

From docs
Jump to: navigation, search
(Update Current Task Completion)
(Successful Response (200))
Line 46: Line 46:
 
| task_status || integer || Yes || Completion status: <code>0</code> = not completed, <code>1</code> = completed
 
| task_status || integer || Yes || Completion status: <code>0</code> = not completed, <code>1</code> = completed
 
|}
 
|}
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location --request PUT 'https://apimobile.callproof.com/api/currenttask-completion' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'task_datas=[{"task_id":6789,"task_status":1}]' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location --request PUT 'https://apimobile.callproof.com/api/currenttask-completion' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'task_datas=[{"task_id":6789,"task_status":1}]' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Revision as of 08:24, 20 July 2026

Mobile_API »Update Current Task Completion

Base URL

https://apimobile.callproof.com

Endpoint

/api/currenttask-completion

Purpose

Updates the completion status of one or more current tasks. Accepts a JSON list of tasks with their new status values (`0` or `1`) and applies each update for the authenticated user’s company.

HTTP Method

PUT

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

None.

Query Parameters

None.

Request Body

Parameter Type Required Description
task_datas string (JSON array) Yes JSON array of task completion updates (see below)

task_datas[]

Parameter Type Required Description
task_id integer Yes Unique identifier of the task (follow-up) to update
task_status integer Yes Completion status: 0 = not completed, 1 = completed

cURL Example for Android

 curl --location --request PUT 'https://apimobile.callproof.com/api/currenttask-completion' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'task_datas=[{"task_id":6789,"task_status":1}]' 

cURL Example for iOS

 curl --location --request PUT 'https://apimobile.callproof.com/api/currenttask-completion' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'task_datas=[{"task_id":6789,"task_status":1}]' 

Successful Response (200)

Indicates that the task completion statuses were updated successfully.

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
message string Confirmation message (for example, "Tasks updated Successfully.")
uri string Requested resource URI

Error Responses

Status Code Meaning
200 Validation failed – response body uses clientStatusCode 401 with the first validation error message
400 Bad Request – task completion could not be updated
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing or non-string task_datas.
  • 400 – Invalid task ID ("Task Id is Invalid"), invalid task status ("Task Status Id is Invalid"), or another update error (for example, "Error while Updating Task Completion").
  • 401 – Authentication failed or the access token is missing/expired.