Difference between revisions of "Dismiss Tasks"

From docs
Jump to: navigation, search
(Successful Response (200))
(Successful Response (200))
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
== [[Mobile_API]] »Update Current Task Completion ==
+
== [[Mobile_API]] »Close Task Popup ==
  
 
=== Base URL ===
 
=== Base URL ===
Line 5: Line 5:
  
 
=== Endpoint ===
 
=== Endpoint ===
/api/currenttask-completion
+
/api/close-taskpopup
  
 
=== Purpose ===
 
=== 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.
+
Dismisses the current-tasks popup for the authenticated user for the day by turning off the user’s “show task popup” flag.
  
 
=== HTTP Method ===
 
=== HTTP Method ===
Line 32: Line 32:
  
 
==== Request Body ====
 
==== Request Body ====
{| class="wikitable"
+
None.
! Parameter !! Type !! Required !! Description
 
|-
 
| task_datas || string (JSON array) || Yes || JSON array of task completion updates (see below)
 
|}
 
  
==== task_datas[] ====
+
<pre> curl --location --request PUT 'https://apimobile.callproof.com/api/close-taskpopup' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
{| class="wikitable"
 
! Parameter !! Type !! Required !! Description
 
|-
 
| task_id || integer || Yes || Unique identifier of the task (follow-up) to update
 
|-
 
| 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 ===
 
=== 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>
+
<pre> curl --location --request PUT 'https://apimobile.callproof.com/api/close-taskpopup' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===
Indicates that the task completion statuses were updated successfully.
+
Indicates that the task popup was dismissed successfully.
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 67: Line 52:
 
| company_id || integer || Identifier of the authenticated user’s company
 
| company_id || integer || Identifier of the authenticated user’s company
 
|-
 
|-
| message || string || Confirmation message (for example, "Tasks updated Successfully.")
+
| message || string || Confirmation message (for example, "Tasks dismissed for the day.")
 
|-
 
|-
 
| uri || string || Requested resource URI
 
| uri || string || Requested resource URI
Line 76: Line 61:
 
! Status Code !! Meaning
 
! Status Code !! Meaning
 
|-
 
|-
| 200 || Validation failed – response body uses <code>clientStatusCode</code> 401 with the first validation error message
+
| 400 || Bad Request – the task popup could not be dismissed
|-
 
| 400 || Bad Request – task completion could not be updated
 
 
|-
 
|-
 
| 401 || Unauthorized – missing, invalid, or expired Bearer token
 
| 401 || Unauthorized – missing, invalid, or expired Bearer token
 
|}
 
|}
  
* '''Validation (HTTP 200, clientStatusCode 401)''' – Missing or non-string <code>task_datas</code>.
+
* '''400''' – An error occurred while dismissing the popup (for example, "Error while Dismiss the task details").
* '''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.
 
* '''401''' – Authentication failed or the access token is missing/expired.

Latest revision as of 08:32, 20 July 2026

Mobile_API »Close Task Popup

Base URL

https://apimobile.callproof.com

Endpoint

/api/close-taskpopup

Purpose

Dismisses the current-tasks popup for the authenticated user for the day by turning off the user’s “show task popup” flag.

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

None.

 curl --location --request PUT 'https://apimobile.callproof.com/api/close-taskpopup' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

cURL Example for iOS

 curl --location --request PUT 'https://apimobile.callproof.com/api/close-taskpopup' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' 

Successful Response (200)

Indicates that the task popup was dismissed 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 dismissed for the day.")
uri string Requested resource URI

Error Responses

Status Code Meaning
400 Bad Request – the task popup could not be dismissed
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – An error occurred while dismissing the popup (for example, "Error while Dismiss the task details").
  • 401 – Authentication failed or the access token is missing/expired.