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.
| Param | Value | Type |
|---|---|---|
countryCode | {{countryCode}} | string (optional) |
userId | {{userId}} | string (optional) |
tenantId | {{tenantId}} | string (optional) |
Path Parameterβ
| Name | Type | Description |
|---|---|---|
id | string | The unique ID of the task. |
Request Bodyβ
{
"assignToType": "LABORATORY",
"assignedToId": "string",
"description": "string",
"dueDate": "string",
"priority": "LOW",
"taskType": "PRODUCT_SAMPLING"
}
Request Body Explanationβ
| Name | Type | Description |
|---|---|---|
assignToType | string | The type of entity to which the task is assigned (e.g., "LABORATORY"). |
assignedToId | string | The ID of the entity to which the task is assigned. |
description | string | A description of the task. |
dueDate | string | The due date for the task. |
priority | string | The taskβs priority (e.g., "LOW", "MEDIUM", "HIGH"). |
taskType | string | The 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
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!