Skip to main content

Update Task

Method: PATCH
/api/v1/tasks/{id}


Description​

This endpoint updates the details of an existing task. You can modify properties such as the task's assignment, description, due date, priority, and type.


πŸ”‘ Authentication​

This endpoint requires authentication via headers.

ParamValueType
countryCode{{countryCode}}string (optional)
userId{{userId}}string (optional)
tenantId{{tenantId}}string (optional)

Path Parameter​

NameTypeDescription
idstringThe unique ID of the task.

Request Body​

{
"assignToType": "LABORATORY",
"assignedToId": "string",
"description": "string",
"dueDate": "string",
"priority": "LOW",
"taskType": "PRODUCT_SAMPLING"
}

Request Body Explanation​

NameTypeDescription
assignToTypestringThe type of entity to which the task is assigned (e.g., "LABORATORY").
assignedToIdstringThe ID of the entity to which the task is assigned.
descriptionstringA description of the task.
dueDatestringThe due date for the task.
prioritystringThe task’s priority (e.g., "LOW", "MEDIUM", "HIGH").
taskTypestringThe type of task (e.g., "PRODUCT_SAMPLING").

Response: 200​

{
"message": "Task updated successfully.",
"taskId": "12345",
"updatedTask": {
"assignToType": "LABORATORY",
"assignedToId": "67890",
"description": "Collect product samples for testing",
"dueDate": "2025-02-20",
"priority": "LOW",
"taskType": "PRODUCT_SAMPLING"
}
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request PATCH \ 
--url /api/v1/tasks/{id} \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!