Update Task API

Update Task API

This API allows you to update an existing task in a specified list.

API URL

https://app.wegodoo.com/


API Endpoint

PUT /api/v1/tasks


Info
## Important Notes:
- All API requests must be made to this base URL followed by the specific endpoint path
- HTTPS protocol is required for all API calls
- API version v1 is currently supported
- All responses will be returned in JSON format

Request Body

JSON payload:

{
    "task_id": "61948",
    "update_task_name": "Update Website Content",
    "update_note": "Ensure all pages are updated with the new branding",
    "update_due_date": "2024-03-11",
    "set_mark_as_important": true,
    "IsDoingToday": true
}

Required Fields

  • task_id (long): The ID of the task to be updated.
  • update_task_name (String): The new name for the task.

Optional Fields

  • update_note (String): A note or additional information about the task.
  • update_due_date (Datetime): The updated due date for the task in Format: "YYYY-MM-DD" (e.g., "2024-12-01").
  • IsDoingToday (Boolean): Whether the task is scheduled for today.
  • set_mark_as_important (Boolean): Whether the task is marked as important.

Headers

  • AuthorizationBearer <Access-Token> (This assumes token-based authentication. Modify as per your actual authentication/authorization method.)

Response

The API will respond with a JSON object containing the following fields:

{
    "status": "success",
    "message": "Task successfully updated.",
    "data": {
        "task_id": "61948",
        "list_id": "7998",
        "task_name": "Update Website Content",         "task_url": "https://app.wegodoo.com/Home/Index?taskid=Ij90YXNraWQ9ODcxNDYmbGlzdGlkPTE5MTE4Ig==",
        "list_name": "Marketing Tasks",
        "note": "Ensure all pages are updated with the new branding",
        "due_date": "2024-03-11",
        "mark_as_important": true,
        "assigned_to": null,
        "verify_by": null,
        "IsDoingToday": true
    }
}

API Error Handling

HTTP Status Code: 404 Not Found

 ‘List Id’ provided in the request body doesn’t exist

{
    "status": "error",
    "message": "Not Found",
    "errors": {
        "list_id": "The specified List ID does not exist"
    }
}

Task Id provided in the request body doesn’t exist

{
    "status": "error",
    "message": "Not Found",
    "errors": {
        "task_id": "The specified Task ID does not exist"
    }
}

400 Bad Request

Request body not provided

{
    "status": "error",
    "message": "Bad Request",
    "errors": {
        "task_id": "Task ID is required",
        "list_id": "List ID is required",
        "task_name": "Task Name is required"
    }
}

List Id is not provided in the request body

{
    "status": "error",
    "message": "Bad Request",
    "errors": {
        "list_id": "List ID is required"
    }
}

Task Id is not provided in the request body

{
    "status": "error",
    "message": "Bad Request",
    "errors": {
        "task_id": "Task ID is required"
    }
}

Task Id not matching with URL Task Id

{
    "status": "error",
    "message": "Bad Request",
    "errors": {
        "task_id": "URL task_id and Model task_id is not same."
    }
}

401 Unauthorized

Invalid token

{
    "status": "error",
    "message": "Unauthorized",
    "errors": {
        "authorization": "Token is invalid or expired"
    }
}

    • Related Articles

    • Add Task Comment API

      This API allows you to add a comment to a specific task in a specified list. API URL https://app.wegodoo.com/ API Endpoint POST /api/v1/tasks/comments ## Important Notes: - All API requests must be made to this base URL followed by the specific ...
    • Complete Task API

      This API allows you to mark a specific task as completed in a specified list. API URL https://app.wegodoo.com/ API Endpoint PATCH /api/v1/tasks/complete ## Important Notes: - All API requests must be made to this base URL followed by the specific ...
    • Create Task API

      This API allows you to create a new task in a specified list. API URL https://app.wegodoo.com/ API Endpoint POST /api/v1/tasks ## Important Notes: - All API requests must be made to this base URL followed by the specific endpoint path - HTTPS ...
    • Get List API (Helper API)

      This API retrieves the names and IDs of all lists associated with a user, including those shared with them. API URL https://app.wegodoo.com/ API Endpoint GET /api/v1/users/lists ## Important Notes: - All API requests must be made to this base URL ...
    • Status Check API

      This API checks the operational status of the application to ensure it is running and accessible. It is particularly useful for debugging connectivity and server health issues. API URL https://app.wegodoo.com/ API Endpoint GET /api/v1/status ## ...