tasks
Update task
Changed onHandles the updating of a task by id
put/api/v1/tasks/{id}
Request
- Base URLhttps://demo.invoiceninja.com
- Authnone declared. Required headers: X-API-TOKEN, X-Requested-With
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
idstring string required
The task Hashed ID
Query parameters
includestring
Example:first_load
Includes child relationships in the response, format is comma separated. Check each model for the list of associated includes
Headers
X-API-TOKENstring required
Example:TOKEN
The API token to be used for authentication
X-Requested-Withstring required
Example:XMLHttpRequest
Used to send the XMLHttpRequest header
Request body
Example request
{
"description": "Complete project documentation",
"client_id": "D2J234DFA",
"project_id": "P2J234DFA",
"time_log": "2.5",
"status_id": 1,
"custom_value1": "Custom value 1",
"custom_value2": "Custom value 2",
"custom_value3": "Custom value 3",
"custom_value4": "Custom value 4",
"archived_at": 1640995200,
"due_date": "2024-01-31",
"priority": 1,
"tags": [
"Opnel5aKBz"
]
}Response
Returns the task object
Example response
{
"id": "Opnel5aKBz",
"user_id": "Opnel5aKBz",
"assigned_user_id": "Opnel5aKBz",
"client_id": "Opnel5aKBz",
"invoice_id": "Opnel5aKBz",
"project_id": "Opnel5aKBz",
"number": "TASK-123",
"time_log": "[[1,2],[3,4]]",
"is_running": true,
"is_deleted": true,
"task_status_id": "Opnel5aKBz",
"description": "A wonder task to work on",
"duration": 3600,
"task_status_order": 4,
"rate": 10,
"custom_value1": "2022-10-10",
"custom_value2": "$1100",
"custom_value3": "I need help",
"custom_value4": "INV-3343",
"is_date_based": true,
"calculated_start_date": "2022-10-10",
"invoice_documents": true,
"created_at": 1434342123,
"updated_at": 1434342123,
"archived_at": 1434342123,
"hash": "a1b2c3d4e5f6",
"status_id": "Opnel5aKBz",
"status_order": 1,
"status_sort_order": 1,
"tags": [
{
"id": "Opnel5aKBz",
"name": "Urgent",
"color": "#FF0000"
}
]
}Changes
- breaking
the response property
//became optional for the status
- breaking
- info
added the new optional request property
- info
added the optional property
to the response with the status
- info