Difference between revisions of "Task Updation"

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

Latest revision as of 08:15, 20 July 2026

Mobile_API »Update Task Completion

Base URL

https://apimobile.callproof.com

Endpoint

/api/task-completion/{task_id}

Purpose

Marks a task as completed or incomplete by updating its completion status. Valid status values are 0 (incomplete) and 1 (completed).

HTTP Method

PUT

Headers

Header Required Description
Authorization Yes Bearer access token

Security

  • Yes – Requires Bearer Token authentication.

Parameters

Path Parameters

Parameter Type Required Description
task_id integer Yes Unique identifier of the task to update

Query Parameters

None.

Request Body

Parameter Type Required Description
task_status integer Yes Completion status: 0 = incomplete, 1 = completed

cURL Example for Android

 curl --location --request PUT 'https://apimobile.callproof.com/api/task-completion/{task_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'task_status=1' 

cURL Example for iOS

 curl --location --request PUT 'https://apimobile.callproof.com/api/task-completion/{task_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'task_status=1' 

Successful Response (200)

Indicates that the task completion status was 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, "Task was successfully updated.")
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 – the task completion status could not be updated
401 Unauthorized – missing, invalid, or expired Bearer token
  • Validation (HTTP 200, clientStatusCode 401) – Missing or non-numeric task_status.
  • 400 – Invalid task ID ("Task Id is Invalid"), invalid status value not in 0/1 ("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.