Difference between revisions of "Task Details Updation Based on Task Id"

From docs
Jump to: navigation, search
(Update Task)
(Successful Response (200))
 
Line 91: Line 91:
 
| recurrence_id || integer || No || Existing recurrence record identifier
 
| recurrence_id || integer || No || Existing recurrence record identifier
 
|}
 
|}
 +
 +
=== cURL Example for Android ===
 +
 +
<pre> curl --location --request PUT 'https://apimobile.callproof.com/api/contact/{contact_id}/task/{task_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'date=1754035200' \ --form 'time=10:30 AM' \ --form 'duration=30' \ --form 'task_assignment=101' \ --form 'task_type_id=1' \ --form 'people=[12,34]' </pre>
 +
 +
=== cURL Example for iOS ===
 +
 +
<pre> curl --location --request PUT 'https://apimobile.callproof.com/api/contact/{contact_id}/task/{task_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'date=1754035200' \ --form 'time=10:30 AM' \ --form 'duration=30' \ --form 'task_assignment=101' \ --form 'task_type_id=1' \ --form 'people=[12,34]' </pre>
  
 
=== Successful Response (200) ===
 
=== Successful Response (200) ===

Latest revision as of 08:07, 20 July 2026

Mobile_API »Update Task

Base URL

https://apimobile.callproof.com

Endpoint

/api/contact/{contact_id}/task/{task_id}

Purpose

Updates an existing task (follow-up) for a contact. Updates schedule, assignee, type, notes, optional priority, linked people, and can sync recurrence/calendar settings with Google or Office calendars when available.

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
contact_id integer Yes Unique identifier of the contact
task_id integer Yes Unique identifier of the task to update

Query Parameters

None.

Request Body

Parameter Type Required Description
date integer (Unix timestamp) Yes Task date as a Unix timestamp
time string Yes Task time (combined with date to form the start datetime)
duration number Yes Task duration in minutes
task_assignment integer/string Yes User ID of the person assigned to the task
task_type_id integer Yes Task/follow-up type identifier
people string (JSON array) Yes JSON array of personnel IDs linked to the task (for example, [12,34])
notes string No Task notes
task_priority_id integer No Task priority identifier
google_calendar integer/boolean No Whether to sync with Google Calendar (1/0)
office_calendar integer/boolean No Whether to sync with Office Calendar (1/0)
recurrence_type string No Recurrence type (for example, daily/weekly/monthly/yearly, or "Does not repeat")
repeat_interval integer No Recurrence interval; used with recurrence_type
repeat_count integer No Number of recurrence occurrences
end_date_daily string No End date for daily recurrence
repeat_day string No Day(s) for weekly recurrence
end_date_weekly string No End date for weekly recurrence
assign_month_date integer No Date of month for monthly recurrence
assign_month_day string No Day setting for monthly recurrence
end_date_monthly string No End date for monthly recurrence
assign_year_date integer No Date for yearly recurrence
assign_year_month integer No Month for yearly recurrence
end_date_year string No End date for yearly recurrence
assign_year_day string No Day setting for yearly recurrence
index string No Recurrence index/helper value
recurrence_id integer No Existing recurrence record identifier

cURL Example for Android

 curl --location --request PUT 'https://apimobile.callproof.com/api/contact/{contact_id}/task/{task_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'date=1754035200' \ --form 'time=10:30 AM' \ --form 'duration=30' \ --form 'task_assignment=101' \ --form 'task_type_id=1' \ --form 'people=[12,34]' 

cURL Example for iOS

 curl --location --request PUT 'https://apimobile.callproof.com/api/contact/{contact_id}/task/{task_id}' \ --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \ --form 'date=1754035200' \ --form 'time=10:30 AM' \ --form 'duration=30' \ --form 'task_assignment=101' \ --form 'task_type_id=1' \ --form 'people=[12,34]' 

Successful Response (200)

Indicates that the task 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
400 Bad Request – the task could not be updated
401 Unauthorized – missing, invalid, or expired Bearer token
  • 400 – Invalid date format ("Unauthorized"), task update failure ("Error while updating Task" / "Error while Adding Task"), or calendar sync failure (for example, "Error while Updating Event on Calendar").
  • 401 – Authentication failed or the access token is missing/expired.